Hacker News new | ask | show | jobs
by pantsforbirds 36 days ago
I had a lot of fun playing the game. I also made a local solver to see how far you can theoretically get, and it's definitely infinite if you play perfectly. Working on the local sim / solver was almost as fun as playing the game :)
3 comments

I started by pulling the game source locally and doing some initial testing with a few solvers. I ended up having Claude make a 1-for-1 perfect sim of the original game using rust with some optimizations. The original engine was able to check around 180 moves/s and the rust port was hitting 2,150 moves/s.

After that, I tested a few solvers. Single Player Monte Carlo Tree Search seemed promising, but didn't do as well as I expected. A simple beam search does appear to go infinitely pretty easily.

When you say play perfectly do you mean by exhausting all possibilities? Or is there some way to deduce ahead of time whether the RNG will put you in an impossible situation.
The way the game is seeded, it's 100% deterministic. So if you can scan enough potential moves / second, it's very easy to infinitely play the game at a fast rate.

Shockingly, Claude was able to find the exact random generators that the js library uses, list out all of the differences between the languages that might impact the replays (like rounding being treated differently), and include those differences in the simulation. Claud then back-tested on a huge number of games using the original implementation as a golden set generator.

> it's definitely infinite if you play perfectly.

Considering that 2 new pieces are spawned for each captured one, if you keep progressing you will exhaust the real estate, sooner or later. The only way to go on infinitely is not capturing, but that means not scoring points. Hardly satisfying, though.

For example today's board can be played infinitely by moving between a8 and b7. Zero points, infinite game!

Ah yes, I specifically mean you can keep earning points infinitely. After the board is full, it resets the game, and you get points for each piece on the board. I usually stop the simulation after it clears the board 10 times or so.