Remix.run Logo
eru 11 hours ago

https://lichess.org/@/Tobs40/blog/there-is-no-reachable-ches... describes how the author removed some more complicated rules in the first pass, and is willing to re-introduce them, if necessary. Ie if the solution found violates them.

Interestingly, mixed integer linear programming solvers already support these. The technical term for this is 'row generation'. It comes from the usually way these problems are written in matrix form, where rows correspond to constraints and columns correspond to variables.

(Dynamically) adding a row is equivalent to introducing a constraint only if it's violated.

This approach is often used for the traveling salesman problem.

(Weirdly enough, Wikipedia has https://en.wikipedia.org/wiki/Column_generation but nothing on row generation.)

Tobs40 2 minutes ago | parent | next [-]

Hi, author of the Lichess article here.

relaxing and omitting chess rules also changed the choice of variables. I did try lazy constraints etc. before diving into the math, but they did not yield a significant speedup. For example, not considering the white king as being in check simplified A LOT.

Best regards, Tobi

salt4034 4 hours ago | parent | prev | next [-]

The most commonly used term for this is lazy constraints (https://support.gurobi.com/hc/en-us/articles/360013197972-Ho...).

LeGrosDadai 11 hours ago | parent | prev [-]

I'm quite curious to see if the MILP solver would terminate (given the massive search space), my guess is not.

eru 9 hours ago | parent [-]

Well, my point is that you can encode the tricks described in the linked article directly in a modern MILP solver in a way that is legible to the solver. We'd expect similar behaviour in that case, or perhaps slightly better, because the solver can 'see' them better.

Yes, if you do a naive programme only, it would be a massive search space.