How ananyo-sen-b2530066/treasurehunt-rl works
This repository is a treasure-hunt reinforcement-learning project: users can play a trap-filled grid world manually or train a DQN agent in it, then inspect training metrics and plots. The environment owns gameplay and observations; the training loop coordinates environment steps, agent updates, and log output. The README also describes multiple difficulty maps, limited visibility, lifelines, dynamic traps, and evaluation. Source excerpts establish the main training and manual-play calls; relationships for unsampled details are omitted.
Main entry points: train_dqn.py DQN training · manual_play.py Manual play · logs Training logs · evaluation.py Evaluation plots
Components 11
Game environment
- Manual play
manual_play.py - Treasure environment
env/treasure_env.py - Difficulty maps
env/map_layouts - Visual assets
env/asset_loader.py
RL agents
- Base agent
agents/base_agent.py - DQN agent
agents/dqn_agent.py
Training workflow
- DQN training
training/train_dqn.py
Evaluation
- Training logs
analysis/logs - Evaluation plots
analysis/evaluation.py - Plot outputs
analysis/plots
Other components
- Player
Connections 7
- Player → Manual play: plays through
README.md - Manual play → Treasure environment: steps and renders
manual_play.py - DQN training → Treasure environment: runs episodes
training/train_dqn.py - DQN training → DQN agent: selects and trains
training/train_dqn.py - DQN training → Training logs: writes metrics
training/train_dqn.py - Training logs → Evaluation plots: provides metrics
analysis/evaluation.py - Evaluation plots → Plot outputs: saves plots
analysis/evaluation.py