Making a Chess Bot from Scratch (part 1)
Vložit
- čas přidán 22. 07. 2024
- In this video I made a chess bot from scratch in c++ (first c++ project). Im hoping to improve on it and hopefully make a follow-up video where it might beat me.
If I'm not lazy, a link to the Github to play the chess bot will be in a comment below.
DISCLAIMER: this is still a massive work in progress, so there are many bugs and crashes still
Pls subscribe since this video and bot took like 4 months. If you do you can have a cookie 🍪. - Zábava
Aaah this reminds me of my chess bot project, which was also my first (real) rust project. The way you check for pins and such is actually really well explained, I never really got that to work with just bit fiddling so I use a lot less efficient algorithm, but I may go back and see if I can get yours to work. On the interface, I'd recommend implementing UCI (Universal Chess Interface). It's a relatively simple text-based protocol that allows your engine to talk with basically all front-ends (simpler than implementing your own Python GUI at least :P)
Oh Thx! Ok I’ll do some research on UCI. Hopefully I’ll get it working by the next video…
Very cool
Okay, now I know that I never ever want to code a chess bot
Love the vid!!! I'm a chess youtuber who has done some very small coding projects. This video is the perfect union between programming and chess... :) The longer I watch your video the better it gets....
Oh Thanks!
Love seeing people make AI in C++. More members for our empire who can eventually help us overthrow python and finally take over all of AI...
Oh nice video btw.
YEAH… wait but I like python…
Great video.
How much memory do the precomputed moves take ?
Thx! Uhh at least 30 mb or that’s what task manager says😅. But for the actual recomputed moves, my array size is like 200 000 for 8 bytes(uint64) so like 16mb? If my math is correct it’s something around there…
You should use negamax instead of minimax, it's much cleaner(half the code, no if statements on color) and it gives the same results.
Ok I’ll do some research on that
how has it alr been 2 months i swear you asked me the diff in memory of an array and a vector last week
Yeah time really flies by, thx for your help through all of c++ 😄
I hate the black
…pieces
Right… only the pieces right?