How Regatta works

A fleet of 4.2 m dinghies races a short windward-leeward course. Every boat is steered by a rule-based skipper that sees the same snapshot of the world every few seconds and replies with helm and sail settings. No language model or machine learning runs in the browser.

The decision contract

Every decision tick (5 s by default, 1 to 10 s in the race settings) each skipper receives a WorldState: its own position, heading, speeds and wind angles, the local wind and its last minute of history, the course and the next mark, every other boat, distances to hazards, and the start countdown. It returns a Command with a rudder setting from -1 to 1, main and jib sheet settings from 0 to 1, and an optional note. That command then holds unchanged until the next tick. A skipper that turns hard has to know how far the boat will turn in five seconds, because nobody straightens the helm for it.

The telemetry panel shows the exact WorldState delivered at the last tick and the Command that came back, so you can watch the contract work. The same interface accepts an external skipper (for example a model behind an HTTP endpoint); the engine waits up to one tick for its answer. The full shape is documented in docs/SKIPPER_API.md in the source repository.

Boat physics

Wind

The wind oscillates around its base direction (plus or minus 12 degrees over about four minutes by default) with smoothed noise on top, and can drift persistently. Gusts and lulls are patches of 15 to 40 percent more or less wind that drift downwind at the wind speed; they show as darker or lighter water. Each boat also casts a wind shadow: a cone five boat lengths long downwind of it where the wind is down to 70 percent.

Course and hazards

The start line runs 60 m between the committee boat and a pin. The windward mark is 500 m upwind and is left to port; the leeward mark sits 50 m below the line. Two laps, finishing upwind through the start line. Rounding is detected by crossing a sequence of invisible gates around the mark in the right direction, so cutting the corner does not count. Leaving the dashed boundary for more than 10 s is a DNF, and touching the sand (a bar off the windward mark and a rocky shore to the east) runs the boat aground for good.

The three skippers

All three run the same code with different features switched on and different noise.

BehaviourNoviceClub racerPro
UpwindStraight at the mark, else a fixed 50 degrees; tacks 25 degrees past the laylineBest upwind angle from the polar; tacks on the layline plus 5 degreesBest VMG to the mark in the local wind; tacks on headers over 6 degrees and toward more pressure
DownwindStraight at the markBest downwind angle, gybes on the laylineBest VMG, gybes on the layline or toward pressure
SteeringRudder proportional to heading error, no allowance for the tick, plus random noisePlans a constant rudder that lands on the intended heading at the end of the tickSame planner, no noise
Sail trimThree settings: upwind, reaching, runningIdeal table plus or minus 0.05Ideal, eased slightly for two ticks after each tack
HazardsHard turn only within two boat lengthsLooks 20 s ahead and tacks or bears away earlyLooks 30 s ahead
Other boatsIgnores themDucks or tacks when it must give waySame, cuts crossings finer, avoids dirty air and covers the nearest rival on the last beat
StartHeads for the line 20 s before the gun from wherever it isTimed run-in on starboard to the middle of the lineTimed run-in to the favoured end, aiming to cross under a second after the gun

The tiers were tuned with a headless batch of 200 seeded races, two boats per tier, on the default course. In that batch the Pro finished ahead of the Club racer in 87.8 percent of head-to-head pairings and the Club racer ahead of the Novice in 99.1 percent. A Novice ran aground in 28 percent of races, and no Novice finished within the time limit of five minutes after the winner. The Pro averaged 1492 s round the course and the Club racer 1585 s.

Controls

Tick I will sail a boat in the race settings to take the helm. Your inputs apply 20 times a second, not on the decision tick, which is a real advantage over the computer skippers: they commit to a setting for a whole tick.

KeyAction
A / D or arrow keysRudder to port / starboard while held; it self-centres on release
ShiftHold the helm where it is
SpaceCentre the helm
W / STrim the main in / ease it
Q / ETrim the jib in / ease it
XEase both sheets while held
TAuto-trim on or off (sheets follow the ideal table)
TabCamera: own boat or whole course
1 2 3Playback speed 1x, 4x, 16x
P / RPause / restart the race

On a phone, turn it sideways: buttons appear for the helm and the sheets. Drag to pan, pinch or scroll to zoom, and tap a boat or a leaderboard row to inspect its telemetry.

Replays

Every race records all boat states once a second and every decision with a hash of the WorldState it was based on. At the finish you can watch and scrub the replay, download it as JSON, and load it again later. A race with the same seed and settings replays identically.

How this was made

Regatta was written with an AI coding assistant (Claude Code) from a written specification, then tested with an automated test suite and tuned with the batch script described above. All figures on this page come from that batch run. The site uses no cookies, analytics or third-party scripts, and nothing you do here leaves your browser.