Racetrack
DE / ENCreate new race
Race created. Game code:
Send the link to the other players. Each of them picks their name there.
Join a race
My recent games
How it works
Each car has a speed in the x and y direction. On each move, each component may change by at most 1 – nine possible target cells. Anyone who hits a wall stops right in front of it, loses their momentum, and gets a 4-second penalty. In sand, the maximum speed is 2. Whoever is first to cross the finish line the set number of times wins.
| Track | Sand (max. speed 2) | ||
| Wall | Finish line |
Finish: If several moves cross the finish line, tenths of a second are counted – the fastest is the move with the highest speed that crosses the line most directly.
Formula: tenths = distance to the line ÷ total length of the move (each move takes 1 second). The line sits exactly between the finish-line cell and the following cell – half a cell width.
How does the bot drive?
A path-cost map is calculated once for the track – starting from the finish line, it spreads backwards over all drivable cells, where each track cell costs 1 and each sand cell costs 3. This reliably finds the shortest path even on winding tracks.
On every move, the bot checks all 9 possible accelerations and scores each one: a move always costs 25 points, and the remaining path cost from the map is factored in at a weight of 10 – so a longer remaining path makes the option worse. Depending on the bot's driving style, further deductions apply: 210 to 340 points for a crash, 9 to 23 points if the move ends in sand. Finally, the resulting speed is also counted, multiplied by a speed factor of 1.0 to 2.4 – so driving faster raises the score slightly, though much less than the other factors.
The bot also looks ahead up to three moves: the costs of up to four consecutive moves are added together, but only the first of these moves is actually driven – the rest only serve to assess the quality of that first decision more realistically.
Of the 9 options, the bot picks the one with the best overall score. Because every bot gets a slightly different driving style, no race feels exactly the same.