3 ms·
I remember writing a Mastermind solver in Ocaml, about a year after getting started with programming. The solution space is fairly small so I would start with a
by nestorD 3y ago
I remember writing a Mastermind solver in Ocaml, about a year after getting started with programming.
The solution space is fairly small so I would start with a random guess then, of all solutions that are still legal, pick the one that would -- at worst -- reduce the solution space the most (essentially a one move ahead minimax).