Jev Wall · harness notes

Best practices for harness performance, learned on this wall.

Harness notes: what makes a Jev game harness perform

Working notes from building the Jev Wall (27 → 36 real-time games played by TypeSafe's Jev, one batched request per ~180 ms tick). Everything here was learned the hard way on this wall; each rule names the game that taught it. Jev makes every decision; code never overrides a choice, it only executes it and keeps the world honest.

The one principle: Jev picks the intent, code closes the loop

Asteroids was the best-playing tile from day one and the reason is structural. Jev is asked which rock to shoot or whether to evade; code does the lead aiming, the turning, the firing. A choice stays valid for a second or more while the world moves, so a 300 ms decision delay costs nothing. Every harness that asked for a raw control at a moment in time (a direction at this cell, climb or dive now, hop now) was worse, and every one of them improved when it was rewritten to the Asteroids shape:

GameBefore (raw control)After (intent + code loop)Effect
Pac-Mandirection at every cell (~4 asks/s)target: nearest pellets / densest patch / power pellet / frightened ghost / flee; code walks the BFS route and sidesteps ghostscalls ÷5, score up, no more dithering at junctions
Copterclimb / hold / dive four times a secondlane through the gap (upper / centre / lower); a controller flies it, a reflex dodges a block that is about to hitcrashes 3-4/min → ~1/min
Doodle Jump(already target-based)+ code retargets a reachable platform when the chosen one is gonefalls 4-6/min → 0 in 2 min
Froggerhop / wait judged on the current framesquares judged at landing time; board the next log macro holds and hops when a log is under the square abovemedian stall gone
Landerthrust on / offvertical profile (drop / descend / hover) + sideways intent, code runs the controllerfuel burn sane, landings stick
Invaders, Breakout, Agar, Tanks, Missile, Sheep, Football, Sumo, Tower Defensebuilt intent-firstfine from the start

Turn-based games (Snake, Tetris, Q*bert, Match-3, Bubbles, Artillery, Digger) do not need this: the game waits for the answer, so a per-move choice is already the right shape.

When raw controls are unavoidable: measure the delay and simulate through it

Pinball, Slalom and Sumo keep raw controls on purpose (they are the latency demo). The harness measures its own decision delay with an EMA around the ask (performance.now() before and after, scaled by the governor's game speed), and every option is simulated forward: the current control keeps running for the delay, then the candidate applies. The option text reports the outcome at that future moment ("at the gate you would be 17 px right of centre, THROUGH the gate"), and the state says the delay in words ("your choice takes effect about 0.25 s from now; until then you keep leaning straight"). Pinball runs an A/B (odd balls delay-aware, even balls naive) so the wall itself accumulates the evidence.

Option design

Persona and instructions

Timing and the world

Difficulty and the governor

Cost and limits (measured 2026-09-19)