Get the latest tech news
Learning Solver Design: Automating Factorio Balancers
I built a Factorio belt balancer solver. From tiny 2x2 grids to a massive 16x16 monster, every step revealed new solver tricks, numeric hiccups, and devious debugging puzzles.
It solves the numeric instability problem, but it raises a new issue: needing to know in advance how many times the input flows will be split before reaching the output. Additionally, if we assume that the first and the last rows must have mixers and we add a couple of belt components at random, applying a technique called symmetry breaking, the solver finds an 8x8 solution in just 83s, a great improvement! After spending a few hours changing the problem formulation, objective function, using hints, and solver strategies, I eventually hit a wall trying and I was never able to find a 16x16 balancer.
Or read this on Hacker News