Тёмный

The Fascinating Programming of a Chess Engine 

Bartek Spitza
Подписаться 14 тыс.
Просмотров 327 тыс.
50% 1

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

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 481   
@theluvjain
@theluvjain 10 месяцев назад
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!
@Pi7on
@Pi7on 11 месяцев назад
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
@andrewsarroyo
@andrewsarroyo 10 месяцев назад
Yes, this whole video was mesmerizing. I was expecting at least twenty minutes. So good.
@Pi7on
@Pi7on 3 месяца назад
@@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
@espian6506
@espian6506 11 месяцев назад
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!
@Ermude10
@Ermude10 10 месяцев назад
Fully agree! The code editing animations is great!
@dantheok1
@dantheok1 11 месяцев назад
the fact that this channel has 17 subscribers is bewildering, perplexing, and puzzling for me
@nameyname1447
@nameyname1447 11 месяцев назад
the fact that this channel has 125 subscribers is bewildering, perplexing, and puzzling for me
@galactoman5503
@galactoman5503 11 месяцев назад
the fact that this channel has 212 subscribers is bewildering, perplexing, and puzzling for me
@animationgaming8539
@animationgaming8539 11 месяцев назад
the fact that this channel has 217 subscribers is bewildering, perplexing, and puzzling for me.
@khytron06
@khytron06 11 месяцев назад
the fact that this channel has 287 subscribers is bewildering, perplexing, and puzzling for me
@AverageBishop-
@AverageBishop- 11 месяцев назад
the fact that this channel has 313 subscribers is bewildering, perplexing, and puzzling for me
@Lycro.
@Lycro. 10 месяцев назад
This was a very well made video! I couldn't believe in the amount of subscribers you had because your production is top notch!
@artillerybeacon5324
@artillerybeacon5324 10 месяцев назад
A lot of obscure channels with high quality videos have been appearing in my feed, and I'm all for it.
@Nicolas-sq4fj
@Nicolas-sq4fj 10 месяцев назад
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
@davidb6477
@davidb6477 10 месяцев назад
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.
@crahs8
@crahs8 10 месяцев назад
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.
@MattMcT
@MattMcT 3 месяца назад
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!
@Realharshagarwal
@Realharshagarwal 10 месяцев назад
It feels so good to see this underappreciated video first being a developer and a chess fan.
@craz2580
@craz2580 10 месяцев назад
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
@OmarMoBadr2
@OmarMoBadr2 11 месяцев назад
Great video thank you, I thought you would show a demo at the end of the video, but anyway keep up the excellent work.
@brettbuchanan1878
@brettbuchanan1878 10 месяцев назад
I wish this video was much, much longer. Great content
@NorthCalm
@NorthCalm 4 месяца назад
The fact that this channel has 11.1k subscribera only is indeed surprising.
@fadishadi8855
@fadishadi8855 4 месяца назад
your style is sooo good! frustrated to find only 4 videos in your channel
@SomeSnowman12
@SomeSnowman12 10 месяцев назад
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.
@dhruvinvekariya975
@dhruvinvekariya975 11 месяцев назад
It is out of my mind that channel less than 1k subs has this insane presentation Kudos🔥✌
@oro5421
@oro5421 10 месяцев назад
My prediction is that this channel is really going to blow up
@Spyaboo
@Spyaboo 11 месяцев назад
Best explanation and visualisation I've seen so far for bitboards, keep up the good work :)
@maxivy
@maxivy 10 месяцев назад
This is the type of video a 250K+ subbed channel would make
@ahmedAltariqi
@ahmedAltariqi 8 месяцев назад
I should say your videos are pretty well edited and interesting! I'd love to see more videos like these ❤
@renzpajarito4655
@renzpajarito4655 10 месяцев назад
now I understand how chess evaluation works.
@mike87364
@mike87364 3 месяца назад
This is beautifully done
@dionito70
@dionito70 10 месяцев назад
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!
@sanjaykamath90210
@sanjaykamath90210 10 месяцев назад
Loved it : The method you describe is called alpha beta Pruning. This prevents unnecessary node evaluations 😮
@sisyfos101
@sisyfos101 10 месяцев назад
Honestly the most enjoyable programming experience I’ve ever had!
@yelnurkean9298
@yelnurkean9298 10 месяцев назад
i am impressed by the video editing. It was really good!
@_.-.-_.-.--.-_.-
@_.-.-_.-.--.-_.- 10 месяцев назад
May I ask what video editor are you using to make those animations? Love it, kudos to your whole effort. Peace.
@S4veMeBarry101
@S4veMeBarry101 10 месяцев назад
Phenomenal presentation and wonderfully narrated!
@findmehere
@findmehere 10 месяцев назад
this was very well demonstrated
@sparshsharma5270
@sparshsharma5270 10 месяцев назад
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.
@murphleeman3347
@murphleeman3347 10 месяцев назад
Thank you for wishing me a happy day :) I also wish you and whoever reads this comment a happy day!
@dungeonrobot
@dungeonrobot 11 месяцев назад
Fantastic video! Hope you manage to get the subscribers and views you deserve!
@michaeltruong405
@michaeltruong405 6 месяцев назад
This video is so underrated
@sushi5796
@sushi5796 2 месяца назад
I barely know anything about programming but this is a really cool video!
@dfhfdgfgdfshdfhe8257
@dfhfdgfgdfshdfhe8257 10 месяцев назад
algo gods connected us, now let’s create duck chess engine.
@MOGE_
@MOGE_ 3 месяца назад
this gave me some ideas of how to mKe an engine for a local boad game played in my country.
@dxdux
@dxdux 10 месяцев назад
You should do a video about bitboards, I think that is the most difficult part for people starting with chess programming. Thanks for the video!.
@supertigik
@supertigik 10 месяцев назад
The video ended so abruptly 😩 i for some reason expected to hear about more advanced chess algorithms, at least in general terms
@STS232323
@STS232323 10 месяцев назад
This is so well explained and interesting!
@Maheep_Infinity
@Maheep_Infinity 10 месяцев назад
U deserve more appreciation ❤🎉😊
@Agogogogogogkglgkfndjesk
@Agogogogogogkglgkfndjesk 11 месяцев назад
Great video. Can you please tell me what program/software do you use for creating these visuals/animations?
@BartekSpitza
@BartekSpitza 10 месяцев назад
Its almost all Motion Canvas along with some Davinci Resolve/After Effects :)
@stevenstone307
@stevenstone307 8 месяцев назад
Fantastic video
@vKxrey
@vKxrey 10 месяцев назад
Fantastic Video!
@toofatforthat3861
@toofatforthat3861 10 месяцев назад
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.
@andrewdunbar828
@andrewdunbar828 9 месяцев назад
I got a lot of satisfactioncy from the word "elegancy".
@ShikharSrivastavaOfficial
@ShikharSrivastavaOfficial 10 месяцев назад
This video inspired me to make my own chess engine now! Thanks!
@majestra6740
@majestra6740 11 месяцев назад
Nice Video! I am already into chess and I'm starting to learn to code. I definitely got inspired to have this as a future project!
@BartekSpitza
@BartekSpitza 11 месяцев назад
Highly recommend!
@2ndTony
@2ndTony 10 месяцев назад
Great video! Love the way you explain
@EcsMurphy
@EcsMurphy 10 месяцев назад
This was excellent. Subscribed ❤
@Avighna
@Avighna 10 месяцев назад
Well made video, good job!
@JeeliBeeli
@JeeliBeeli 10 месяцев назад
I got 3blue1brown vibes from the editing, very nice to look at
@ShahryarKhan-KHANSOLO-
@ShahryarKhan-KHANSOLO- 3 месяца назад
Brilliant ❤️
@casualbeluga2724
@casualbeluga2724 11 месяцев назад
Excellent video
@28neeraj
@28neeraj 10 месяцев назад
I want to know who you create these cool graphics
@callofover6595
@callofover6595 4 месяца назад
can you tell me how do you do your presentation( the video you showed) I need to present my project about the same topic and I don t know how to start?
@kech267
@kech267 4 месяца назад
Made with motion canvas, check description
@wondays654
@wondays654 10 месяцев назад
I'd be interested if you did a much more deep dive into this. For the programmers like myself.
@babayaga5620
@babayaga5620 10 месяцев назад
Man, ur video slapped, what tools did u use to animate?
@JordanShurmer
@JordanShurmer 8 месяцев назад
well done!
@kindabaddy
@kindabaddy 10 месяцев назад
This is really cool
@cj-zl2gu
@cj-zl2gu 10 месяцев назад
Great video!! 😲What program did you use to animate this video?
@WirIez
@WirIez 10 месяцев назад
I got an idea while watching this! What about caching the board positions instead of calculating them every time? But then… how do we know what to cache? Well… maybe let two computers place a few thousand games and just take their boards and cache that. Would be cool to see what that would improve in performance
@sanjaykrish8719
@sanjaykrish8719 11 месяцев назад
Thanku for sharing ur insights on it. I like how u break down
@ComputersAreRealCool
@ComputersAreRealCool 10 месяцев назад
Fabtastic video! What tools do you use for the animations/visuals? They look great!
@nimeshpoudel8277
@nimeshpoudel8277 11 месяцев назад
2:13 capturing pieces is good but in that specific position it as M2
@dbanuelos1324
@dbanuelos1324 10 месяцев назад
Loved your video. Great work! One question: which software do you use to make your videos and animations? Adobe AE?
@bazcuda
@bazcuda 10 месяцев назад
I would be interested to know how you determine all the valid moves for one side and all the valid reponses to each valid move.
@sorgenh
@sorgenh 11 месяцев назад
Great job!
@rahuu9302
@rahuu9302 10 месяцев назад
Great, video, although I have a question. What about sacrificies? You said that evaluation comes from the value of the pieces and their position on the board. What if the best move is to sacrifice the queen, which after 8 moves gives a real advantage. This situation will not be filtered by the logic tree?
@BartekSpitza
@BartekSpitza 10 месяцев назад
The evaluation function is naive, lets say. It really only tries to estimate the board and who's in the lead (if any). Sacrifices can be tricky to wrap ones head around, but it is the search algorithms job to notice this. Minimax searches all nodes in the tree exhaustively, and so won't miss finding these sacrifices. Alpha-beta can prune the tree and evaluate fewer nodes, but does so in a way that guarantees that it too won't miss advantageous nodes, even sacrifices.
@JIMPENREVIEWS
@JIMPENREVIEWS 8 месяцев назад
I liked the video, but if each position is a "bit" how do you program how pieces can move?
@yassinesafraoui
@yassinesafraoui 10 месяцев назад
Everybody give this man a sub
@MetsuryuVids
@MetsuryuVids 10 месяцев назад
Isn't it a bad idea to prune immediately, because if you have a position that sacrifices a piece to gain a better piece, or a win, that path would be pruned because of the sacrifice, if you don't search it deep enough?
@Kqder
@Kqder 10 месяцев назад
Quite underrated!
@khaelkugler
@khaelkugler 11 месяцев назад
Great video! Something we're all wondering--how did it do?? What was its approx elo?
@BartekSpitza
@BartekSpitza 10 месяцев назад
Thanks a lot! I never benchmarked it thoroughly but estimated it around 1500 :)
@rybiryj
@rybiryj 10 месяцев назад
How strong would such a simple engine (that takes into account only the position-adjusted material value of the pieces) be in practice?
@かわいい男-h8e
@かわいい男-h8e 11 месяцев назад
u won a new sub
@iau
@iau 10 месяцев назад
Is there any benefit to be gained from representing bitboards in even more compressed ways? For example, there is only one king per player, and he can only be in one of 64 squares, so you can represent him in a 6-bit number. Same for the other king, and the queen. And all other pieces. You could use a 6 × 32 pieces = 192-bit number, or just 3 int64s instead of 12 int64s, to represent the entire board.
@BartekSpitza
@BartekSpitza 10 месяцев назад
Unfortunately that would break the idea of using Bitboards. For example, in move generation, Bitboards can be used to create occupancy masks by ANDing all the bitboards together.
@oluwatosinoseni7839
@oluwatosinoseni7839 9 месяцев назад
Any books or materials that cover this more broadly?
@mylesprospero8105
@mylesprospero8105 10 месяцев назад
i swear theres a youtuber with a similar animation as you, I forgot their channel name
@sgt.brownie5392
@sgt.brownie5392 10 месяцев назад
Awesome video! One question: do you take the different stages of the game into consideration when evaluating a board? For example the value of a king position changes in the endgame when the king is needed for checkmages or the queens position shouldnt really matter in the first couple of opening moves
@intermitttence2022
@intermitttence2022 10 месяцев назад
I’m not sure what he’s implemented, but there is a technique called Tapered Eval that does this. Essentially, two different evaluations for midgame and endgames using different tables are tracked at the same time, and a computed stage is used to weight each one.
@diabl2master
@diabl2master 4 месяца назад
At the beginning I thought I had tiny dots, then tiny maggots on my screen
@ranonrat6164
@ranonrat6164 11 месяцев назад
great video, new sub
@DarkPheonix0702
@DarkPheonix0702 3 месяца назад
Loved
@korigamik
@korigamik 10 месяцев назад
Man this is so cool! Can you share the source code for the animations in this video?
@blackty6922
@blackty6922 10 месяцев назад
I would love to see some simple game's program inside. this one is to complicated for me right now. after 3min my brain lefts xd
@boraturan5652
@boraturan5652 10 месяцев назад
I wonder what the elo of this simple chess computer be?
@rubenverster250
@rubenverster250 10 месяцев назад
mate in 2 at 2:09
@rainbowtrout950
@rainbowtrout950 11 месяцев назад
Considering the way this engine prefers the king to be in the corner, what happens when the position reaches the endgame? Will the engine insist on keeping the king in the corner, or will the concrete calculations outweigh the slight difference in evaluation for the positioning of the king? The king can often be the most powerful piece in the endgame, so it would be good to have something to account for that. Perhaps you could have it switch from king safety to king activity once material on the board is low enough
@BartekSpitza
@BartekSpitza 11 месяцев назад
You're completely correct. If you only have one set of these adjustment tables, the king would gravitate towards the corner even in the endgame. So ideally, you would use different adjustment tables for different phases of the game. Like you say, you could switch when material gets low enough. You could also switch to slightly different middlegame tables after a certain amount of moves. Thanks for pointing this out!
@reconnecting5426
@reconnecting5426 11 месяцев назад
You are correct, usually, there are two tables for each piece. One for the Middlegame and one for the Endgame. The less pieces there are on the board, the higher the endgame weight is
@tistou730
@tistou730 10 месяцев назад
what is the ELO for depths between 1 and 10?
@iAPixel
@iAPixel 10 месяцев назад
damn u smart asf i l;ove that
@lupp974
@lupp974 10 месяцев назад
wowza
@kosterix123
@kosterix123 10 месяцев назад
The point is not to maximize chess strength but have it play like a human, ie make sometimes blunders and mistakes, and overall don’t play like a machine. If it sees a checkmate it should not fail obviously.
@Darthrevan333
@Darthrevan333 10 месяцев назад
Why would you want to do that?
@kosterix123
@kosterix123 10 месяцев назад
@@Darthrevan333 want what? A chess opponent that plays like a human, who wouldn't want that?
@Tester101-qn2bo
@Tester101-qn2bo 10 месяцев назад
What software do you use for video editing? Is it paid?
@BartekSpitza
@BartekSpitza 10 месяцев назад
I code them in Javascript with Motion Canvas, an amazing library!
@Alex-mm2vw
@Alex-mm2vw 10 месяцев назад
Wait, but the branch with -4 is not neccessarily worse than the one with -2, no? It could've been a sacrifice of a piece which only turns out to be good a couple moves later
@BartekSpitza
@BartekSpitza 10 месяцев назад
If that's the case and that sacrifice leads to something better than -4, say -1, then black won't allow it and choose the move leading to -4. Therefore, there is no need to calculate the other nodes. Hope that makes sense :)
@sarimkhan19
@sarimkhan19 10 месяцев назад
Wow 😮
@sekiro_19
@sekiro_19 10 месяцев назад
Bit operators make my head spin 🤕
@codehere142
@codehere142 10 месяцев назад
Where can I Contact you?
@cypherecon5989
@cypherecon5989 10 месяцев назад
Nice
@StillStable
@StillStable 7 месяцев назад
Hey, how can I talk to you about something?
@marcboss
@marcboss 10 месяцев назад
I was here before 1k subscribers
@C17H21NO4_
@C17H21NO4_ 11 месяцев назад
idkw this man only has 26 subs
Далее
Coding Adventure: Chess
29:22
Просмотров 3,8 млн
The Search for the Longest Infinite Chess Game
29:20
Просмотров 789 тыс.
ПОЮ ВЖИВУЮ🎙
3:19:12
Просмотров 872 тыс.
The Algorithm Behind Spell Checkers
13:02
Просмотров 414 тыс.
I Made A Chess AI But In Only 1 File
17:34
Просмотров 14 тыс.
The rarest move in chess
17:01
Просмотров 1,9 млн
Stockfish Has Ruined Chess
8:20
Просмотров 475 тыс.
I Made a Weird Chess AI from Scratch
6:38
Просмотров 290 тыс.
Can Chess, with Hexagons?
10:59
Просмотров 3,6 млн
Hikaru vs Stockfish
22:30
Просмотров 1,1 млн
ПОЮ ВЖИВУЮ🎙
3:19:12
Просмотров 872 тыс.