How to Create a Chess Engine with TensorFlow (Python)

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024

Комментарии • 26

  • @_NickTech
    @_NickTech  Месяц назад +3

    second part (huge improvement): ruclips.net/video/-WDRaRUjRMg/видео.html

  • @boukefmohamed3191
    @boukefmohamed3191 Месяц назад +4

    Most RUclipsrs use the minimax algorithm, but using neural networks for chess is truly special. You are a legend!
    I would love to see a video on how we can contribute to an open-source engine like Stockfish.

    • @_NickTech
      @_NickTech  Месяц назад +2

      Stockfish can already easily defeat any human, as far as I know 😄 And then there's AlphaZero as well... 😱
      Still, it's a nice idea, thank you!

  • @ozymandias8523
    @ozymandias8523 Месяц назад +5

    Im gonna come back after I learn python, this is like alchemy to me rn

    • @_NickTech
      @_NickTech  Месяц назад

      Best of luck to you in learning Python! When you come back, feel free to ask any questions!

  • @darzxk
    @darzxk 2 минуты назад

    I'm currently also making a chess engine but with js, and now that I've seen that is possible to use neural networks I think I might change to python haha

  • @aaravasawa
    @aaravasawa Месяц назад +3

    Good one mate

    • @_NickTech
      @_NickTech  Месяц назад

      Thanks! I appreciate your kind comment!

  • @septspb
    @septspb Месяц назад +1

    Yeahhhh, new video finally!👍
    Thnx a lot!

    • @_NickTech
      @_NickTech  Месяц назад

      Thanks for watching! More content is on the way, so stay tuned! 😊

  • @aaravasawa
    @aaravasawa Месяц назад +1

    Make this video go viral

  • @hariharan-wx9oq
    @hariharan-wx9oq Месяц назад

    really cool project!!
    Thanks man!!

    • @_NickTech
      @_NickTech  Месяц назад +1

      Glad you like it! Thanks for kind words!

  • @Andrew_J123
    @Andrew_J123 Месяц назад

    nice vid!

  • @domergamer2257
    @domergamer2257 Месяц назад

    Hi Nick!
    I have no idea about this, but I have a doubt... Is your training model restricted by your RAM memory? Can't it be done in many stages? Is it possible to Plug in two computers in series and get the computation quicker?
    BTW sweet video! Watched till the end. Keep it coming 🎉❤

    • @_NickTech
      @_NickTech  Месяц назад +3

      Hey! Thanks for your support, I appreciate it! ❤
      About RAM - yeah, it's a common problem with neural networks, esp. CNNs, because of the size of tensors X and Y. But you can manage it in stages. Just remember, the last layer's size has to match the vocabulary (total number of legal moves in the dataset). This layer must stay fixed-you can't change the NN structure after training. So, start by creating a big array of unique targets (as long as it fits in memory). Once you've fixed the size and set up mappings like int_to_move & move_to_int, you can split X into segments (X_1, X_2, ..., X_n) and train the model iteratively with each segment. It should work fine, but it'll take hours, days, weeks, months...
      Using multiple computers: Yep, it's possible (called "distributed and parallel training"). TensorFlow and Keras support this approach, though I haven't tried it myself yet (

    • @domergamer2257
      @domergamer2257 Месяц назад +1

      @@_NickTech Cool! Thanks for the explanation. I would love to see this project turned into a series...

  • @tarlkudrick1174
    @tarlkudrick1174 Месяц назад

    I was hoping you'd show how to build a neural net from scratch. That is, instead of using a pre-made library, start with nothing beyond numpy and pandas, and go from there. My problem with python is that other people have already done most of the work, so all a person really needs to do is download someone else's pre-made set of solutions and learn how to use that solution's commands. I guess what I'd really like to see is how to build a neural net in Assembly or something 🙂

    • @_NickTech
      @_NickTech  Месяц назад

      Hey, "TensorFlow" is in the title and on the thumbnail 😁. That's a great idea, thank you! I want to do it, though not in assembly, I'm afraid. But in C/C++ with the usage of GSL for linear algebra, I guess

  • @Alanhallow
    @Alanhallow Месяц назад

    Why python, why not any other faster languages?

    • @_NickTech
      @_NickTech  Месяц назад

      In ML and DL, people usually use Python, unless it's for HFT. Speed was not my primary concern in this project, so coding with Python was much faster and easier. That's it.
      Typically, drafts are written in Python first and only rewritten in C/C++ if necessary