A Python Piskvork template
Prerequisites and compilation
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.
Here I present the approach using PyInstaller and Windows command line:
- Install Windows (or Wine for Linux, originally the project was created and tested on Ubuntu 16.04 using Wine)
- Install Python (the code and also following instructions were tested with versions 2.7 and 3.6).
- Install pywin32 Python package:
pip.exe install pypiwin32(if not present "by default")
- Install PyInstaller:
pip.exe install pyinstaller
To compile the example, use the following command line command:
cd C:\path\where\the\files\were\saved pyinstaller.exe example.py pisqpipe.py --name pbrain-pyrandom.exe --onefile
Note: the executables
pyinstaller.exe might need full path, in my case I used
How to create your own AI
Replace file example.py with your own algorithm. Please don't change file pisqpipe.py, because it contains communication between your AI and the game manager and it might be changed in future protocol versions. More information about the protocol and tournament rules can be found at Gomocup websites