How jaypatil9/hexapawnrl works
HexapawnRL provides a playable Hexapawn game plus three AI approaches: HER and HIM learn move preferences through self-play, while brute force enumerates game outcomes. A typical user plays through a game module, which handles board interaction and requests AI moves when configured. The learner trainers update their strategy data; agents consult that data to select moves. The root game is a separate human-vs-human implementation. Some algorithm game and utility wiring is inferred only where the sampled excerpts show imports or calls; unsampled behavior and generated solver-table paths are omitted.
Main entry points: brute_force/game.py Solver game · utils.py Solver rules · HER/game.py HER game · HIM/game.py HIM game
Components 16
Game play
- Standalone game
game.py - HER game
HER/game.py - HIM game
HIM/game.py - Solver game
brute_force/game.py
Learning agents
- HER agent
HER/agent.py - HER trainer
HER/train.py - HER rules
HER/utils.py - HER seed states
HER/states.txt - HIM agent
HIM/agent.py - HIM trainer
HIM/train.py - HIM rules
HIM/utils.py - HIM seed states
HIM/states.txt
Brute-force solver
- Solver agent
brute_force/agent.py - Game-tree search
brute_force/train.py - Solver rules
brute_force/utils.py
Other components
- Human player
Connections 21
- Human player → Standalone game: plays through
- Human player → HER game: plays through
- Human player → HIM game: plays through
- Human player → Solver game: plays through
- HER game → HER agent: requests moves
- HIM game → HIM agent: requests moves
- Solver game → Solver agent: requests moves
- HER game → HER rules: checks rules
- HIM game → HIM rules: checks rules
- Solver game → Solver rules: checks rules
- HER agent → HER rules: encodes states
- HER agent → HER trainer: trains if needed
- HER trainer → HER seed states: loads seed data
- HER trainer → HER rules: uses rules
- HIM agent → HIM rules: encodes states
- HIM agent → HIM trainer: trains if needed
- HIM trainer → HIM seed states: loads seed data
- HIM trainer → HIM rules: uses rules
- Solver agent → Solver rules: selects legal moves
- Game-tree search → Solver rules: enumerates moves
- Solver game → Solver rules: configures agent rules