Тёмный

How to Create a Chess Engine with TensorFlow (Python) 

Nick Tech
Подписаться 358
Просмотров 2,8 тыс.
50% 1

🐍 Learn how to find a dataset, parse it, and train a neural network using TensorFlow.
⚔️ Watch as I play a game against the trained model.
👨‍💻 CODE: github.com/Skripkon/chess-engine
♫ Want to explore more TensorFlow projects? Check out how to generate music: • AI creates music? Let'...
Timelines:
00:00 Intro
00:20 Dataset and preprocessing
02:51 Training the neural network
06:02 Making predictions
10:10 Game overview
14:30 Outro
#tensorflow #keras #python #chess #chessengine #neuralnetworks #programming #coding

Наука

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@_NickTech
@_NickTech 25 дней назад
Hi! It's been 4 months since my last video, but I hope RU-vid will still show this one to somebody :) (Dis)likes and any comments are deeply appreciated! If you have something you'd like me to cover, please let me know! I'm aiming to create one video per week this summer. Have a great day!
@boukefmohamed3191
@boukefmohamed3191 25 дней назад
Most RU-vidrs 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 24 дня назад
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 25 дней назад
Im gonna come back after I learn python, this is like alchemy to me rn
@_NickTech
@_NickTech 24 дня назад
Best of luck to you in learning Python! When you come back, feel free to ask any questions!
@aaravasawa
@aaravasawa 25 дней назад
Good one mate
@_NickTech
@_NickTech 25 дней назад
Thanks! I appreciate your kind comment!
@septspb
@septspb 25 дней назад
Yeahhhh, new video finally!👍 Thnx a lot!
@_NickTech
@_NickTech 25 дней назад
Thanks for watching! More content is on the way, so stay tuned! 😊
@hariharan-wx9oq
@hariharan-wx9oq 25 дней назад
really cool project!! Thanks man!!
@_NickTech
@_NickTech 24 дня назад
Glad you like it! Thanks for kind words!
@aaravasawa
@aaravasawa 25 дней назад
Make this video go viral
@tarlkudrick1174
@tarlkudrick1174 20 дней назад
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 20 дней назад
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
@Andrew_J123
@Andrew_J123 23 дня назад
nice vid!
@domergamer2257
@domergamer2257 25 дней назад
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 25 дней назад
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 25 дней назад
@@_NickTech Cool! Thanks for the explanation. I would love to see this project turned into a series...
@Alanhallow
@Alanhallow 21 день назад
Why python, why not any other faster languages?
@_NickTech
@_NickTech 21 день назад
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
Далее
How to Create a Chess Engine with PyTorch (Python)
16:40
Fast and Furious: New Zealand 🚗
00:29
Просмотров 35 млн
Quest To Find The Largest Number
11:43
Просмотров 292 тыс.
How to Run a PyTorch Model in the Browser
3:34
Neural Network Learns to Play Snake
7:14
Просмотров 4,5 млн
5 Years of Coding in under a Minute #shorts
0:56
Просмотров 5 млн
Neural Network from Scratch | Mathematics & Python Code
32:32
Tyler1 Has Done It Again
6:42
Просмотров 232 тыс.
Why did Shadow become evil ?
0:19
Просмотров 326 тыс.
I Made an AI with just Redstone!
17:23
Просмотров 829 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 6 млн
$1 vs $100,000 Slow Motion Camera!
0:44
Просмотров 28 млн