How ankitgundewar/adaptive_difficulty-leveraging_reinforcement_learning_for_player_driven_immersion works
This repository is a Pygame platform game project exploring adaptive difficulty with reinforcement learning. The principal loop runs a game episode, lets a player (keyboard-controlled or agent-controlled) traverse platforms, and uses score/state/reward transitions to train agents. The platform agent adapts platform placement; the player agent learns movement. The README identifies several runnable variants, while sampled code shows their differing platform-generation and control modes. Some variant wiring is based on file-level descriptions because their complete source was not sampled.
Main entry points: AdverseGame.py Adverse system · assets Images · game.py Keyboard game · playerDQN.py Player DQN
Components 11
Game modes
- Keyboard game
game.py - Adverse system
AdverseGame.py - Random platforms
playerRL.py - Fixed variant A
playerRandom.py - Fixed variant B
playerRandom2.py
RL agents
- Platform DQN
DQN.py - Player DQN
playerDQN.py
Game resources
- Images
assets - Screenshot buffer
buffer
Other components
- Player
- Pygame runtime
Connections 18
- Player → Keyboard game: controls
- Keyboard game → Pygame runtime: renders and polls
- Keyboard game → Platform DQN: chooses platforms
- Adverse system → Pygame runtime: renders and polls
- Adverse system → Platform DQN: trains platform policy
- Adverse system → Player DQN: trains player policy
- Random platforms → Pygame runtime: renders and polls
- Random platforms → Player DQN: selects and trains actions
- Fixed variant A → Pygame runtime: renders and polls
- Fixed variant A → Player DQN: uses player policy
- Fixed variant B → Pygame runtime: renders and polls
- Fixed variant B → Player DQN: uses player policy
- Keyboard game → Images: loads images
- Adverse system → Images: loads images
- Random platforms → Images: loads images
- Fixed variant A → Images: loads images
- Fixed variant B → Images: loads images
- Adverse system → Screenshot buffer: writes screenshot