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.
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.