4 ms·
continue; could reduce the depth a bit, but it's still gnarly. https://gist.github.com/anonymous/f3607a28a4c8ad1322f13a2d10f28b5e https://gist.github.com/anony
by tyingq 9y ago
continue; could reduce the depth a bit, but it's still gnarly. https://gist.github.com/anonymous/f3607a28a4c8ad1322f13a2d10f28b5e https://gist.github.com/anonymous/f3607a28a4c8ad1322f13a2d10...
- pronoiac 9y agoI have a ridiculous urge to refactor this. It's enumerating all of the boards, legal or not. Judging by the letters, it's doing one player's moves at first, in a way that's trying to avoid repeats. If I were to do this, I'd have, well, menace_x and menace_o, and build move n from move n-1. Depth-first would also work, really, as we're talking about only 300-ish boards.