Learning Solver Design: Automating Factorio Balancers

Declarative programming is intriguing because it allows us to model problems and have solvers generate solutions for us. I delved into the world of solvers by tackling a belt balancing challenge from the Factorio game, a seemingly simple task that is, in reality, NP-hard. The game encourages sharing solutions, leading to a community generating creative designs. To optimize the balancing of belt lanes, we need Throughput-Unlimited belt balancers that evenly distribute input flows across outputs. Using Mixed Integer Programming initially, we model the problem and create constraints, but encounter numeric instability issues. The journey to find a compact balancer continues, with tests serving as a guide.

https://gianlucaventurini.com/posts/2024/factorio-sat

To top