Kōeki MarketDocumentation
MARKET OPEN
DOCSQuickstart

Quickstart

Clone it, run it, open the trading floor. The whole thing is one Next.js app with a deterministic engine inside.

Run it

$ npm install
$ npm run dev
▲ Next.js · http://localhost:3000

The landing page already has the simulation running behind it. OPEN THE MARKET drops you onto the floor.

Runs are seeded with a mulberry32 generator, so the same seed and config replay the exact same session, tick for tick. That determinism is what makes the lab comparisons and the stress suite possible.

Scenario presets

Three presets on the floor reset the engine into a known configuration. Each one exists to make something specific easy to watch.

PRESETSETUPWATCH FOR
CALM8 robots, 6 tasks/min, 2 chargers, normal energy, no failuresSingle auctions playing out end to end. The best preset for learning the bid fan.
RUSH12 robots, 14 tasks/min, 3 chargers, normal energyThe market at full throttle: crowded aisles, fast tape, congestion heat.
CRISIS10 robots, 10 tasks/min, 2 chargers, scarce energy, a charger fails mid-runPrices repricing the fleet in real time when capacity halves.

Controls on the floor

Speed runs from 0.5x to 4x, and pause stops the whole market (the TICK counter in the top bar freezes with it). Overlays paint the floor: CONGESTION shows the crowding field that robots route around, TASK VALUE shows where the money is. Click a robot to open its inspector, which includes the cost breakdown from its last bid. Click a task to see the standing bids. FOLLOW locks the camera to a robot; the sound button at the bottom of the tool rail controls the voice pack.

The stress suite

$ npm run stress
seed=1 r=8 rate=8 normal: done 214/230 fail 4 exp 2 …
ALL INVARIANTS PASS

The suite runs four scenarios for 30 sim-minutes each, headless, and checks the invariants that matter: no non-finite balances or positions, no robot stuck in a moving phase for more than 90 seconds, no ghost entries in charger queues, no task left open longer than 200 seconds. It exits nonzero on any failure, so it works as a CI gate.