We want to race programs that AIs wrote, without trusting those programs. A program should not reach the internet, the host or anything outside its race. Every driver should decide from the same moment of the race. A program that breaks should lose only its own car.
The host runs each race inside a Vercel Sandbox, a virtual machine that we create for the race and throw away afterwards. We create it with no network access and give it none of the host’s credentials. The host copies the chosen programs into the sandbox, checks the copies and starts the race there.
Inside the sandbox, each driver runs in a worker of its own. The race loop shows every driver the same race state, collects their decisions and then advances the race.
The sandbox holds only what one race needs
A race uses the programs that were chosen for it. A plan fixes those programs in advance. One run of the plan is called an attempt, and each attempt has its own sandbox and its own recording.
The host fetches exactly the submissions the plan names, never a newer or an older version. It copies the runtime and the programs into the sandbox, and then reads back every file it copied. Every file must match its expected length and SHA-256 before launch.
We set the isolation when we create the Sandbox. It has none of these:
- Outbound network access.
- Exposed ports or mounted Drives.
- Host credentials.
The sandbox is created with persistence turned off, and the host never resumes a stopped one.
A retried launch does not start the race twice
The reply to a launch request can get lost while the race it started keeps running. A retry of that request must not start a second race.
So the host saves its intent to launch before it sends the request. On later polls, it retries a launch that was never confirmed, with the files already in the sandbox.
Before the launch command loads the runtime, it creates a marker file, in a way that fails if the file already exists. The marker stays after the race process, the process that runs the race, has finished. So it is the marker that guarantees the race starts at most once.
Once the host has tried to launch, a missing or stopped sandbox makes it cancel the attempt. It never launches the drivers again in that case. After the cleanup and a wait of 30 s, the scheduler may start a new attempt with the same plan, in a new sandbox. An event can have up to three attempts. When they are used up, the host abandons the event without a winner.
Every driver sees the same race state before it decides
Every driver decides from the same race state. We build every observation from one capture of the race, taken before any driver runs, and each worker receives a copy. So no live race state reaches a driver, and no rival’s control does either.
The runner accepts 2–8 cars and creates one worker per driver. The loop waits for the decisions of all active drivers before the simulator advances. A slow worker delays the step for everyone.
Each step, called a tick, advances simulated time by 1/60 s. The loop has no timer to pace it. It runs as fast as the decisions come back, which can be faster or slower than real time.
The controls a driver returns are not used in the current step. The loop saves them and passes them to the simulator in the next step.
A race on the host begins with a countdown of 180 ticks, 3 s of simulated time. The drivers run on every countdown tick, but during the countdown the simulator does not apply controls.
A faulty driver loses its own car
A fault in a driver’s own program can retire that one car. A failure on the host’s side cancels the whole attempt, and the host does not name a winner from it.
Retiring a car records a DNF, a race that does not finish. The car makes no more decisions, and its pose no longer changes.
| What went wrong | Result |
|---|---|
| A fault in the program itself | Retire that car. |
| Start-up takes longer than its 15 s limit | Retire that car. |
| Successful decisions add up to more real time than the time budget | Retire that car. |
| 1,800 ticks, 30 s of simulated time, go by without the car making progress | Retire that car. |
| The car has not finished after 36,000 ticks, 600 s of simulated time | Retire that car. |
| A worker error, a failure in the host’s setup, or the step watchdog running out | Cancel the attempt. |
| The execution deadline passes, an identity does not match the plan, or the recording is invalid | Cancel the attempt. |
We add up the real time of all successful decisions. Each call can be on time and the calls together can still use up the time budget. This is elapsed time, not CPU use, so the result of this rule depends on the host.
The step watchdog is the timer that waits for a worker’s reply. Its normal time limit is 100 ms. It rejects a reply that arrives 500 ms or later after the request was sent.