Cave Story · Best Ending · no human inputs

Cave Story from scratch

The 49:57 run was built on top of human runs: about two-thirds of its inputs came from a 2011 TAS. This is the next step. A machine played Cave Story from a new game all the way to the Best Ending, with no human inputs, no human route and no recorded runs to follow. It worked out what to do from the game itself.

Highlights, 1 min 25 s: moments from the machine's run, from the first room to the Best Ending's credits. Rendered from the run in our copy of the game, with the game's own sound.
2:52:27
of play from power-on to the Best Ending's "The End" (517,359 frames at 50 fps)
22 h 45 min
of search, start to finish, including about 25 restarts to add fixes; home machines plus about $1.50 of rented GPU
0
human inputs, routes or recorded runs used
517,360
frames identical on the original game, every one checked

Verified on the original game. The run's button presses were played into the original Doukutsu.exe (Japanese freeware 1.0.0.6) and compared with our copy of the game on every frame: all 517,360 frames match, the credits start at frame 506,072, and the game ends on the Best Ending with both of its flags set. It's a plain clear, not a speedrun: the run wanders and backtracks (the search behind it died countless times), and it takes almost three times as long as the human-assisted record. Making it fast is the next step.

The rules

One rule: no human input files or routes go in. No movies, no walkthroughs, no list of where to go. The machine gets the game and has to find its own way. The AI that built the tools has read about Cave Story like anyone else, so the claim isn't "nobody knew anything". It's that the run itself was found by search, with the goals read out of the game's own data.

How it plays

Three parts work together:

The walls, and what got past them

Most of the work was the explorer getting stuck, and an AI agent figuring out why by reading the game's scripts, then teaching the search something general rather than a hint for that one spot.

Odd things it does

A search that has never seen anyone play doesn't play like a person. Some of what it did:

Two identical Core-fight screenshots: Curly riding on Quote's back on the walkway, while another Curly fights at the bottom
The same frame of the Core fight on the original Doukutsu.exe (left) and in our copy of the game (right), identical pixel for pixel: one Curly on Quote's back (top middle) and one fighting below.

What's next

Credits

Cave Story is by Daisuke "Pixel" Amaya / Studio Pixel. Its graphics and music are his.