| Checkpoint | Mean score | Dots eaten | Maze % | Success rate |
|---|---|---|---|---|
| ep 100 | 852 | 76 / 244 | 31 % | 5 % |
| ep 200 | 1 358 | 115 / 244 | 47 % | 72 % |
| ep 300 | 1 642 | 139 / 244 | 57 % | 85 % |
| ep 1 300 | 2 472 | 191 / 244 | 78 % | 100 % |
| ep 2 300 | 2 383 | 187 / 244 | 77 % | 100 % |
| ep 3 300 | 2 433 | 187 / 244 | 77 % | 100 % |
| ep 4 300 | 2 395 | 186 / 244 | 76 % | 100 % |
| ep 5 300 | 2 454 | 189 / 244 | 77 % | 98 % |
| ep 6 300 ★ | 2 585 | 193 / 244 | 79 % | 100 % |
| ep 7 300 | 2 429 | 189 / 244 | 77 % | 100 % |
| ep 8 300 | 2 213 | 176 / 244 | 72 % | 93 % |
| ep 9 300 | 2 007 | 158 / 244 | 65 % | 83 % |
| ep 10 300 | 2 400 | 184 / 244 | 75 % | 100 % |
★ Peak at ep 6 300. The dip at ep 8 300–9 300 reflects natural DQN oscillation before recovery. Success = scoring ≥ 1 200 points per episode.
| Run | Episodes | Wall time | Best score | Notes |
|---|---|---|---|---|
| Run 1 | 300 | 21 min | 2 160 | ε decayed 1.0 → 0.05; buffer filled |
| Run 2 | 5 000 | 478 min | 4 310 | Resumed from ep 300; ε = 0.05 fixed |
| Run 3 | 5 000 | 590 min | 5 110 | Resumed from ep 5 300; ε = 0.05 fixed |
| Total | 10 300 | ~18.1 h | 5 110 | Single CPU, no GPU |
Input (81 features) │ Pac-Man pos · direction · ghost positions + states + distances │ fright timer · dots remaining · 7×7 local maze window │ Linear(81 → 256) → ReLU │ Linear(256 → 256) → ReLU │ Linear(256 → 4) → Q-values: [ UP DOWN LEFT RIGHT ] 145 000 trainable parameters Optimiser: Adam (lr = 1e-4) Loss: Huber (SmoothL1) Replay buffer: 100 000 transitions Target sync: every 1 000 steps
Astronomical state space
~240 walkable cells × 4 ghost positions × AI states × 2²⁴⁴ dot configurations. The agent must generalise across a state space it can never fully explore.
Sparse & delayed rewards
The level-clear bonus (+100) arrives hundreds of steps after the navigation choices that made it possible — the classic credit-assignment problem.
Deceptive reward landscape
The same tile is worth +1 (safe dot) or −50 (fatal collision) depending on ghost positions and whether a power pellet was recently eaten.
Non-stationary targets
Unlike supervised learning with fixed labels, DQN trains against Bellman targets computed from the same network it is updating — inherently unstable without experience replay and a frozen target network.
No memory
The network receives a single snapshot per step. It cannot remember a ghost's trajectory two steps ago and must re-derive all context from the current frame.
CPU scale
10 million gradient cycles on a single CPU takes ~18 hours. The same training would complete in ~30 minutes on a modern GPU. Every behaviour was discovered from random weight initialisation through pure trial and error.
| Event | Reward |
|---|---|
| Eating a dot | +1.0 |
| Eating a power pellet | +5.0 |
| Eating a ghost (chain: ×1 / ×2 / ×3 / ×4) | +20 / +40 / +80 / +160 |
| Dying | −50.0 |
| Clearing a level | +100.0 |
| Per step (discourages idling) | −0.05 |