This is a Gomoku AI written in Python. It uses the minimax algorithm with alpha-beta pruning and iterative deepening to find the best move. It also uses a transposition table to avoid repeating work.
The Piskvork manager is a Win32 application and currently supports only Win32 compatible .exe files (furthermore whose name starts with pbrain- prefix). There are several ways how to create .exe from Python files.
- Install Windows (or Wine for Linux)
- Install Python3
- Install PyInstaller and
Install Piskvork or
PentaZen or
make install
make build-win
to compile the AI- Run the Piskvork manager and select
pbrain-gomoku-ai.exe
as the AI - Play against the AI
- Enjoy!
- Run
make run
to run the AI and launch Piskvork for Linux with Wine - Run
make run-win
to run the AI and launch Piskvork for Windows - Run
make fclean
to remove the compiled AI - Run
make test
to run the AI against itself - Run
make uninstall
to uninstall Piskvork manager
main.py
- contains the main functionClient.py
- handles the main loop and connections with the serverAgent.py
- contains the agent observations and actions logicsCommunication.py
- handles the communication with the serverProtocol.py
- contains the protocol response logicPolicies/*Policy.py
- contains the policy logicPolicies/*Actions.py
- contains the policies actions logic
DEBUG
- Add debug logs to stderrGMK_POLICY
- Gomoku policies (default:RandomPolicy
)
This project is licensed under the MIT License - see the LICENSE file for details