We hand each model one frozen prompt and ask it to write a bot for a deterministic light-cycle arena. We did it 10 times per model — 600 matches per bot, 33,600 in all — because doing it once turned out to be mostly luck.
The single-generation leaderboard got the top roughly right and everything below it wrong. The biggest corrections:
If the problem is variance, the fix is selection: generate 10 bots and keep the best. To keep it honest, each bot is picked on screening seeds (1–5) and scored on held-out eval seeds (6–10) — no peeking at the test set. The hollow dot is a typical single draw; the bright dot is what you'd actually ship.
The lift is biggest for the high-variance models — they had the most upside to select toward — and selection compresses the field: the top now sits within a few points. (Fresh, independent generations, so these “typical” numbers differ from the distribution section above.)
| Model | 1st-try valid | ran at all | vs hunter | vs hoarder | vs survivor | vs seeker | vs collector |
|---|---|---|---|---|---|---|---|
| gpt-5 | 10/10 | 10/10 | 90% | 80% | 73% | 69% | 54% |
| gemini-3.5-flash | 1/10 | 7/10 | 90% | 80% | 65% | 64% | 53% |
| gemini-3.1-pro-preview | 5/10 | 10/10 | 86% | 72% | 53% | 55% | 49% |
| claude-opus-4-8 | 10/10 | 10/10 | 86% | 70% | 48% | 48% | 42% |
| gemini-3.1-flash-lite-preview | 9/10 | 9/10 | 80% | 75% | 43% | 42% | 47% |
| gpt-4o | 10/10 | 10/10 | 52% | 44% | 21% | 22% | 25% |
“1st-try valid” = wrote code that passed the safety + smoke gate on attempt 1. Per-opponent = mean win rate vs each reference bot across all valid generations.
How many tries a model needs to pass the safety + smoke gate, and how long it takes to produce a bot. Time is wall-clock to a validated bot, including retries.
| Model | Avg tries to working | 1st-try rate | Gen time (working) | Gen time (all attempts) |
|---|---|---|---|---|
| gemini-3.1-flash-lite-preview | 1.00 | 90% | 3.0s | 3.0s |
| gpt-4o | 1.00 | 100% | 5.2s | 5.2s |
| claude-opus-4-8 | 1.00 | 100% | 28.1s | 28.1s |
| gemini-3.5-flash | 2.00 | 10% | 67.9s | 68.1s |
| gpt-5 | 1.00 | 100% | 70.0s | 70.0s |
| gemini-3.1-pro-preview | 1.50 | 50% | 72.1s | 72.1s |
Each model gets the frozen prompt and writes up to 10
independent bots (create() → decide(view)).
Static scan + smoke run reject unsafe or crashing code.
Every bot plays 600 deterministic 1v1 matches — 5 reference opponents × 6 maps × 10 seeds × both slots.
Seeded RNG makes every match reproducible and replayable as
a .mrec.
Each model received the frozen prompt below as a single message, zero-shot, unedited. Every reply was checked by a static scan plus a smoke run, then played across the fixed lineup: 5 reference opponents × 6 maps × 10 seeds × both spawn positions = 600 deterministic matches per bot, at DUEL (250-cell) arena, 120s rounds, difficulty MOLTRON, classic scoring.
# Moltron bot authoring prompt
You are writing a bot for Moltron, a deterministic neon light-cycle
arena battler. Your bot will play in a tournament against other bots
written by other models. You want to win.
## The interface — write EXACTLY this shape
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
const rng = new Rng((seed ^ (pid * 0x9e3779b1)) >>> 0);
return {
name: '<your-bot-name>',
difficulty,
decide(view) {
// ...
return null; // or an action object below
}
};
}
```
- `create` is called ONCE per round.
- `decide(view)` is called every ~10Hz of game time, in a deterministic loop
shared with the other bots. The simulation only advances after every bot
has decided, so your model's API latency does NOT disadvantage you in-game.
- Return `null` or `{}` for "do nothing this tick."
- DO NOT use `Math.random()`. It breaks deterministic replays. Use the
seeded `rng` (`rng.next()` → float in [0,1), `rng.int(n)` → int in [0,n)).
- DO NOT import anything other than `Rng` from the path above.
- DO NOT use `require`, `process`, `fs`, `child_process`, `eval`, `Function`,
network calls, or any side-effecting I/O. Your bot will be rejected.
## The view your bot receives
```js
view = {
tick, status: 'PLAYING', roundTime,
arena: { cols, rows },
me: {
id, cell:[x,y], dir:'UP'|'DOWN'|'LEFT'|'RIGHT', state:'ALIVE'|'DEAD',
score, shields, missiles, speedMult,
ghost, phase, // booleans: any active i-frame effects
inventory: ['MISSILE_3'|'EMP'|'BOMB'|'ERASER'|'SHIELD'|'GHOST'|'SPEED'|'PHASE'|'RECALL', ...],
inventoryIndex: number,
clearance: { UP, DOWN, LEFT, RIGHT } // open cells straight ahead in each dir
},
opponents: [{ id, cell:[x,y], dir, state }, ...],
powerups: [{ cell:[x,y], type }, ...],
missiles: [{ cell:[x,y], dir, ownerId, isBlaster }, ...] // live missiles in flight
}
```
## The actions your bot can return
```js
{ dir: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // attempt a turn (ignored if it's a 180)
{ fire: true } // deploy current inventory slot
// (MISSILE_*/EMP/BOMB/ERASER/SHIELD/GHOST/SPEED/PHASE/RECALL)
// or fire the blaster if inventory is empty
{ cycle: true } // rotate inventoryIndex to the next slot
{ dash: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // brief speed burst in that direction
{ selectSlot: 0..3 } // pick a specific inventory slot
```
You may combine fields. Returning `null` / `{}` = no action.
## Game rules summary
- Every player leaves a solid trail behind them. Crashing into ANY trail
(yours or someone else's), a wall, or another player kills you.
- A 2-cell gap forms behind your head before the trail solidifies, so
immediate U-turns are deadly. Turns into perpendicular lanes are safe.
- Inventory items:
- `MISSILE_3/2/MISSILE`: fire a missile in your current direction. Multi-charge.
- `EMP`: pulse that briefly makes opponents' trails passable for you.
- `BOMB`: drop a delayed proximity bomb behind you (kills anyone too close).
- `ERASER`: temporarily stop laying trail.
- `SHIELD`: absorb one death.
- `GHOST` / `PHASE`: temporary trail-pass invulnerability.
- `SPEED`: temporary 1.75× speed.
- `RECALL`: erase all of your own trails.
- A missile only kills on near dead-on hits or a close explosion. It does
NOT seek. Lateral passes (>1.5 cells off-axis) miss.
- Score: missile direct hit +500, wall/trail kill +300 (decays to +75 by
~8s old), round survivor +200, death penalty -100. Use `view.me.score`
and rough item-value heuristics to play to win.
## Difficulty knob you receive
`difficulty` is `'ROOKIE' | 'RIVAL' | 'MOLTRON'`. You may use it to
deliberately play worse at lower tiers, but for the tournament we will
run you at MOLTRON. Feel free to ignore it.
## Strategy hints (not required, just hints)
- Survival first: a dead bot scores 0. Always check `clearance[dir]` before
committing to a direction; turn into the more open perpendicular lane
when ahead shrinks below ~3 cells.
- Aim with `aim()`-style math (dot product on facing dir, lateral
distance) before firing. Don't waste missiles on passes.
- Watch `view.missiles` — if one is closing on you (`d < 15`), cycle to
a defensive item (`SHIELD`/`GHOST`/`PHASE`/`ERASER`) and pop it just
before impact (`d < 6`).
- Chase opponents but not at the cost of pocketing yourself in a dead end.
- Powerups are usually worth a small detour, especially MISSILE pickups
when you have no offensive ammo.
## Output format — STRICTLY THIS
Return ONE fenced JavaScript code block containing the complete module.
No prose before or after. No explanation. The first character of your
response should be a backtick.
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
// your bot here
}
```
We hand each model one frozen prompt and ask it to write a bot for a deterministic light-cycle arena. We did it 10 times per model — 600 matches per bot, 35,400 in all — because doing it once turned out to be mostly luck.
| Model | 1st-try valid | ran at all | vs hunter | vs hoarder | vs survivor | vs seeker | vs collector |
|---|---|---|---|---|---|---|---|
| claude-opus-4-8 | 10/10 | 10/10 | 71% | 63% | 48% | 51% | 46% |
| gpt-5 | 10/10 | 10/10 | 65% | 60% | 35% | 36% | 34% |
| gemini-3.1-flash-lite-preview | 9/10 | 10/10 | 47% | 43% | 24% | 22% | 24% |
| gpt-4o | 8/10 | 9/10 | 28% | 22% | 11% | 12% | 14% |
| gemini-3.1-pro-preview | 10/10 | 10/10 | 24% | 18% | 4% | 6% | 6% |
| gemini-3.5-flash | 10/10 | 10/10 | 17% | 11% | 0% | 2% | 4% |
“1st-try valid” = wrote code that passed the safety + smoke gate on attempt 1. Per-opponent = mean win rate vs each reference bot across all valid generations.
Each model gets the frozen prompt and writes up to 10
independent bots (create() → decide(view)).
Static scan + smoke run reject unsafe or crashing code.
Every bot plays 600 deterministic 1v1 matches — 5 reference opponents × 6 maps × 10 seeds × both slots.
Seeded RNG makes every match reproducible and replayable as
a .mrec.
Each model received the frozen prompt below as a single message, zero-shot, unedited. Every reply was checked by a static scan plus a smoke run, then played across the fixed lineup: 5 reference opponents × 6 maps × 10 seeds × both spawn positions = 600 deterministic matches per bot, at DUEL (250-cell) arena, 120s rounds, difficulty MOLTRON, classic scoring.
# Moltron bot authoring prompt
You are writing a bot for Moltron, a deterministic neon light-cycle
arena battler. Your bot will play in a tournament against other bots
written by other models. You want to win.
## The interface — write EXACTLY this shape
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
const rng = new Rng((seed ^ (pid * 0x9e3779b1)) >>> 0);
return {
name: '<your-bot-name>',
difficulty,
decide(view) {
// ...
return null; // or an action object below
}
};
}
```
- `create` is called ONCE per round.
- `decide(view)` is called every ~10Hz of game time, in a deterministic loop
shared with the other bots. The simulation only advances after every bot
has decided, so your model's API latency does NOT disadvantage you in-game.
- Return `null` or `{}` for "do nothing this tick."
- DO NOT use `Math.random()`. It breaks deterministic replays. Use the
seeded `rng` (`rng.next()` → float in [0,1), `rng.int(n)` → int in [0,n)).
- DO NOT import anything other than `Rng` from the path above.
- DO NOT use `require`, `process`, `fs`, `child_process`, `eval`, `Function`,
network calls, or any side-effecting I/O. Your bot will be rejected.
## The view your bot receives
```js
view = {
tick, status: 'PLAYING', roundTime,
arena: { cols, rows },
me: {
id, cell:[x,y], dir:'UP'|'DOWN'|'LEFT'|'RIGHT', state:'ALIVE'|'DEAD',
score, shields, missiles, speedMult,
ghost, phase, // booleans: any active i-frame effects
inventory: ['MISSILE_3'|'EMP'|'BOMB'|'ERASER'|'SHIELD'|'GHOST'|'SPEED'|'PHASE'|'RECALL', ...],
inventoryIndex: number,
clearance: { UP, DOWN, LEFT, RIGHT }, // open cells straight ahead in each dir (raycast)
area // reachable open cells, trail-aware + bounded (~150 = plenty);
// a small number means you're getting boxed in
},
// Local occupancy window CENTRED ON YOU, world-oriented (row 0 = north/UP,
// col 0 = LEFT). `rows` is an array of equal-length strings — join with '\n'
// to read the board as a grid. This is your real 2D vision; the raycasts
// above only see straight lines.
// '@' you '.' empty '#' wall 'o' your trail 'x' enemy trail
// '*' powerup a digit = that enemy's HEAD (their player id)
local: { radius, legend, rows: [ '...', '...', ... ] },
opponents: [{
id, cell:[x,y], dir, state,
speedMult, missiles, shields, ghost, phase, // their threat state (armed? boosting? invulnerable?)
clearance: { UP, DOWN, LEFT, RIGHT }, // (alive only) how boxed-in they are
area // (alive only) their reachable room; small = nearly encircled
}, ...],
powerups: [{ cell:[x,y], type }, ...],
missiles: [{ // live missiles in flight
cell:[x,y], dir, ownerId, isBlaster,
speed, // cells / second (uniform, ~90)
laneOffset, // cells YOU sit off its straight line (0 = dead-on collision course)
etaSecs // seconds until it draws level with you; null once it has passed
}, ...],
// Lethality oracle. sample(x,y) === true means a cycle entering that cell
// DIES — any wall, any trail (yours or theirs), or out of bounds. This is
// the raw obstacle field beneath clearance/area/local: raycast a lane, flood
// a region, or test a whole box coarse-to-fine, at any range you want.
sample: (x, y) => boolean
}
```
## The actions your bot can return
```js
{ dir: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // attempt a turn (ignored if it's a 180)
{ fire: true } // deploy current inventory slot
// (MISSILE_*/EMP/BOMB/ERASER/SHIELD/GHOST/SPEED/PHASE/RECALL)
// or fire the blaster if inventory is empty
{ cycle: true } // rotate inventoryIndex to the next slot
{ dash: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // brief speed burst in that direction
{ selectSlot: 0..3 } // pick a specific inventory slot
```
You may combine fields. Returning `null` / `{}` = no action.
## Game rules summary
- Every player leaves a solid trail behind them. Crashing into ANY trail
(yours or someone else's), a wall, or another player kills you.
- A 2-cell gap forms behind your head before the trail solidifies, so
immediate U-turns are deadly. Turns into perpendicular lanes are safe.
- Inventory items:
- `MISSILE_3/2/MISSILE`: fire a missile in your current direction. Multi-charge.
- `EMP`: pulse that briefly makes opponents' trails passable for you.
- `BOMB`: drop a delayed proximity bomb behind you (kills anyone too close).
- `ERASER`: temporarily stop laying trail.
- `SHIELD`: absorb one death.
- `GHOST` / `PHASE`: temporary trail-pass invulnerability.
- `SPEED`: temporary 1.75× speed.
- `RECALL`: erase all of your own trails.
- A missile only kills on near dead-on hits or a close explosion. It does
NOT seek. Lateral passes (>1.5 cells off-axis) miss.
- Score: missile direct hit +500, wall/trail kill +300 (decays to +75 by
~8s old), round survivor +200, death penalty -100. Use `view.me.score`
and rough item-value heuristics to play to win.
## Difficulty knob you receive
`difficulty` is `'ROOKIE' | 'RIVAL' | 'MOLTRON'`. You may use it to
deliberately play worse at lower tiers, but for the tournament we will
run you at MOLTRON. Feel free to ignore it.
## Strategy hints (not required, just hints)
- Survival first: a dead bot scores 0. The single biggest killer is turning
into a lane that spirals back into your OWN trail — a `clearance` raycast
won't show that. Use `local` to see the 2D board, and `sample(x,y)` to test
cells/lanes/regions yourself: before committing to a turn, verify it doesn't
dead-end you a few cells later (e.g. flood the space reachable AFTER the move,
or scan a small box ahead). Prefer the direction that keeps the most room.
- Space control / encirclement: `me.area` vs each `opponents[].area` is the
space race. When an opponent's `area` is small they're nearly boxed in —
press them toward a wall or their own trail to finish the trap; when YOUR
area shrinks, break for open space early.
- Missile dodge (use the timing, not raw distance): for each `view.missiles`
shot with a small `laneOffset` (roughly on your line) AND a small `etaSecs`
(impact soon), cycle to a defensive item (`SHIELD`/`GHOST`/`PHASE`/`ERASER`)
and pop it a beat before impact. Ignore shots that pass wide (big `laneOffset`).
- Aim with dot-product math (facing dir · offset, plus lateral distance)
before firing. Don't waste missiles on passes.
- Chase opponents but not at the cost of pocketing yourself in a dead end
(check `local` before committing to the chase turn).
- Powerups are usually worth a small detour, especially MISSILE pickups
when you have no offensive ammo.
## Output format — STRICTLY THIS
Return ONE fenced JavaScript code block containing the complete module.
No prose before or after. No explanation. The first character of your
response should be a backtick.
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
// your bot here
}
```
We hand each model one frozen prompt and ask it to write a bot for a deterministic light-cycle arena. We did it 10 times per model — 600 matches per bot, 62,400 in all — because doing it once turned out to be mostly luck.
If the problem is variance, the fix is selection: generate 10 bots and keep the best. To keep it honest, each bot is picked on screening seeds (1–5) and scored on held-out eval seeds (6–10) — no peeking at the test set. The hollow dot is a typical single draw; the bright dot is what you'd actually ship.
The lift is biggest for the high-variance models — they had the most upside to select toward — and selection compresses the field: the top now sits within a few points. (Fresh, independent generations, so these “typical” numbers differ from the distribution section above.)
| Model | 1st-try valid | ran at all | vs hunter | vs hoarder | vs survivor | vs seeker | vs collector |
|---|---|---|---|---|---|---|---|
| gpt-6-astra | 8/10 | 9/10 | 90% | 79% | 58% | 65% | 53% |
| claude-opus-4-8 | 10/10 | 10/10 | 76% | 69% | 52% | 55% | 47% |
| gemini-3.8-flash | 9/10 | 10/10 | 72% | 63% | 51% | 53% | 45% |
| claude-opus-5-5 | 10/10 | 10/10 | 67% | 60% | 47% | 52% | 40% |
| gpt-6-luna | 10/10 | 10/10 | 59% | 54% | 35% | 35% | 31% |
| gpt-5 | 10/10 | 10/10 | 62% | 52% | 29% | 31% | 30% |
| gpt-4o | 9/10 | 9/10 | 44% | 35% | 19% | 20% | 22% |
| claude-haiku-4-5-20251001 | 10/10 | 10/10 | 43% | 38% | 16% | 18% | 21% |
| gemini-3.1-flash-lite | 6/10 | 6/10 | 38% | 32% | 15% | 15% | 18% |
| gemini-3.1-pro-preview | 10/10 | 10/10 | 31% | 25% | 10% | 11% | 13% |
| gemini-3.5-flash | 9/10 | 10/10 | 18% | 14% | 3% | 4% | 5% |
“1st-try valid” = wrote code that passed the safety + smoke gate on attempt 1. Per-opponent = mean win rate vs each reference bot across all valid generations.
How many tries a model needs to pass the safety + smoke gate, and how long it takes to produce a bot. Time is wall-clock to a validated bot, including retries.
| Model | Avg tries to working | 1st-try rate | Gen time (working) | Gen time (all attempts) |
|---|---|---|---|---|
| gemini-3.1-flash-lite | 1.00 | 60% | 4.6s | 6.6s |
| gpt-4o | 1.00 | 90% | 5.4s | 5.9s |
| claude-haiku-4-5-20251001 | 1.00 | 100% | 17.3s | 19.2s |
| gemini-3.8-flash | 1.10 | 90% | 22.8s | 22.8s |
| gpt-6-luna | 1.00 | 100% | 36.3s | 36.3s |
| claude-opus-4-8 | 1.00 | 100% | 38.2s | 38.2s |
| gemini-3.5-flash | 1.10 | 90% | 56.1s | 64.0s |
| gpt-5 | 1.00 | 100% | 84.5s | 84.5s |
| gemini-3.1-pro-preview | 1.00 | 100% | 103.2s | 103.2s |
| claude-opus-5-5 | 1.00 | 100% | 116.6s | 116.6s |
| gpt-6-astra | 1.11 | 80% | 137.7s | 137.7s |
Each model gets the frozen prompt and writes up to 10
independent bots (create() → decide(view)).
Static scan + smoke run reject unsafe or crashing code.
Every bot plays 600 deterministic 1v1 matches — 5 reference opponents × 6 maps × 10 seeds × both slots.
Seeded RNG makes every match reproducible and replayable as
a .mrec.
Each model received the frozen prompt below as a single message, zero-shot, unedited. Every reply was checked by a static scan plus a smoke run, then played across the fixed lineup: 5 reference opponents × 6 maps × 10 seeds × both spawn positions = 600 deterministic matches per bot, at DUEL (250-cell) arena, 120s rounds, difficulty MOLTRON, classic scoring.
# Moltron bot authoring prompt
You are writing a bot for Moltron, a deterministic neon light-cycle
arena battler. Your bot will play in a tournament against other bots
written by other models. You want to win.
## The interface — write EXACTLY this shape
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
const rng = new Rng((seed ^ (pid * 0x9e3779b1)) >>> 0);
return {
name: '<your-bot-name>',
difficulty,
decide(view) {
// ...
return null; // or an action object below
}
};
}
```
- `create` is called ONCE per round.
- `decide(view)` is called every ~10Hz of game time, in a deterministic loop
shared with the other bots. The simulation only advances after every bot
has decided, so your model's API latency does NOT disadvantage you in-game.
- Return `null` or `{}` for "do nothing this tick."
- DO NOT use `Math.random()`. It breaks deterministic replays. Use the
seeded `rng` (`rng.next()` → float in [0,1), `rng.int(n)` → int in [0,n)).
- DO NOT import anything other than `Rng` from the path above.
- DO NOT use `require`, `process`, `fs`, `child_process`, `eval`, `Function`,
network calls, or any side-effecting I/O. Your bot will be rejected.
## The view your bot receives
```js
view = {
tick, status: 'PLAYING', roundTime,
arena: { cols, rows },
me: {
id, cell:[x,y], dir:'UP'|'DOWN'|'LEFT'|'RIGHT', state:'ALIVE'|'DEAD',
score, shields, missiles, speedMult,
ghost, phase, // booleans: is a pass-through effect running
ghostSecs, phaseSecs, // SECONDS OF IT LEFT — see "Pass-through" below
empAffected, // your own trail is currently passable to everyone
inventory: ['MISSILE_3'|'EMP'|'BOMB'|'ERASER'|'SHIELD'|'GHOST'|'SPEED'|'PHASE'|'RECALL', ...],
inventoryIndex: number,
clearance: { UP, DOWN, LEFT, RIGHT }, // open cells straight ahead in each dir (raycast)
area // reachable open cells, trail-aware + bounded (~150 = plenty);
// a small number means you're getting boxed in
},
// Local occupancy window CENTRED ON YOU, world-oriented (row 0 = north/UP,
// col 0 = LEFT). `rows` is an array of equal-length strings — join with '\n'
// to read the board as a grid. This is your real 2D vision; the raycasts
// above only see straight lines.
// '@' you '.' empty '#' wall 'o' your trail 'x' enemy trail
// '!' proximity bomb '*' powerup a digit = that enemy's HEAD (their player id)
local: { radius, legend, rows: [ '...', '...', ... ] },
opponents: [{
id, cell:[x,y], dir, state,
speedMult, missiles, shields, ghost, phase, // their threat state (armed? boosting? invulnerable?)
ghostSecs, phaseSecs, // how long they can keep phasing through YOUR walls
empAffected, // THEIR trail is currently harmless
clearance: { UP, DOWN, LEFT, RIGHT }, // (alive only) how boxed-in they are
area // (alive only) their reachable room; small = nearly encircled
}, ...],
powerups: [{ cell:[x,y], type }, ...],
// Armed and arming proximity bombs near you. You need this list: a bomb is
// NOT a one-cell hazard you steer around. Coming within `triggerRadius`
// detonates it, and everything inside `blastRadius` dies — a blast wider
// than the `local` window itself, so a bomb you cannot see can kill you.
bombs: [{
cell:[x,y],
dist, // Chebyshev cells from you — compare against triggerRadius
armed, // false = still arming, cannot detonate yet
triggerRadius, // get this close and it goes off
blastRadius // everything within this dies
}, ...],
missiles: [{ // live missiles in flight
cell:[x,y], dir, ownerId, isBlaster,
speed, // cells / second (uniform, ~90)
laneOffset, // cells YOU sit off its straight line (0 = dead-on collision course)
etaSecs // seconds until it draws level with you; null once it has passed
}, ...],
// Is that cell OCCUPIED? true for any wall, any trail, a bomb, or out of
// bounds. This is the raw obstacle field beneath clearance/area/local:
// raycast a lane, flood a region, or test a whole box coarse-to-fine, at any
// range you want. It reports the board, not your situation — see `lethal`.
sample: (x, y) => boolean,
// Would entering that cell kill YOU, right now? Same field as `sample`, but
// it applies the three rules that make "occupied" and "fatal" different
// things: your own GHOST/PHASE timer, an EMP'd player's inert trail, and the
// fact that the arena boundary kills you no matter what you are holding.
// Grid-based, so it does not know about enemy heads or their pending exhaust
// (use `opponents[]`), and a bomb kills from `triggerRadius` away, not just
// on its own cell.
lethal: (x, y) => boolean,
// What is actually in that cell, WITH OWNERSHIP. `local` draws every enemy
// trail as the same 'x' and `sample`/`lethal` are booleans, so this is the
// only way to tell whose wall you are looking at — which is what makes
// `opponents[].empAffected` usable.
cellAt: (x, y) => ({
kind: 'empty'|'trail'|'obstacle'|'bomb'|'oob',
owner, // player id for a trail, else null
overlap // true if two trails share the cell
})
}
```
## The actions your bot can return
```js
{ dir: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // attempt a turn (ignored if it's a 180)
{ fire: true } // deploy current inventory slot
// (MISSILE_*/EMP/BOMB/ERASER/SHIELD/GHOST/SPEED/PHASE/RECALL)
// or fire the blaster if inventory is empty
{ cycle: true } // rotate inventoryIndex to the next slot
{ dash: 'UP'|'DOWN'|'LEFT'|'RIGHT' } // brief speed burst in that direction
{ selectSlot: 0..3 } // pick a specific inventory slot
```
You may combine fields. Returning `null` / `{}` = no action.
## Game rules summary
- Every player leaves a solid trail behind them. Crashing into ANY trail
(yours or someone else's), a wall, or another player kills you.
- A 2-cell gap forms behind your head before the trail solidifies, so
immediate U-turns are deadly. Turns into perpendicular lanes are safe.
- Inventory items:
- `MISSILE_3/2/MISSILE`: fire a missile in your current direction. Multi-charge.
- `EMP`: pulse that briefly makes opponents' trails passable for you.
- `BOMB`: drop a delayed proximity bomb behind you (kills anyone too close).
- `ERASER`: temporarily stop laying trail.
- `SHIELD`: absorb one death.
- `GHOST` / `PHASE`: temporary trail-pass invulnerability.
- `SPEED`: temporary 1.75× speed.
- `RECALL`: erase all of your own trails.
- A missile only kills on near dead-on hits or a close explosion. It does
NOT seek. Lateral passes (>1.5 cells off-axis) miss.
- Score: missile direct hit +500, wall/trail kill +300 (decays to +75 by
~8s old), round survivor +200, death penalty -100. Use `view.me.score`
and rough item-value heuristics to play to win.
## Pass-through: what GHOST and PHASE actually do
While `ghostSecs` or `phaseSecs` is above zero, trails and obstacles stop
killing you and you can drive straight through them. Three things follow, and
getting them wrong is how a pass-through bot dies:
- **`clearance` does not know.** It reports the board, so it reads `0` through a
wall you could currently cross. A heading with zero clearance can be the best
move on the board while the timer runs. Use `lethal(x, y)`, which accounts
for it, or check the timer yourself.
- **The seconds are the whole point, not the boolean.** What matters is whether
you can be back on open ground BEFORE the timer lapses — expiring inside a
wall kills you. At ~11 cells/second, a trail three cells away is ~0.27s away,
so with 0.1s left it is still fatal. Walk the heading until you find open
ground and check the time you need against the time you have, with margin.
- **The arena boundary is never waived**, and neither are enemy heads or the
one-to-two cells of pending exhaust behind them. Bombs are not waived either.
`EMP` is the same idea pointed at someone else: while an opponent's
`empAffected` is true THEIR trail is inert, for everyone. `cellAt(x, y).owner`
tells you whose trail a cell belongs to, which is what makes that actionable.
## Difficulty knob you receive
`difficulty` is `'ROOKIE' | 'RIVAL' | 'MOLTRON'`. You may use it to
deliberately play worse at lower tiers, but for the tournament we will
run you at MOLTRON. Feel free to ignore it.
## Strategy hints (not required, just hints)
- Survival first: a dead bot scores 0. The single biggest killer is turning
into a lane that spirals back into your OWN trail — a `clearance` raycast
won't show that. Use `local` to see the 2D board, and `lethal(x,y)` /
`sample(x,y)` to test cells/lanes/regions yourself: before committing to a
turn, verify it doesn't dead-end you a few cells later (e.g. flood the space
reachable AFTER the move, or scan a small box ahead). Prefer the direction
that keeps the most room.
- Bombs: check `view.bombs` before every turn, not just the cell ahead. Treat
each armed bomb as a forbidden BOX of radius `triggerRadius`, because merely
entering it detonates the thing — `clearance` will happily report the open
cells leading right up to one. If you are already inside `blastRadius`, the
move that maximises distance is the move.
- Space control / encirclement: `me.area` vs each `opponents[].area` is the
space race. When an opponent's `area` is small they're nearly boxed in —
press them toward a wall or their own trail to finish the trap; when YOUR
area shrinks, break for open space early.
- Missile dodge (use the timing, not raw distance): for each `view.missiles`
shot with a small `laneOffset` (roughly on your line) AND a small `etaSecs`
(impact soon), cycle to a defensive item (`SHIELD`/`GHOST`/`PHASE`/`ERASER`)
and pop it a beat before impact. Ignore shots that pass wide (big `laneOffset`).
- Spend pass-through on something decisive. A `GHOST`/`PHASE` window is 4
seconds of being able to cut straight across the board through walls that
everyone else has to go around — use it to escape a closing pocket or to take
a line no one can follow, not to drift.
- Aim with dot-product math (facing dir · offset, plus lateral distance)
before firing. Don't waste missiles on passes.
- Chase opponents but not at the cost of pocketing yourself in a dead end
(check `local` before committing to the chase turn).
- Powerups are usually worth a small detour, especially MISSILE pickups
when you have no offensive ammo.
## Output format — STRICTLY THIS
Return ONE fenced JavaScript code block containing the complete module.
No prose before or after. No explanation. The first character of your
response should be a backtick.
```js
import { Rng } from '../../src/core/rng.js';
export function create({ seed = 1, pid = 0, difficulty = 'RIVAL' } = {}) {
// your bot here
}
```