Moonfish Engine (~2000 Elo Rating Lichess.org)
Didactic Python Chess Engine
pip install -r requirements.txt
1. Running as an UCI Compatible Engine
# to get available options
$ python main.py --help
# starts the engine with default options
$ python main.py
python api.py
Unit tests are testing the basic functionality of the engine, with key positions and moves.
python -m unittest tests/test.py
Bratko-Kopec tests the engine performance in terms of time and strenght.
python -m tests.test_bratko_kopec
This engine implements the UCI protocol and can be used as a bot on Lichess. You can use the python bridge between Lichess Bot API and the engine: https://github.com/ShailChoksi/lichess-bot.
To run it as a bot you'll need to produce a python executable. PyInstaller can produce it by running the following command:
python3 -m PyInstaller main.py
This creates a build
and dist
folder. The dist
folder contains the main executable in a folder called main
. All the files inside main
need to be copied over to /lichess-bot/engines
for it to work. You can checkout /lichess for further lichess setup.