ViktorE Chessbot banner

ViktorE Chessbot

9 devlogs
44h 51m 23s

Bad stockfish written in the best language (rust)

(I kinda thought devlogs were optional, if you want to see more detail of features added and like version control, look at the repo commit history)

This project uses AI

I used Claude for suggestions, optimizations, sanity checks and generating re-written eval function for tuning. Also for README.

Demo Repository

Loading README...

Darko Sabo

Shipped this project!

Hours: 44.86
Cookies: 🍪 797
Multiplier: 17.78 cookies/hr

I built a from-scratch chess engine, because I wanted to know how they were build. The most challenging part was figuring out how to setup threading in rust for data generation. I’m proud of the result and there is definitely a huge improvement from v0 to v13. None of my friends were able to beat it.

Darko Sabo

Final small optimizations that didnt quite help that much, fixed README.
Neural network gained ~100 elo!

Attachment
2

Comments

Anass Zakar
Anass Zakar about 1 month ago

Did you train your own NNUE or used stockfish’s NNUE? if you trained your own did you self play or trained with some other engine eval?

Darko Sabo
Darko Sabo about 1 month ago

Hi, its not an NNUE but a regular neural network. NNUE uses a different architecture. I used pytorch and a dataset of 10 million games from lichess, labeled by stockfish to train my own.

Darko Sabo

Integrated NN into engine
Its kinda slow, went from 15 depth in 5 seconds to 10 depth. Ill look into making it faster

Attachment
0
Darko Sabo

For some reason wakatime tracked my neural netowrk training as work, initially I was doing it in a jupiter notebook in vscode, but then I just did a python file cuz like its kind of unfair yk

Anyways, I left the script running overnight and the training is done, I hope this works better than my evaluation function, if not ig ill just make the model bigger and train with more positions.

Attachment
1

Comments

Darko Sabo
Darko Sabo about 1 month ago

nvm I think its back to normal??

Darko Sabo

Lowkey forgot to do devlogs, but basically made the whole engine, started with aplha beta pruning, then added quiesence search, (in saved-brains I have v0 trough the most recent one v11)
the bot is around 1600 elo, which im quite happy with. theres very few things I still want to add. The last thing done today was tuning all the values I set manually for position evaluation.

This is done in a programm called cute-chess, my engine is just on the bottom left, communicating with it using UCI. Ill get it on lichess eventually so anyone can verse it.

Attachment
1

Comments

Anass Zakar
Anass Zakar about 1 month ago

omg cutechess, best chess gui OAT

Darko Sabo

Multiple performance optimizations were made.
Basic UCI interface with position loading, supports moves too.

Attachment
Attachment
0
Darko Sabo

Implemented all move logic, just need to do move-undo-ing for more efficient search when I start making the chess engine.
Board can correctly calculate number of positions with 1-6 moves (7 takes way too long)

Super exciting stuff!

Attachment
0
Darko Sabo

Basic implementation of bitboards for individual pieces and full board rendering (totally not ripping off stockfish for that).

Attachment
Attachment
Attachment
0