Subway Surfers, as far as it goes with zero coins

A search algorithm plays this run. Watch the coin counter in the top right corner: it stays at 0 for the whole run. Pause, skip around or speed it up like a video.

For scale: the best human run on the speedrun.com mobile leaderboard (No Coins, no hoverboard, no keys) lasts 2 h 37 min. The bot plays a rebuilt copy of the web game with a fixed seed, so its runs are a demonstration, not leaderboard entries.

Loading the game (about 25 MB)…
0:00 / 0:00
Run: Sound: off

The runs

SeedLengthCoinsKey presses

How it plays

Nothing here is learned and nothing looks at the screen. The game on this page is a Rust port of the web version whose simulation is deterministic: the same seed and the same key presses always give the same run.

So the planner searches the game itself. Every 4 frames it takes every position the run could be in and tries each key: nothing, left, right, jump, roll. Anything that crashes or touches a coin is thrown away. What survives to the end is a list of key presses, and this page replays that list.

Where it has room, it shows off: it jumps over rows of coins, changes lane in mid-air, runs along train roofs and through the gap between two trains, as long as that costs no stumble. The arrows in the corner are the keys it presses.

When the list ends the keys stop, so the run ends in a crash a moment later.

Code and details: github.com/sacha9214/subway-nocoin.