Guerilla is a deep learning chess engine developed by Miguel and Stephane Aroca-Ouellette. More details on the project can be found in the following blog posts: Part 1, Part 2, and Post-Mortem.
The project was developed in Python 2.7 on Linux systems (Ubuntu). All instructions below are for linux systems. If someone gets it running on a different operating system successfully, a pull request with the instructions would be appreciated.
- Install Tensorflow 1.x.x (https://www.tensorflow.org/install/)
- Install Pip package:
pip install --user Guerilla
- Due to Pip package size limits, the version of Guerilla provided by Pip is weaker than the one in this repo. To make it as strong simply copy over the network weight and hyperparameters:
- Extract weights:
tar -xzvf guerilla/data/weights/default.tar.gz
- Copy over weights:
mv guerilla/data/weights/default.p ~/.local/lib/python2.7/site-packages/guerilla/data/weights/default.p
- Copy over hyperparameters:
mv guerilla/data/hyper_params/neural_net/default.yaml ~/.local/lib/python2.7/site-packages/guerilla/data/hyper_params/neural_net/default.yaml
- Extract weights:
- Add Guerilla to your favorite UCI Compatible chess GUI (after the pip installation, the command for the GUI to run Guerilla is
Guerilla
). - Currenlty only supports time limit and depth limit (depth 4 ~= 1 minutes per move).
- Example using Chess Arena (http://www.playwitharena.com/):
- Run Chess Arena
- In the Menu Bar (top bar), select
Engines->Install New Engine...
- Go to
~/.local/bin/
(or\usr\local\bin\
if installed without the--user
option) and selectGuerilla
- A window asking UCI or Winboard should appear. Select UCI.
- In the Menu Bar (top bar), select
Levels->Adjust
. - In the window, choose either
Fixed search depth
orTime per move
and input desired value. - In the Menu Bar (top bar), select
File->New
.
Packages and programs required for things to work.
- python-chess:
pip install --user python-chess
- tensorflow 1.0:
- numpy
sudo apt-get install python-numpy
- ruamel.yaml <= 0.15:
pip install --user ruamel.yaml
- stockfish:
sudo apt-get install stockfish
- psutil (used when calling stockfish):
pip install --user psutil
- Go to guerilla directory (outer guerilla directory)
cd /path/to/guerilla
- Get fens:
python -m guerilla.train.chess_game_parser
- Get stockfish values:
python -m guerilla.train.stockfish_eval
- Train by running:
python -m guerilla.train.teacher <number hours (optional)> <number minutes (optional)> <number seconds (optional)>
If you need further information on development, feel free to contact us.
- Go to guerilla directory (outer guerilla directory)
cd /path/to/guerilla
- Choose test to run:
- data_test: Tests data transformations.
- play_test: Tests all functionality required to play the game.
- train_test: Tests all the functionality required to train guerilla.
- all_test: Tests all of the above
- Run test:
python -m tests.<test_chosen>
Licensed under MIT license. Refer to LICENSE.md.
- Miguel Aroca-Ouellette: mig_ao[at]live[dot]com
- Stephane Aroca-Ouellette: stephanearocaouellette[at]gmail[dot].com
- Google LLC