After working on my own chess engine for months, you can now play against it on Lichess!
The engine is quite weak at the moment but it plays very entertaining chess. It would be great if you could play a couple of games against it to test its strength.
If you haven’t followed along, you can find my past posts about the development here.
UCI Implementation
In order for engines to communicate with Lichess and other chess interfaces, all moves and commands need to be translated into some common language. The standard nowadays is the Universal Chess Interface (UCI). The great thing about interfaces like this is that the logic to play chess (i.e. the engine itself) and the user interface (GUI) are completely separate.
The protocol works by the GUI sending different commands to the engine and the engine responding. For example, if the GUI sends “position startpos” the engine sets the current position to the starting position. When the GUI then sends the command “go depth 5”, the engine will calculate 5 moves deep and respond with “bestmove e2e4” to indicate the best move.
The actual implementation is quite boring because one simply has to check which command has been entered and call the corresponding functions. I used this site to read up on the different commands. My implementation isn’t complete yet, I only implemented enough to make it work as a Lichess bot.
Other Changes
Since I wasn’t too happy with the speed of the engine when I first played against it, I also improved the performance of the engine. I didn’t make any changes to the functionality and only looked for inefficiencies in the code. Still I managed to increase the move generation speed by about 20%.
Next Steps
I know that I say this nearly every time, but I still need to improve the performance of the engine. While it got quite a bit faster with my small changes, there is still a lot of room for improvement. I’ll try to work on the performance of the move generation some more.
After that I need to improve the search. Firstly, it seems like there are some bugs in the search (at least the engine sometimes gives up material for no apparent reason). Then I want to implement transposition tables and pruning to make the search faster as well.
I hope you’ll challenge the bot on Lichess and let me know what you think.
I will try it.
I'm not accepting challenges with this time control.
BOT LogosEngine
Correspondence
5 days
Random side
Casual