Automate the kitchen. Top scores earn automatic admission to Hack the 6ix 2026.
Five chefs, one grid kitchen. Orders arrive at reception stands listing the ingredients and states required. Your code drives the chefs with KitchenAPI.command(chefId, stationId).
The first minute is playable by hand. After that, your code takes over. Three expired orders ends the run.
KitchenAPI.run(fn).KitchenAPI.start().String. Current value: "2.0.0".
Registers fn to run once per frame. Signature: fn(state, api, tick) where state is a fresh getState() snapshot, api is KitchenAPI, tick is { dt, time }. Survives start() and restarts. Calling run() again replaces the previous function.
Unregisters the function set by run(). Does not stop the game.
Registers an async function that runs on its own cadence (default everyMs: 1000, clamped 100 to 60000). Signature: fn(state, api) → Promise<policy>. Its return value becomes state.policy and is returned by getPolicy(). Re-entrant calls are skipped. The last good policy is preserved on error.
Unregisters the planner and clears state.policy.
Returns the latest plan() output, or null.
Starts or restarts the game. Resets stations, chefs, orders, and score. Clears raw event listeners. The function registered via run() survives.
Toggles the pause state. Syncs with the in-game Pause button.
Routes the chef to a walkable tile next to the station and triggers the same interaction as a click. Returns { success, error? }. Chef IDs: 0 to 4. Station IDs: strings like 'bin_3', 'stove_0', 'reception_2'. See the Station ID Reference.
Brief movement speed boost with a cooldown. Same as pressing B.
UI selection only. Does not move the chef.
Removes all event listeners registered via on() / onTick(). The run() function is re-attached automatically.
Returns a plain snapshot of the game state.
Returns an array of recipe metadata: { name, icon, difficulty, components }.
Each registration returns an unsubscribe function: const off = KitchenAPI.onTick(fn); off();
| Method | Event | Payload |
|---|---|---|
on(name, fn) | generic | varies |
onTick(fn) | tick | { dt, time } |
onOrderSpawned(fn) | orderSpawned | { id, dish, timeLeft, standId, components } |
onOrderExpired(fn) | orderExpired | { id, dish, standId } |
onOrderDelivered(fn) | orderDelivered | { id, dish, score, streak } |
onOrderFailed(fn) | orderFailed | { dish } |
onPhaseChanged(fn) | phaseChanged | { phase } |
onRushBurst(fn) | rushBurst | { count } |
onGameOver(fn) | gameOver | { score, time, bestStreak } |
| Station | ID pattern | Count |
|---|---|---|
| Ingredient bin | bin_0 to bin_5 | 6 |
| Stove | stove_0 to stove_2 | 3 |
| Cutting board | cutting_0, cutting_1 | 2 |
| Plating area | plating_0 to plating_3 | 4 |
| Trash | trash_0 | 1 |
| Counter | counter_0 to counter_N | ~15 |
| Reception stand | reception_0 to reception_4 | 5 |
| Dish | Components (ingredient, state) |
|---|---|
| Salad | lettuce chopped, tomato chopped |
| Steak | meat cooked |
| Burger | meat cooked, dough raw |
| Pizza | dough cooked, tomato chopped, cheese raw |
| Deluxe Burger | meat cooked, dough raw, onion chopped |
| Feast Platter | meat cooked, lettuce chopped, tomato chopped, cheese raw |
| Supreme Pizza | dough cooked, tomato chopped, onion chopped, cheese raw |
How each ingredient reaches its target state, and the order in which it joins the plate, is yours to discover.