-
Notifications
You must be signed in to change notification settings - Fork 449
Create a homemade engine
actions-user edited this page Feb 16, 2024
·
1 revision
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
homemade.py
that extendsMinimalEngine
. - Create a method called
search()
with an argumentboard
that chooses a legal move from the board.- There are examples in
homemade.py
to help you get started. These examples show different ways to implement thesearch()
method and the proper way to return the chosen move.
- There are examples in
- In the
config.yml
, change the name fromengine_name
to the name of your class- In this case, you could change it to:
name: "RandomMove"
- In this case, you could change it to: