prolog

By clecam, 19 October, 2025

I wanted a reliable way to generate all legal K+R vs K chess positions with White to move for AI training data.
After exploring several constraint programming tools (MiniZinc, OR-Tools, and Prolog variants), I ended up using Scryer Prolog, embedded directly from Rust.

In the end, I realized that I didn’t even need constraint programming (CLP) at all — plain Prolog was enough.
The constraints were simple, the domain small, and performance was already instant.