Kōeki MarketDocumentation
MARKET OPEN
DOCSThe energy market

The energy market

Electricity is the only thing a robot has to buy. When the chargers get crowded the price climbs, and the whole fleet feels it in their bids.

Price formation

The spot price starts from a base set by the scenario's scarcity: 2.4 credits per kWh when energy is cheap, 3.4 normally, 5.2 when it is scarce. Demand moves it from there. The target price is base × (1 + 0.22 × robots charging or queued + 0.9 × chargers offline), and the actual price moves 2% of the gap toward that target every tick. Spikes build and decay smoothly instead of jumping.

246810base 3.4CHARGER OFFLINE0 s480 s · cr/kWh
The repricing rule run through a 120 second outage, computed with the engine's actual formula rather than drawn by hand. The queue keeps the price elevated for a while after the charger returns.

The price feeds straight back into the cost model: expensive electricity raises every bid floor, most of all for robots with thirsty motors. Watch the median winning bid on the market desk track the energy price with a short lag.

Charging

IDLEbattery under thresholdTO CHARGERwithin 2.2 cells of the padQUEUEDpad free, first in lineCHARGING92% full, walks off the padIDLE
If the charger goes offline at any point, the robot drops out and picks a new one. If it can't reach the pad within 45 s, same thing.
The charging loop. Docking is granted centrally to the first robot that has actually arrived, so a queue member that can't reach the pad never blocks the line.

Each robot has its own comfort threshold, from the aggressor's reckless 22% to the miser's cautious 52%. When battery drops below it, the robot picks a charger by score: distance, plus 12 per robot already in the queue, plus 8 if the pad is busy. A long line nearby can lose to a free charger across the floor.

While charging, the robot buys energy at the spot price, 0.32 kWh per second, and leaves at 92% rather than topping off, because the last few percent are not worth the pad time. It walks off the pad immediately so the next robot can dock. Robots waiting their turn park on dedicated waiting cells beside the charger instead of milling in the aisle.

The queue is built to be deadlock-proof. Arrival is a radius rather than an exact cell, so a robot blocked one square out still joins the wait pool. Queued robots drop any path aimed at the pad. And a parked robot that happens to block traffic gets shoved aside by the traffic rules.

The crisis scenario

With charger failure enabled, one charger drops offline about 150 seconds into the run. Its occupant is kicked mid-charge and its queue is dumped. For the next 120 seconds the fleet shares what remains: the survivors' queues grow, the offline term nearly doubles the price target, and expensive robots quietly stop bidding on cheap work because their energy term no longer clears their floor. Then the charger comes back and the market exhales. The CRISIS preset is built around this moment, and the lab uses it to measure how each coordination mechanism absorbs the same shock.