Skip to content
All projects

In development · 2026

DQN Pac-Man Agent

Deep Q-Network learning Pac-Man from raw state, with a PPO comparison planned.

The problem

Pac-Man punishes greedy policies: reward is sparse, ghosts make the environment non-stationary, and naive Q-learning oscillates.

What I built

A Deep Q-Network with replay buffer, target network, and epsilon-greedy scheduling learning from raw state, set up so a PPO baseline can be compared under identical conditions.

Stability before score

The first runs diverged, as DQN usually does without help. The replay buffer and a periodically-synced target network are the two changes that turned a noisy value function into one that trends.

Why add PPO

A value-based and a policy-gradient method failing differently on the same environment is more informative than one method scoring well. The comparison runs under identical reward shaping and wall-clock budget.

Outcome

  • Replay buffer + target network for stability
  • Epsilon-greedy schedule tuned for sparse reward
  • PPO comparison planned against the DQN baseline

Stack

PythonPyTorchReinforcement Learning

Data flow

DQN training loop

  1. 1

    Environment

    Pac-Man, raw state observations

  2. 2

    Replay buffer

    Decorrelates sequential experience

  3. 3

    Q-network

    PyTorch value estimator

  4. 4

    Target network

    Periodically synced, stabilizes bootstrapping

  5. 5

    Epsilon-greedy

    Scheduled exploration decay

  6. 6

    PPO baseline

    Planned side-by-side comparison

PythonPyTorchReinforcement Learning

This diagram is generated from portfolio.ts. Edit the `architecture` field to change it.

Want the deeper version of this?

I am happy to walk through the tradeoffs, the failure modes, and what I would do differently.

Email me