3C (CxxChessComputer)
- 7 Devlogs
- 17 Total hours
A c++ chess bot!
A c++ chess bot!
My hackatime is broken and doesn’t cound the time (
) but here’s the stuff i did:
After a lot, and i mean A LOT of trial and error, my chess move generator now outputs moves consistent with qperf reference values! All that’s left is to optimize it not to use 14gb of my ram (
) and i can start worrying about analyzing
I discovered the bitset library in c++, which makes it a lot easier to deal with bits, like this here function that prints a bit representation of a u64 integer, arranged like a bitboard, very handy! Otherwise, for the stuff done so far:
✅Fixed up the algorithm for applying moves to better account for en passant
✅Enabled move generator to generate en passant moves
Other less notable changes
Finally started working on move generation! Currently done and working:
✅Rook
✅Bishop
✅Queen
✅King (kind of, i have to precompute some stuff)
The applyMove function is finally done, now automatically handling castling, en passant, revoking castling rights, etc.
I revamped most of the data structures, which took a bit, but switching individual bitboards for a enum-addressable list feels a lot better to use
Wakatime did NOT like me setting a different project name via CMake, but i am finally here. This is 3C or CxxChessComputer - a chess bot written in c++. Currently working: board (represented by bitboards), moving, adding and removing pieces from said board (whether said manipulations are legal or not). Next up, figuring out generating all legal moves