Note: Turns out the intended answer to this doesn't work after all (see comments to Sconibulus's answer). The rules have been changed slightly after the fact to ensure there can be valid answers (see extra rule #1). Anyone who's tried to solve this, I apologize for the time wasted. I should have verified this properly before posting.
Racetrack is a paper-and-pencil game where two or more players race around a track drawn on grid paper. The game uses vectors to represent each player's movement.
- The track has a start line which also works as the finish line. Every player starts in the same direction. The first player picks their spot on the starting line first, then the second player and so on. Whoever first crosses the finish line from the other side wins. Touching the finish line is not enough – you need to be able to cross over the line with a legal move. If multiple players cross the finish line with the same number of moves, the game is a draw.
- Players take turns moving. The first move is one square forward from the start line. On following turns, the player can proceed the same number of squares in the same direction as their previous turn – this point is called the principal point. Alternatively, they can choose any of the 8 neighbouring points next to the principal point (see image below).
- A player may stop completely if the car's current location is a neighbour to the principal point. In this case, the player simply passes their turn. On the next move, the new principal point is the car's current location.
- Driving through a wall or another car is not allowed. Crossing an opponent's line is fine, but a player cannot drive through (or into) the exact point currently occupied by another car. If a player has no legal moves, they crash and lose the game.
An example of possible moves. The black arrow represents the player's previous turn. The dark blue point is the principal point; it and its eight neighbours are all legal choices for the next move.
Image credit: Nø, CC BY-SA 4.0
Extra rules specific to this puzzle:
- There are three players. The second player gets a handicap – instead of starting with a move of length one, they can start with a move to any of the eight neighbours of a possible starting point, except those on the starting line,1 as long as the move is otherwise legal. However, they can't start from the same spot on the start line as another player. Players 1 and 3 get no handicap and start normally.
- Assume all players play optimally, with winning as their first priority and minimizing the number of moves needed to cross the finish line as the second.
1 (This part was added two weeks after the puzzle was posted.)
Example 1. A trivial win for player 1 (yellow).
Example 2. A draw between players 1 and 2. Player 1 crosses the finish line first, but both take the same number of turns to cross the finish line so the game is a draw.
Example 3. A win for player 2 (red). There are multiple ways to win; two are shown here.
Design a track where, with best play, player 3 wins.