In this game, the goal is to trigger the longest chain reaction. Once you click on a cell, you can no longer click on any of them before they all stop moving. The chain reaction and the soothing sfx make it a relaxing game. You can play the game is various places, for instance
here.
I always wondered what the best possible score could be.
I wanted to mathematically find the solution, but then figured ou it was probably an NP-hard problem. I also thought about implementing a simulation as a cellular automata to bruteforce it extremely fast, but it turns out the game does not work that way. Each cell behaves independently from the other ones, and then very quickly desync from each other.
I then went for the more basic method of just straightforward bruteforcing it. This still required me to make several patches for libTAS to make that possible (but I'm now happy to say you can now bruteforce seeds in libTAS. Well, when my PRs get merged at least).
After 75k tries, I decided to switch from extensively searching all seeds to a more clever method: only testing 10 randoms clicks for each seed, and extensively searching the most promising ones. This is based on the observation than some seeds generally give better results than others.
Shortly after, I changed strategy: patching the game to avoid having to rely on savestates, which made the search 7x faster and extensive seed search way costless.
I bruteforced 1.3 million attempts in over 5500 seeds, and here's the best solution.
The bruteforcer code in
on Github. I also made
a video of the bruteforcing in progress as I found it quite poetic.
Potential screenshots:
Room for improvement
Bruteforcing more seeds could find better solutions.
There might be slightly better results if you click on some cells to rearrange them before the big chain reaction, especially in unreachable areas of the most successful seeds. However, this adds a layer of complexity I did't want to get into, and preferred focusing on bruteforcing single-click solutions (this is a speedrun, after all ;))
Also, I still don't have proof that infinite loops are impossible. I just haven't found one. This is more of a math problem I think.
Note: I went for highscore, but current solution is not the longer chain in terms of time, as I got at least a 3057 one that takes 2 minutes to complete. I did not dig into that direction, but that could be a different category.
Emulation
Samsara: Runs like this are why I find TASing so beautiful. Sometimes you just gotta bruteforce over a million tries at one single action, and sometimes that's it, that's the TAS.
I think this is a good solution to the problem of how to make something like this TASable and optimizable. While you could likely get a better score with additional setup clicks, allowing for more than one click sort of makes optimization a moot point. Theoretically, anyone can surpass this score just by clicking randomly and eventually having everything line up for them. The single click restriction removes that and forces a perfect setup to be manipulated off the jump, with score improvements coming only from better manipulation and not infinite time and setup.
Accepting!