[Community Puzzle] FreeCell

I initially didn’t realize this was more a “very hard” than “hard” one, so tried it with the current language to achieve (Ruby, definitively not my favorite), but it became obvious that my knowledge of the perfs implication of the language + rather slow language to begin with wouldn’t allow me to get past the example.

My first C++ version (also a variation on A*, might try a real one to actually find the shortest sequence…) solved a bit more than half the random puzzles, and I reached 100% on try 4.
After a couple of improvements, all tests pass, except impossible of course, which still times out, apparently at 1/3 of the work needed to prove it impossible when checking locally.

2 Likes