Adversarial reinforcement learning project training PPO-based Pac-Man agents against DQN-based Ghost agents using the Berkeley Pac-Man game engine.
pip install -r requirements.txtcd project/
# Open project.ipynb in Jupyter, or view project.html for pre-run results
# You could train the models here, but normally we trained it from Option 2 (game_environment folder)
cd game_environment/
# 1. Train baseline Pac-Man (2M steps)
Step 1: python src/train_ppo.py --timesteps 2000000 --num-envs 16 --normalize --lr-decay
# 2. Train adversarial agents
python train_mixed.py --pacman models/ppo_mediumClassic_datetime/best/best_model.zip --rounds 7 --ghost-pretrain-steps 200000
# 3. Visualize trained agents (adjust ghost version based on number of rounds trained)
python visualize_agents.py --pacman-path training_output/[mixed_####_####]/models/pacman_best.zip --ghost-dir training_output/[mixed_####_####]/models --ghost-version 7 --episodes 5See project/README.txt for detailed file descriptions and project structure.