How maaxxe/projet_gymnasium works
This repository contains separate custom DQN training projects for Donkey Kong and Ms. Pac-Man, plus a small random-action Atari demo. The main workflows collect game transitions, train agents from replay memory, and save models; Ms. Pac-Man additionally shapes rewards and trains Pac-Man and four simulated ghost agents. The graph follows the sampled training code and README’s stated Gymnasium/ALE context. Ms. Pac-Man’s network and replay-buffer implementations were not sampled, so their internal wiring is shown only where imports and calls support it.
Main entry points: ms_pacman/run.py Multi-agent loop · Donkey_Kong/run.py Training loop · agent.py DQN agent · mspacman_env.py Environment setup
Components 19
Donkey Kong
- Training loop
Donkey_Kong/run.py - Frame preprocessing
Donkey_Kong/wrapper.py - DQN agent
Donkey_Kong/agent.py - Q networks
Donkey_Kong/dqn_self.py - Replay memory
Donkey_Kong/replay_buffer.py - Saved model
Donkey_Kong/donkey_kong_dqn.pth - Manual play
Donkey_Kong/DK.py
Ms Pac-Man
- Multi-agent loop
ms_pacman/run.py - Environment setup
ms_pacman/mspacman_env.py - Wall detection
ms_pacman/wall_avoid_wrapper.py - DQN agents
ms_pacman/agent.py - Q network
ms_pacman/dqn_self.py - Replay memory
ms_pacman/replay_buffer.py - Reward shaping
ms_pacman/reward_shaping.py - Agent checkpoints
ms_pacman - Episode progress
ms_pacman/progression.txt
Atari Demo
- Random-action demo
atari.py
Other components
- User
- Gymnasium ALE
Connections 21
- User → Training loop: starts training
- Training loop → Frame preprocessing: creates environment
- Frame preprocessing → Gymnasium ALE: wraps game
- Training loop → DQN agent: selects and trains
- DQN agent → Q networks: evaluates and updates
- DQN agent → Replay memory: stores and samples
- Training loop → Saved model: loads and saves
- User → Multi-agent loop: starts training
- Multi-agent loop → Environment setup: creates environment
- Environment setup → Wall detection: wraps actions
- Environment setup → Gymnasium ALE: wraps game
- Multi-agent loop → DQN agents: selects and trains
- DQN agents → Q network: evaluates and updates
- DQN agents → Replay memory: stores and samples
- Multi-agent loop → Reward shaping: shapes rewards
- Multi-agent loop → Agent checkpoints: loads and saves
- Multi-agent loop → Episode progress: reads and writes
- User → Random-action demo: starts demo
- Random-action demo → Gymnasium ALE: steps game
- User → Manual play: starts manual play
- Manual play → Gymnasium ALE: opens game