Hacker News new | ask | show | jobs
by lifthrasiir 1428 days ago
> Alas, I've backed myself into a corner a couple of times and triggered "just gotta guess" choices in it - while it's generally good at this, it's not a 100% implementation based on my playing.

This should not happen because the current implementation [1] always tries to solve a randomly generated puzzle deductively, and never generates a puzzle that hasn't passed the check. (There are some shortcuts, including dynamically "perturbing" the current puzzle to make it uniquely solvable.) "Solvable" puzzles do not guarantee no backtracking though, so that's probably where you gave up. Also note that you should take account for the number of remaining mines, which can frequently be the sole information left for the very last mines.

[1] https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines...