The SDK map generator builds the maze; four personality ghosts score every open
direction with their own reward weights — pursue, cut-ahead, patrol, retreat.
A genuine tie goes to the engine as a real choice; frightened retreat is a rule,
and the trace line names which rung answered every single move.
What decides what
The maze and the rules are pure code. The SDK generator
carves the corridors — same seed, same maze, bit for bit — and pellets,
lives, and fright timers are plain arithmetic.
Personalities decide the ghosts. blinky pursues, pinky
cuts ahead, inky patrols, clyde wavers: each scores the open directions
with its own weights, exactly like Pong's reward sliders.
The engine breaks genuine ties. When two directions
score exactly equal, that tie is a real choice request with
the ghost's weights in the state — abstention falls back to the argmax.
Fright is a labelled rule. After a power pellet the
retreat is code, never a choice — and eaten ghosts path home by BFS.
The trace line names the rung behind every move.
Honest edges
The engine never moves a ghost that didn't tie — with the engine off you
get the same argmax the weights always produced, marked on the trace.
The scoreboard is session-only — close the tab and it is gone. No
server, no accounts, nothing leaves the page.
The bot player is a readable greedy — nearest pellet, threat-penalized
steps — not a secret strong solver.
Ghosts never reverse by rule (classic AI); at a dead end reversing is
the only open direction, and the code takes it without drama.