A UCI chess engine in C++ with Lichess API integration in python.
Challenge bot at https://lichess.org/@/M8000_bot (when online).
To download the engine : Github Release
Only accepts casual(unrated) challenges for now.
A UCI chess engine in C++ with Lichess API integration in python.
Challenge bot at https://lichess.org/@/M8000_bot (when online).
To download the engine : Github Release
Only accepts casual(unrated) challenges for now.
Completely refactored and revamped the Lichess bot code! Now with -
Log in to leave a comment
Updated the Lichess Bot script for better usability.
Log in to leave a comment
If you just want to play against the bot, you can click on the demo link which will take you to lichess, and you can challenge the bot from the popup. The bot runs on google colab, and I will try to keep it online as long as possible. However, the bot being online is not guaranteed (especially at night, eastern time zone), as google colab doesn’t run code indefinitely. You can try sending a challenge again later, when the bot comes online.
If you wish to try out the UCI engine yourself on your machine, go to https://github.com/abhijato-c/Chess-Engine/releases/tag/v2.0.0 and download the appropriate binary(details in the release log). To run the binary, the readme has details on what commands the engine accepts. The readme also has instructions on how to get this running as your own lichess bot.
Added builds for windows and macos, go check out the latest release @ https://github.com/abhijato-c/Chess-Engine/releases !
Log in to leave a comment
Added magic bitboards implementation, so now it can compile on CPU’s without BMI2 architecture!
Now working on compiling all binaries and releasing them in a manner similar to how stockfish releases.
Another match won against stockfish level 4, this time with the new magic bitboard implementation! (I should seriously start playing against higher levels now)
Added a few lines that will allow this to compile (mostly)everywhere. All it needs now is support for magic bitboards, as the pext instruction(current implementation) is available only on certain cpu’s.
Will work on that tomorrow.
Attached screenshot below of Jimbo crushing Stockfish lvl 4!(after many losses, that is)
Log in to leave a comment
Added a file MakeOpeningBook.py that parses all PGN files in the ‘pgns’ directory, and makes an opening book from them.
I have downloaded around 250 PGN files for cow, containing a whopping 500K games from pgn mentor! This makes my opening book go from around 10mb to ~30mb, and I hope this version is more comprehensive.
Attached yet another screenshot of matches against stockfish for testing.
Log in to leave a comment
Minor speed & efficiency improvements. I’m burned out working on this engine, so I will now spend some time improving the opening book, and working on other projects.
Log in to leave a comment
Officially the longest I’ve spent hunting down a bug. A verry tiny and nearly insignificat bug in the evaluation code took me 6 entire hours to resolve. The original plan was for me to add castling to the bot(yes, the bot can’t castle yet), but looks like that’s postponed to tomorrow. For now, at least, the bot plays ever so slightly better.
Attached below is the one of dozens of games I made the bot play trying to debug…
Log in to leave a comment
Edited the bot to accept only unrated correspondence challenges. Code is now running on google collab, so it should be online more often.
Working on making it accept more time controls.
Challenge at https://lichess.org/@/M8000_bot with correspondence time control and casual, not rated.
Log in to leave a comment
Realized I hadn’t touched the Lichess API bot code for a while, so I improved it a bit, and made it more readable!
Also ran some additional tests, and realized that tho it wins pretty consistently against stockfish level 4, it loses REALLY bad against lvl 5 ;c
I know exactly why this is happening(Static evaluation needs to be done using positional advantages, not just absolute material advantages), but fixing it makes my engine perform much WORSE as it reduces performance.
Log in to leave a comment
A chess engine with decent performance. (Minimal UCI support, see GitHub for technical details)
Challenge bot at https://lichess.org/@/M8000_bot when online.
Added some UCI support to make it standardized!
The support is still minimal, and it only handles a fraction of commands, but I will keep adding more commands in the future.
Log in to leave a comment
Found bug that was causing engine to play bad. The move generation code for knights had a typo in it, causing it to not generate all possible moves for the knight. This caused the engine to “forget” that the knight can move in a certain way, therefore missing crucial moves.
Now can beat stockfish level 4 consistently when given 3 seconds per move.
Pasted image of a game that it had previously blundered away, but now won(when given the position where it started losing pieces)
Log in to leave a comment
Cleaned up some buggy code and got the engine running on Lichess, it performs decently well. Beat Stockfish level 4 at 3 seconds per move, but otherwise, performance is underwhelming. Looking into ways to make the engine stronger. Possible inefficiencies in iterative deepening code.
Log in to leave a comment
This is an old, buggy project that I recently started fixing. It is a really basic chess engine that can play on lichess bot API via python.
Log in to leave a comment