How to Create a Chess Engine with TensorFlow (Python)

  Рет қаралды 3,142

Nick Tech

Nick Tech

Күн бұрын

🐍 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

Пікірлер: 24
@_NickTech
@_NickTech Ай бұрын
Hi! It's been 4 months since my last video, but I hope KZbin 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 Ай бұрын
Most KZbinrs 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 Ай бұрын
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 Ай бұрын
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!
@aaravasawa
@aaravasawa Ай бұрын
Good one mate
@_NickTech
@_NickTech Ай бұрын
Thanks! I appreciate your kind comment!
@hariharan-wx9oq
@hariharan-wx9oq Ай бұрын
really cool project!! Thanks man!!
@_NickTech
@_NickTech Ай бұрын
Glad you like it! Thanks for kind words!
@septspb
@septspb Ай бұрын
Yeahhhh, new video finally!👍 Thnx a lot!
@_NickTech
@_NickTech Ай бұрын
Thanks for watching! More content is on the way, so stay tuned! 😊
@aaravasawa
@aaravasawa Ай бұрын
Make this video go viral
@Andrew_J123
@Andrew_J123 Ай бұрын
nice vid!
@tarlkudrick1174
@tarlkudrick1174 28 күн бұрын
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 28 күн бұрын
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
@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 Ай бұрын
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 Ай бұрын
@@_NickTech Cool! Thanks for the explanation. I would love to see this project turned into a series...
@Alanhallow
@Alanhallow Ай бұрын
Why python, why not any other faster languages?
@_NickTech
@_NickTech 29 күн бұрын
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
Nick Tech
Рет қаралды 1,8 М.
Software engineer interns on their first day be like...
2:21
Frying Pan
Рет қаралды 13 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 46 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 9 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 40 МЛН
Chess Game Using Html CSS And JavaScript - Part 11: Add Move List
7:45
Simple Coding Tutorials
Рет қаралды 82
Scaling AI-Powered Smart Spaces with NVIDIA DeepStream SDK
2:20
NVIDIA Developer
Рет қаралды 2 М.
Future Proof Your Tech Career In the Age of AI
10:21
Travis Media
Рет қаралды 33 М.
PyTorch in 100 Seconds
2:43
Fireship
Рет қаралды 887 М.
Websites you should NOT visit 💻 w OnlyJayus - #Shorts
0:42
onlyjayus
Рет қаралды 8 МЛН
Decorators - Python Advanced Course #1
4:58
Nick Tech
Рет қаралды 8
100% Accuracy. 4 Brilliant Moves.
21:03
GothamChess
Рет қаралды 1,3 МЛН
Python in 100 Seconds
2:24
Fireship
Рет қаралды 2,5 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 507 М.
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 133 М.
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
Это iPhone 16
0:52
Wylsacom
Рет қаралды 1,4 МЛН