1.1 KiB
1.1 KiB
Creating a custom engine
As an alternative to creating an entire chess engine and implementing one of the communication protocols (UCI or XBoard), a bot can also be created by writing a single class with a single method. The search() method in this new class takes the current board and the game clock as arguments and should return a move based on whatever criteria the coder desires.
Steps to create a homemade bot:
- Do all the steps in the How to Install
- In the
config.yml, change the engine protocol tohomemade - Create a class in some file that extends
MinimalEngine(instrategies.py).- Look at the
strategies.pyfile to see some examples. - If you don't know what to implement, look at the
EngineWrapperorUCIEngineclass.- You don't have to create your own engine, even though it's an "EngineWrapper" class.
The examples just implementsearch.
- You don't have to create your own engine, even though it's an "EngineWrapper" class.
- Look at the
- In the
config.yml, change the name fromengine_nameto the name of your class-
In this case, you could change it to:
name: "RandomMove"
-