Making a Chess Bot from Scratch (part 1)

Sdílet
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

Komentáře • 16

  • @-syn9
    @-syn9 Před měsícem +3

    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)

    • @TheSandwichCoder
      @TheSandwichCoder  Před měsícem

      Oh Thx! Ok I’ll do some research on UCI. Hopefully I’ll get it working by the next video…

  • @kingmancho5551
    @kingmancho5551 Před 27 dny

    Very cool

  • @user-fi4zi5il9z
    @user-fi4zi5il9z Před 9 dny

    Okay, now I know that I never ever want to code a chess bot

  • @oreofallacechess
    @oreofallacechess Před 28 dny

    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....

  • @Smurdy1
    @Smurdy1 Před měsícem

    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.

  • @albator8159
    @albator8159 Před měsícem

    Great video.
    How much memory do the precomputed moves take ?

    • @TheSandwichCoder
      @TheSandwichCoder  Před měsícem +1

      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…

  • @user-dh8oi2mk4f
    @user-dh8oi2mk4f Před 25 dny

    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.

  • @AlphanumericPassword
    @AlphanumericPassword Před měsícem +1

    how has it alr been 2 months i swear you asked me the diff in memory of an array and a vector last week

    • @TheSandwichCoder
      @TheSandwichCoder  Před měsícem +2

      Yeah time really flies by, thx for your help through all of c++ 😄

  • @ImAddictedToGD42O
    @ImAddictedToGD42O Před měsícem

    I hate the black
    …pieces