As a developer and a lifelong chess lover, this video made me happy! Your pacing was simple, easy to understand and though the ideas were complex, you demonstrated and explained them in a neat and organized fashion. Cheers my friend - looking forward to the next one!
Damn, I felt like the video had just started, and then boom, it's already over. If you keep up the style/quality, you definitely have a future among the greats of video essays on programming/CS
@@ahmoin freya Holmer, Tsoding, Sebastian Lague, mattkc, no boilerplate, 3blue1brown, fasterthanlime And these are just the ones that came to mind first, there are many others
I love how walked through implementing the minimax algorithm - the whole explanation felt very natural in the way you explained it, and the animation adding the bits of code was lovely because that's exactly how implementation unfolds. Great work!
After watching this video, so many "informative" programming related videos seem so over the top edited or cinematic. I don't want a dramatic intro or unnecessarily upbeat music. I want THIS
THIS VIDEO WAS LIKE THIS „!!“ BRILLIANT. As a chess lover and young programmer I found it amazing how you explained and visualized everything. Also the sound effects your voice and your explanation itself. I would love to see a continuation or a deeper analysis
when i saw the length of the video, i thought to myself "alright what can he really teach me about chess programming in 6 mins lol lemme see" and these 6 mins felt like 1 min and 60 mins at the same time. So much info stuffed so precisely and explaining it in such calm and simplistic manner, kuddos man!🙌
Wow! Ok Bartek, just want to say thank you. Not just for the video but for the raw inspiration. I’ve got a learning engine to build, which like your chess engine, needs to be able to strategize on how to best position a learner for further strategic positions. So the challenge is to design the engine to provide the learner with a weighted numerical map of where they might want to head to learn more things. This way a learner can try to grasp the rabbit holes they can possibly traverse, prior to traversing them and strategize as they see fit for themselves. I have to do this in a more 3d type of board, but the principle is the same. So THANK YOU for the nudge I needed to just start building this as an engine. I owe you a beer/coffee/highFive!
This is just amazing. I was fascinated most by how the board conveniently fit into an int64 and how from there everything just rolled as mathematics. Matrix multiplication in particular.
Friendly reminder that certain kinds of matrix multiplications have become faster with AI recently finding a new method, a mathematician taking that to the next level, and then AI improving it once more.
There are a bunch of small computer science channels out there with really well-made videos that are ready to blow up, and I'm all for it. Best of luck, if that's your goal. Lovely video
the fact that this channel has.... huh! wait, it was 17 just 6 months ago, and now, I see 11k subscribers! This fact is bewildering, perplexing, and puzzling and.... don't know what to say. Exponential growth like this 🤯
The algorithm has blessed me today with this :') I was quite curious about how chess engines worked, and you explained with amazing clarity. Thank you.
how do you only have 166 subscribers!? you have made the concept easily understandable and presented it better than channels with 100x-1000x your subs. amazing!!!!
I was confused by the King placement evaluation since those values would quickly have the opposite gradation as pieces are traded off. This type of value assumption based on board placement would have to be dynamically evaluated and not taken as a static truth.
This is usually solved by having two king placement tables: one for opening/middle game and one for the endgame. One then computes something like a number for "endgame-ness" (might be based on the number of pieces left) that smoothly interpolates between the two tables.
The video was very nice. Calming, informative, and inspiring. I love Sebastians videos too and i definitiely saw some of what i see in his videos in this one.
Just found your channel man and I can assure you, you have a beautiful interessting content,... 2 videos now and more to come.. keep the great work man :D - a word from a stranger java developer
I think it would be interesting to go over how to make the min max processing multi-threaded and in a compiled language. Fundamentally this was a beautiful video, and python was an excellent choice to show the algorithm at a high level, but a practical engine would need to be scalable and take advantage of as many cpu cores as possible. Keep up the good work!
Functionally, there's no difference to a compiled language - the executable would just be faster. Multithreading is, unsurprisngly, hard to implement - the current best chess engine (Stockfish) uses a method called lazy SMP, which starts each thread on the same start position but gives them all access to the same shared transposition table. Very slight deviations in CPU time that each thread will have (due to unpredictable kernel scheduling) will cause some threads to reach positions slightly earlier than others and write the result into the table. This means that the other threads that reach that position microseconds later will just take the value in the table instead of searching it. These slight differences in what positions each thread searches quickly add up, meaning the threads quickly start searching completely different parts of the whole possible minimax tree.
I once implemented a minmax algorithm for Tic Tac Toe in Python, its quite simple to implement, the hardest part of a program like this is making it efficient and implementing a good eval function, neither of which my Tic Tac Toe AI needed since it could simply exhaust all possible moves. The thing I've been more curious about is not necessarily the conceptual part of the engine, but rather how you would go about making a engine that could, potentially, work with programs like Chessbase and participate in competitions like TCEC. If you make your own Chess program, doing a working engine is relatively simple, but making a engine that can work with programs and APIs made by other people I don't really know much about.
If interested, I can link you to a couple of Chess programming Discord servers with seasoned authors willing to help. Creating a good Chess engine can be hard--- much harder than writing minimax for tic-tac-toe. Even plain Minimax (with no optimization) can solve tic-tac-toe in seconds, building a table that maps positions to best moves. A tic-tac-toe AI doesn't even need to search the game tree more than once. However, the game tree complexity of Chess is so high that we will all be dead long before the game is solved. A Chess AI must search the game tree during the midgame, and optimization there is critical.
Really nicely produced video 👍 recently created chess in c++ and have been interested in engines, I realised how inefficient an array would be and had no idea about this method, I’d been using fen notation. Also, Well deserved channel growth 🎉 👏
This is an amazing video! I have no idea about coding, but ur animations and the style of the video made me very invested. It seems to be a very intriguing process in which we developed a need for a chess computer and how incredible and unbeatable they are now.
Subscribed! This intro to chess engine development was very interesting, and I loved how you implemented the minimax algorithm into it. Maybe next time you could use genetic algorithm for the engine, using optimized material as heuristics?
Great video! It was in a style somewhat similar to Sebastian but with his personality. It would be interesting to see the game 2048 being dissected by the expectimax algorithm or monte carlo.
Wonderful video. I loved how you walked through your processes in making this. Wished it was a bit longer/more in-depth, but that's just a personal preference.
I had a ZX81 in the mid-80s and had a chess game on it that was only 1k in memory. It always amazed me how they managed to programme a chess game into such a tiny amount of memory. Modern programmers could probably learn a lot from those tiny memory constraints.
You just got another subscriber. I hope you keep it up with the channel. This video is awesome! Simply explained, to the point and clear. Makes me want to get back into my chess engine, which I abandoned at a time of too much "real work". Thanks!
I'd love to see how the chess engine performs with different components enabled and different search depths. I've been thinking about getting into chess programming for a while, I wanted to see if I could make an engine that plays at a low-elo but making more human-ish mistakes, like forgetting about king safety, a distant bishop, en-passant or being over-biased towards captures or giving checks etc. It would be a really neat tool to help players learn and improve
The heuristic for evaluation is still primitive which is why neural networks have significantly improved modern engines. Also bishop pair, passed pawns, controling open files, etc should go into a strong heuristic. What is described here is primitive compared to state of the art. Also a position isn't merely 64 bits as having castling ability, move repetitions, 50 move rule, en pessante are also part of the game state. These nuances arent as important but they are amplified when engines play each other. Unless a mathematically perfect evaluation function is found such that chess is solved, maching learning is of course the most powerful modern statistical tool which is why it has become nearly universal in production engines. In general the strength of the eval function might be more important than efficient raw calculation as time is better spent. The interaction of pieces is more important than simple criterion. Its likely worth looking into how stockfish does the eval in non NNUE builds because it has one of the most nuanced heuristics imaginable.
Really great video! I'd love to see another one explaining some more advanced concepts, such as move sorting, QSearch or transposition tables. And good shout-out to the chess programming wiki, what would chess programmers do without it? It's also one of the best references for obscure assembly instructions (pext, I'm looking at you!)
This video deserves many more likes. You deserve all the appreciation for ur explanations and visuals. Btw, how did you do these animations? I have been trying to get into animation myself but can't seem to find a good starting point.
great share - interesting to hear the thought process - this thought process then can be applied to other different challenges, like optimising traffic in a unique environment, and so on
While programming a computer/engine to evaluate chess, some things needs to be taken into consideration. One crucial factor is mobility of pieces. Stronger the piece is placed (depends on how many squares it controls), better is the position for that side. Also, though brute force algorithm would be required for evaluating the position, but to make the engine take lesser time, candidate moves can be programed via recursion. Surely not easy, but as a programmer, that can well be done.
the fact that this channel has 17 subscribers is bewildering, perplexing, and puzzling for me
the fact that this channel has 125 subscribers is bewildering, perplexing, and puzzling for me
the fact that this channel has 212 subscribers is bewildering, perplexing, and puzzling for me
the fact that this channel has 217 subscribers is bewildering, perplexing, and puzzling for me.
the fact that this channel has 287 subscribers is bewildering, perplexing, and puzzling for me
the fact that this channel has 313 subscribers is bewildering, perplexing, and puzzling for me
As a developer and a lifelong chess lover, this video made me happy! Your pacing was simple, easy to understand and though the ideas were complex, you demonstrated and explained them in a neat and organized fashion. Cheers my friend - looking forward to the next one!
Damn, I felt like the video had just started, and then boom, it's already over.
If you keep up the style/quality, you definitely have a future among the greats of video essays on programming/CS
Yes, this whole video was mesmerizing. I was expecting at least twenty minutes. So good.
@@ahmoin freya Holmer, Tsoding, Sebastian Lague, mattkc, no boilerplate, 3blue1brown, fasterthanlime
And these are just the ones that came to mind first, there are many others
I love how walked through implementing the minimax algorithm - the whole explanation felt very natural in the way you explained it, and the animation adding the bits of code was lovely because that's exactly how implementation unfolds. Great work!
Fully agree! The code editing animations is great!
This was a very well made video! I couldn't believe in the amount of subscribers you had because your production is top notch!
A lot of obscure channels with high quality videos have been appearing in my feed, and I'm all for it.
I give this video a high evaluation score for the youtube algorithm.
haha thanks 😅
After watching this video, so many "informative" programming related videos seem so over the top edited or cinematic. I don't want a dramatic intro or unnecessarily upbeat music. I want THIS
I always enjoy hearing of new ways to apply bitwise operators.
This video is ridiculously brillant... This is so clean, well explained, and the purpose is so exciting
THIS VIDEO WAS LIKE THIS „!!“ BRILLIANT. As a chess lover and young programmer I found it amazing how you explained and visualized everything. Also the sound effects your voice and your explanation itself. I would love to see a continuation or a deeper analysis
when i saw the length of the video, i thought to myself "alright what can he really teach me about chess programming in 6 mins lol lemme see" and these 6 mins felt like 1 min and 60 mins at the same time. So much info stuffed so precisely and explaining it in such calm and simplistic manner, kuddos man!🙌
the fact that this channel has only 1.5k subscribers is bewildering, perplexing, and puzzling for me
Wow! Ok Bartek, just want to say thank you. Not just for the video but for the raw inspiration. I’ve got a learning engine to build, which like your chess engine, needs to be able to strategize on how to best position a learner for further strategic positions. So the challenge is to design the engine to provide the learner with a weighted numerical map of where they might want to head to learn more things. This way a learner can try to grasp the rabbit holes they can possibly traverse, prior to traversing them and strategize as they see fit for themselves. I have to do this in a more 3d type of board, but the principle is the same. So THANK YOU for the nudge I needed to just start building this as an engine. I owe you a beer/coffee/highFive!
This is just amazing.
I was fascinated most by how the board conveniently fit into an int64 and how from there everything just rolled as mathematics. Matrix multiplication in particular.
Friendly reminder that certain kinds of matrix multiplications have become faster with AI recently finding a new method, a mathematician taking that to the next level, and then AI improving it once more.
The fact this channel has only 4.27k subs is bewildering, perplexing, and puzzling for me
There are a bunch of small computer science channels out there with really well-made videos that are ready to blow up, and I'm all for it.
Best of luck, if that's your goal. Lovely video
The fact that this channel has 1.62 k subscribers is bewildering, puzzling and perplexing for me😊
the fact that this channel has.... huh! wait, it was 17 just 6 months ago, and now, I see 11k subscribers! This fact is bewildering, perplexing, and puzzling and.... don't know what to say. Exponential growth like this 🤯
वास्तव में यह हैरान करने वाला, भ्रमित करने वाला और बहुत आश्चर्यजनक है।
The algorithm has blessed me today with this :') I was quite curious about how chess engines worked, and you explained with amazing clarity. Thank you.
your animations are beautiful and smooth! first time I've ever seen a video with more likes than the channel who made it. well done!
Incredible visualizations, love this so much
Dude! Really nice vid. You explain the concept in simple terms without all the unnecessary details. Looking forward to more of that!
how do you only have 166 subscribers!? you have made the concept easily understandable and presented it better than channels with 100x-1000x your subs. amazing!!!!
It feels so good to see this underappreciated video first being a developer and a chess fan.
I was confused by the King placement evaluation since those values would quickly have the opposite gradation as pieces are traded off. This type of value assumption based on board placement would have to be dynamically evaluated and not taken as a static truth.
This is usually solved by having two king placement tables: one for opening/middle game and one for the endgame. One then computes something like a number for "endgame-ness" (might be based on the number of pieces left) that smoothly interpolates between the two tables.
Wow, I hadn't heard this song before. I love your taste in music.
Wow. Im a software developer and hearing you explain something so complex in such a simple way is a freaking gift. Hats off to you sir.
man i am half in the video and it's calm to hear you talk, chill to watch and interesting to understand. i like
The video was very nice. Calming, informative, and inspiring. I love Sebastians videos too and i definitiely saw some of what i see in his videos in this one.
please continue making such fascinating programming videos brother!
As a CS graduate, I love seeing the concepts we learned applied to real world things like chess.
Fascinating stuff
Very nice video, and it shows that a lot of effort went into it. Congrats!
Just found your channel man and I can assure you, you have a beautiful interessting content,... 2 videos now and more to come.. keep the great work man :D - a word from a stranger java developer
Beautiful video
I think it would be interesting to go over how to make the min max processing multi-threaded and in a compiled language. Fundamentally this was a beautiful video, and python was an excellent choice to show the algorithm at a high level, but a practical engine would need to be scalable and take advantage of as many cpu cores as possible. Keep up the good work!
Functionally, there's no difference to a compiled language - the executable would just be faster.
Multithreading is, unsurprisngly, hard to implement - the current best chess engine (Stockfish) uses a method called lazy SMP, which starts each thread on the same start position but gives them all access to the same shared transposition table. Very slight deviations in CPU time that each thread will have (due to unpredictable kernel scheduling) will cause some threads to reach positions slightly earlier than others and write the result into the table. This means that the other threads that reach that position microseconds later will just take the value in the table instead of searching it. These slight differences in what positions each thread searches quickly add up, meaning the threads quickly start searching completely different parts of the whole possible minimax tree.
Oh wow that’s actually really cool! Having a shared memory cache is actually quite nifty here. Thanks for sharing 🔥🔥🔥
I once implemented a minmax algorithm for Tic Tac Toe in Python, its quite simple to implement, the hardest part of a program like this is making it efficient and implementing a good eval function, neither of which my Tic Tac Toe AI needed since it could simply exhaust all possible moves. The thing I've been more curious about is not necessarily the conceptual part of the engine, but rather how you would go about making a engine that could, potentially, work with programs like Chessbase and participate in competitions like TCEC. If you make your own Chess program, doing a working engine is relatively simple, but making a engine that can work with programs and APIs made by other people I don't really know much about.
If interested, I can link you to a couple of Chess programming Discord servers with seasoned authors willing to help.
Creating a good Chess engine can be hard--- much harder than writing minimax for tic-tac-toe. Even plain Minimax (with no optimization) can solve tic-tac-toe in seconds, building a table that maps positions to best moves. A tic-tac-toe AI doesn't even need to search the game tree more than once.
However, the game tree complexity of Chess is so high that we will all be dead long before the game is solved. A Chess AI must search the game tree during the midgame, and optimization there is critical.
Such a well curated and informative video! I’m glad to be one of your early subscribers.
The fact that this channel has 11.1k subscribera only is indeed surprising.
Great video thank you, I thought you would show a demo at the end of the video, but anyway keep up the excellent work.
Really nicely produced video 👍 recently created chess in c++ and have been interested in engines, I realised how inefficient an array would be and had no idea about this method, I’d been using fen notation. Also, Well deserved channel growth 🎉 👏
This is an amazing video! I have no idea about coding, but ur animations and the style of the video made me very invested. It seems to be a very intriguing process in which we developed a need for a chess computer and how incredible and unbeatable they are now.
your style is sooo good! frustrated to find only 4 videos in your channel
I wish this video was much, much longer. Great content
Wohhh, one of the best videos I have ever watched on RUclips.
Beautiful graphic and motion design. Aesthetically very pleasing. Well explained.
My prediction is that this channel is really going to blow up
This is beautifully done
Subscribed! This intro to chess engine development was very interesting, and I loved how you implemented the minimax algorithm into it. Maybe next time you could use genetic algorithm for the engine, using optimized material as heuristics?
underrated channel
I know nothing about coding, not much about chess aside from the movement but this video came to my recommendations at random. It was interesting
I should say your videos are pretty well edited and interesting!
I'd love to see more videos like these ❤
It is out of my mind that channel less than 1k subs has this insane presentation
Kudos🔥✌
Great video! It was in a style somewhat similar to Sebastian but with his personality. It would be interesting to see the game 2048 being dissected by the expectimax algorithm or monte carlo.
Indeed.. 2048 is a fun game!
Wonderful video. I loved how you walked through your processes in making this. Wished it was a bit longer/more in-depth, but that's just a personal preference.
very elegant presentation, quite simplified yet intriguing. excellent video
I had a ZX81 in the mid-80s and had a chess game on it that was only 1k in memory. It always amazed me how they managed to programme a chess game into such a tiny amount of memory. Modern programmers could probably learn a lot from those tiny memory constraints.
man if this video was 10 hours long I would certainly watch it all 😂
Informative video, really enjoyed it! Keep it up
Reminds me of the Sebastian Lague video, great content :D
May I ask what video editor are you using to make those animations?
Love it, kudos to your whole effort. Peace.
absolute peach of a video. coding asmr
Excelent quality here, congrats!!
Best explanation and visualisation I've seen so far for bitboards, keep up the good work :)
i am impressed by the video editing. It was really good!
Amazing video, really enjoyed it
You just got another subscriber. I hope you keep it up with the channel. This video is awesome! Simply explained, to the point and clear. Makes me want to get back into my chess engine, which I abandoned at a time of too much "real work". Thanks!
You have earned my subscription.👊🏽 Chess lover and computer science enthusiast. Hoping for more.🤌🏽
I'd love to see how the chess engine performs with different components enabled and different search depths. I've been thinking about getting into chess programming for a while, I wanted to see if I could make an engine that plays at a low-elo but making more human-ish mistakes, like forgetting about king safety, a distant bishop, en-passant or being over-biased towards captures or giving checks etc. It would be a really neat tool to help players learn and improve
Awesome video! Satisfying animations, and great explanations!
As someone who plays chess as well as studied minimax and such algos in computer science, i always find this topic interesting
Phenomenal presentation and wonderfully narrated!
The best video I've watched today
This is the type of video a 250K+ subbed channel would make
Honestly the most enjoyable programming experience I’ve ever had!
this was very well demonstrated
Great video. I want an hour long sequel.
What a well produced video, your explanations are clear and the visuals really add to them. Fantastic work!
The heuristic for evaluation is still primitive which is why neural networks have significantly improved modern engines. Also bishop pair, passed pawns, controling open files, etc should go into a strong heuristic. What is described here is primitive compared to state of the art. Also a position isn't merely 64 bits as having castling ability, move repetitions, 50 move rule, en pessante are also part of the game state. These nuances arent as important but they are amplified when engines play each other. Unless a mathematically perfect evaluation function is found such that chess is solved, maching learning is of course the most powerful modern statistical tool which is why it has become nearly universal in production engines. In general the strength of the eval function might be more important than efficient raw calculation as time is better spent. The interaction of pieces is more important than simple criterion. Its likely worth looking into how stockfish does the eval in non NNUE builds because it has one of the most nuanced heuristics imaginable.
I always wondered how the chess engine works evaluating the positional advantage and material advantage! This gives some insight. 😌
Fantastic video! Hope you manage to get the subscribers and views you deserve!
I'm sitting here patiently waiting for a part 2. I need to see how it plays against you at various depths.
U deserve more appreciation ❤🎉😊
Really great video! I'd love to see another one explaining some more advanced concepts, such as move sorting, QSearch or transposition tables. And good shout-out to the chess programming wiki, what would chess programmers do without it? It's also one of the best references for obscure assembly instructions (pext, I'm looking at you!)
This video deserves many more likes. You deserve all the appreciation for ur explanations and visuals. Btw, how did you do these animations? I have been trying to get into animation myself but can't seem to find a good starting point.
very nice to watch and well done video, thanks for the great work!
great share - interesting to hear the thought process - this thought process then can be applied to other different challenges, like optimising traffic in a unique environment, and so on
Loved it : The method you describe is called alpha beta Pruning.
This prevents unnecessary node evaluations 😮
This is so well explained and interesting!
Thank you for wishing me a happy day :) I also wish you and whoever reads this comment a happy day!
While programming a computer/engine to evaluate chess, some things needs to be taken into consideration. One crucial factor is mobility of pieces. Stronger the piece is placed (depends on how many squares it controls), better is the position for that side. Also, though brute force algorithm would be required for evaluating the position, but to make the engine take lesser time, candidate moves can be programed via recursion. Surely not easy, but as a programmer, that can well be done.
This was such a good explanation, thank you
Amazing content man, keep it up
Great video! I love how you presented this topic specifically. Im subbing looking for more :)
good quality video like Sebastian Lague's chess adventure, +1 subscriber
Phenomenal video 🎉❤
Great video! Love the way you explain
Great succinct video!
this was awesome man
Amazing video!
This was excellent. Subscribed ❤