How kieranram/minesweeper_rl works
This repository is a Minesweeper reinforcement-learning agent: it repeatedly plays a generated board, learns action values from logged outcomes, and periodically evaluates and saves the model. Its runtime has two substantial components, so the graph focuses on their actual responsibilities rather than introducing unsampled stages. The README documents convolutional value estimation, epsilon-guided training, replay sampling, testing, board-size transfer, and game visualization; the code excerpts show the agent/environment calls and model operations. Model artifacts are present in the tree, but their loading and use are not linked here without further evidence.
Main entry points: network.py DQ sweeper · minefield.py Board and rules
Components 8
Learning agent
- DQ sweeper
network.py - Training log
network.py - Convolutional Q-network
network.py - Test evaluation
network.py - Game visualization
network.py
Minesweeper environment
- Board and rules
minefield.py - Board state
minefield.py
Other components
- Training run
Connections 9
- Training run → DQ sweeper: starts training
- DQ sweeper → Board and rules: primes and steps
network.py - Board and rules → DQ sweeper: returns observations
network.py - Board and rules → Board state: updates
minefield.py - DQ sweeper → Training log: logs outcomes
network.py - DQ sweeper → Convolutional Q-network: predicts and trains
network.py - DQ sweeper → Test evaluation: runs periodic tests
network.py - Test evaluation → DQ sweeper: runs episodes
network.py - DQ sweeper → Game visualization: renders game
network.py