It is RECOMMENDED that you:
- know Root boardgame's rules
- or have played before
- or have a rule book with you
- python 11.3+
- libraries
pygame 2.4.0+—pip install pygame- (not recommended, un-maintained)
conda install -c conda-forge pygame
- (not recommended, un-maintained)
yaml—pip install pyyamlnumpy—pip install numpypathos—pip install pathosscipy—pip install scipy
- Add a new Python configuration (top right)
- set name:
Run main.py - set Script path:
.\main.py - set Environment > Working directory to absolute path to
src- eg.
D:\GitHub\RootAI\src
- eg.
- set name:
- Go to Settings > CodeStyle > Cogs icon > Import scheme > import
codestyle.xml
- You should be able to just run via command line with the instruction below
- Run
Run main.pyto run the game
- cd to
.\src - run python with config file path as arg
python -m main ".\config\config.yml"
- cd to root of project
- Run
pyinstaller .\src\main.py - Copy
.\src\assetsto.\dist\mainand\.src\config\config.ymlto.\dist\main\config
- download the RootAI from the releases tab: https://github.com/iambaangkok/RootAI/releases
- either:
- double click
RootAI.exe - run via command line
./RootAI.exe
- double click
- config file is in
/config/config.yml, change to match your needs.- Eyrie is set to be the mcts AI agent
- Marquise is the player
- Eyrie starts first
No mouse controls
- Press UP/DOWN --- change selected action
- Press R --- random action
- Press RETURN/SPACE --- execute selected action
- Press O --- print_game_state
- Press C --- new_game_from_current_game_state
- Hold F --- continuously run player
- Hold A --- continuously run agent
- Press N in game-end state --- new game
- Press Q in game-end state --- quit game
The AI agent uses Monte Carlo Tree Search (MCTS) to simulate into to future and pick the "best" possible action at the current game state.
Each action generation sequence corresponds to a 5 digit-number.
- Digit 0: faction = 1 (Marquise) | 2 (Eyrie) | 9 (Neutral)
- Digit 1-4: distinct id for that method
e.g.
- 10001 = action generation sequence 1 for Marquise