This is the most aesthetic algorithm video I've seen
@АйданаАбдыкеримова-г2и5 жыл бұрын
It means that you havent seen much of algorithm videos
@bernhardriemann67974 жыл бұрын
There's a lot of pleasing algorithms, Diffie-Hellman key exchange is pretty cool. Merkle Trees are quite nice as well. Though I'd say a lot of recursive tree-functions are pleasing.
@randomrandom4504 жыл бұрын
Yeah, way to many "some dude drawing on a piece of paper with a camera pointed at it". There are literally two of them in my recommended videos on the right.
@ap-pv7ug4 жыл бұрын
@@randomrandom450 As a Computerphile fan, I take personal offense at that.
@puppergump41172 жыл бұрын
You must not have seen 3blue1brown much
@kenhaley43 жыл бұрын
I just implemented minimax as described here to play tic-tac-toe in Python. When player goes first, minimax gets called a total of 60,692 times. With alpha-beta pruning, the number of calls is reduced to 8,542, which I found amazing. Thanks for this simple explanation and pseudocode!
@Walking_W Жыл бұрын
What if the opponent doesn't play optimally?
@kenhaley4 Жыл бұрын
@@Walking_W In that case, the slgorithm will find a solution in fewer moves.
@diogoandre756 Жыл бұрын
@@Walking_W Then by definition of the word "optimal" he is going to perish faster
@vuhoang590310 ай бұрын
@@Walking_W Well, if the player makes a move that is not considered optimal (according to the evaluation function) then the bot would gain even more benefit than it expected since the algorithm assumption is both players will make the optimal move. Also, this is just the algorithm, whether the bot is considered smart or not depends mostly on the evaluation function of the bot (this is where all the strategies of the bot go)
@ews31665 ай бұрын
im happy for your achievement
@yanlinzhu26825 жыл бұрын
The only 13 people that disliked this videos are the branches being pruned.
@jeongtaebang36795 жыл бұрын
comment of the day
@aymarfeed5 жыл бұрын
XD
@minorus35495 жыл бұрын
branch lives matter
@muhammadroshan73155 жыл бұрын
21 now
@THERedstoneBR5 жыл бұрын
@@muhammadroshan7315 22 :c
@coldwind83275 жыл бұрын
This is the best explanation I have ever watched about minimax and alpha-beta pruning. Thank you for this.
@duzypokoj11512 жыл бұрын
because it's the only one you've seen rotfl lololol get rekd nerd
@Luoze8 ай бұрын
@@duzypokoj1151 wow so cool! 🤩🤩
@nathanalgren2883 жыл бұрын
I like the respect the chess engine has for me when it's playing its moves... It assumes I'll play the most rational move.
@JDKDKDLDKDKDKDKKKDERYY3 жыл бұрын
i remember trying to "kill" the pieces my opponent used for capturing important pieces of me..
@MattB903 жыл бұрын
lol that's so funny
@nathanalgren2883 жыл бұрын
@@JDKDKDLDKDKDKDKKKDERYY Ooh, sweet revenge!
@nathanalgren2883 жыл бұрын
@@MattB90 And better than many human players ;)
@paulminh3525 Жыл бұрын
When I play my chess game in chessboard app, it always plan to take out my powerful pawn in the games as a way to maximize its victory. Thus, sometimes I decide I play bolder that the chess AI in my iPad could no longer respond to my move. I play on medium level in it thus it fit to my current capabilities as novice chess player for fun in free time. When I try a harder level, it beat me restlessly that I could not respond at all. I feel like an idiot and thus couldn’t adapt to new strategies. I couldn’t play save with an AI at all. I always tried to be initiative as much as possible!
@pvtejeswarpanda63245 жыл бұрын
I learnt 2 lecture worth concept in 11 mins with code as a plus. Amazing!!!
@undercoverdudes5 жыл бұрын
Incredibly helpful video
@CH3THIN3 жыл бұрын
mans bout to write a minimax algorithm to play krunker
@SkidFace3 жыл бұрын
I'm two years late too- but I do find it funny UCD is here
@qwest5003 жыл бұрын
Wut
@RealJulWhite9 ай бұрын
Wow, 5 years old and still one of the simplest, straightforward videos about these two algorithms/methods!
@THEPAGMAN7 ай бұрын
actually its one algorithm 🤓
@aldolunabueno26343 ай бұрын
@@THEPAGMAN Nope, the video presents two algorithms: minimax and its optimization, alpha-beta pruning.
@aldolunabueno26343 ай бұрын
But it miss the point: finding the best move.
@THEPAGMAN3 ай бұрын
@@aldolunabueno2634 alpha beta pruning is done ON the minimax algorithm
@mhm64212 ай бұрын
@@aldolunabueno2634 In the first branch, find the move that has the biggest evaluation
@machineworld94955 жыл бұрын
Not only did you provide super good tutorials for a procedural generation project, this also helped me with my introductory AI course! I owe 50% of this semesters credit to you my man
@ar_19667 ай бұрын
Dude this video is awesome, it explained the algorithm, how it works, and even gives pseudocode for it with worked examples. I'm not kidding when I say that this video is more effective than the university lectures. Thanks man, you're a lifesaver.
@vasile-simionsularea19783 жыл бұрын
Dude, this is freaking amazing. Your skill of explaining complicated concepts in an easy way is fantastic
@gabeharding26434 жыл бұрын
Shout out to my man Sebastian for not only being one of my favorite game dev youtubers but also explaining things so much better than my college professor
@martinnolte2 жыл бұрын
true, i found him when I got into Unity and stuff and now im pleased every time i look up an algorithm from my AI course and the first video suggested is by him
@ElGnomoCuliao2 жыл бұрын
fr man
@toilettenbrain72462 жыл бұрын
@@ElGnomoCuliao TUB?
@shitshow_12 жыл бұрын
True, He does lot of mathematical explanations and Game Dev tutorials. Wish I had money so that I can donate or contribute to him : )
@InXLsisDeo Жыл бұрын
To be fair it's more time consuming but also easier to explain in a video rather than live because you have all the time you need to go into as much detail as you need and correct your mistakes before releasing, while when you are on the blackboard, you have to think about what you are saying live, so it's easy to make mistakes or overlook something, or be less cleaar than you want to be. A video is more akin to writing a book chapter or a blog post. But that's why KZbin is so precious.
@albamo953 жыл бұрын
Understanding the basic idea of a-b pruning wasn't too difficult, but it took this video for me to really get how to implement it in code. Thanks!
@TeyimPila3 жыл бұрын
I am doing an online master's and this was taught in 54 video lectures. I have watched all 54 videos but I only understood what they were trying to teach after watching this single video
@stttrm3 жыл бұрын
Omg, alpha-beta pruning works so good. I'm making my tic tac toe using minimax and at first i decided to simplfy it by not using pruning. My bot needed about 5 seconds(!) to calculate all the possible turns. Then i added alpha-beta and now it completes its turn instantly! So cool
@AnawneeMawse5 жыл бұрын
This 10 minute video was more useful than the 2 hours I spent sitting in class to learn this.
@lvl5popcap4 жыл бұрын
My professor tried to explain this yesterday and kept messing up so I got nothing out of it. I'm glad this video exists because the homework is due regardless.
@shadowzero3673 Жыл бұрын
I study computer science at the TU in Berlin Germany and had really big problems with this algorithm! So ty a lot! You probably safed a few points for me!
@frendlyskrub70626 ай бұрын
this video saved sons life, he was terminally ill until i watched this video. its a miracle thank you so much
@Maarc15.3 жыл бұрын
Studying computer engineering at college, taking a class on AI right now. They have explained this to me about 5 times, and not a single one i've understood how it works. I watch once your video because YT decided to show it to me, and suddenly i understand it all... Man you are the best! Thanks!
@thosan3090 Жыл бұрын
Absolutely the best explanation of Minimax and AB Pruning, I just got an A+ in my AI final exam this semester, thank you so much sir.
@_mrundercoverhd_4 жыл бұрын
I am working on a bot for a turn-based game and for calculating a depth of 6 there were 10 million possibilities. This number went down to 20k because of pruning. Thanks!
@Khoaky7 ай бұрын
What a god. Was looking through all my lecture slides and didn't understand the concept at all... Watched this video and understood the whole concept in minutes... thank you.
@dimensionaldot6 жыл бұрын
I really love this new more CS focused topic, you should do more like this in the future!
@rayryeng3 жыл бұрын
This video is not only better in quality but having the code side-by-side as well as stepping through an example really set it over the top. I'm currently taking the AI Udacity Nanodegree course and I could not make sense of what they were talking about when they tried to explain minimax and alpha beta pruning. This video did such a better job and I'm now able to understand what's going on. Thanks so much!
@barsengin21863 жыл бұрын
Thanks so much. I have watched so many videos about alpha-beta pruning and I haven't been able to understand. I have just watched this video and I have understood at the moment. Thanks for your pure explanation. Actually simplicity is so important to explain for foreign people who are not good at English. Again Thank you so much...
@TheRealVicyX3 жыл бұрын
the way you did that loop was really smart. thoughout the video i was thinking of doing 'if then's but when i realized that you can just use the same function over and over to a certain depth that blew my mind. Very helpful for making efficient code
@JoseTorres-tr6od6 жыл бұрын
Look at the pruning that happens from 8:01 to 8:03. When he claims that node is "
@angusmclellan9186 жыл бұрын
Thanks for the explanation
@reema72775 жыл бұрын
Thanks a lot! thought he made a mistake
@bigsmerdo3 жыл бұрын
yo thanks i was bare confused
@levanlomia90463 жыл бұрын
Thanks for explanation
@WalksWithBooks3 жыл бұрын
My alternate formulation of the same concept. Looking at 1:06 (kzbin.info/www/bejne/ol7LmWhno8iaeqs ) sorry about formatting; rush job. //quote Jose Torres 3 years ago (edited) Look at the pruning that happens from 8:01 to 8:03. When he claims that node is "
@janardhanpolle72559 ай бұрын
This is the most efficient and effective way I've seen this concept being taught 💯
@eu18602 жыл бұрын
I really enjoy the way you combine the code with the visualisation, it is so impressive!
@LoukasSC2 жыл бұрын
This is one of the best explanations I've come across. I'm currently programming a Ruby chess game and this is invaluable. Thank you so much!
@youtubecommenter51224 жыл бұрын
Probably the best explanation of a complex topic that I've ever seen
@GalHorowitz6 жыл бұрын
This video was great! The style was super good for such videos. I think a good algorithm to continue on with is the Monte Carlo tree-search algorithm
@atmiaesatruemasterisaneter664Ай бұрын
found any good one?
@DatSwif Жыл бұрын
For me, this video has pruned hours of searching for how this algorithm works. Thank you so much for this nice and clear explanation!
@DennisPing3 жыл бұрын
It's nuts that you could fit so much information into 11 minutes. Great video and diagrams.
@jej31253 жыл бұрын
Excellent description of the MinMax (w/pruning) approach to searching the tree of possible games.
@soaapppppppp2 жыл бұрын
I feel like I need to send this video to my professors so that they can learn how to teach. In particular I loved how you ended the video. Really brought home the power of AI and it's relevance. Felt like a "so what?" Never really thought about how important that was because none of my CS professors has ever done it right.
@InXLsisDeo Жыл бұрын
To be fair it's more time consuming but also easier to explain in a video rather than live because you have all the time you need to go into as much detail as you need and correct your mistakes before releasing, while when you are on the blackboard, you have to think about what you are saying live, so it's easy to make mistakes or overlook something, or be less cleaar than you want to be. A video is more akin to writing a book chapter or a blog post. But that's why KZbin is so precious.
@sokmalinowy60382 жыл бұрын
An incredible tutorial. Simple, quick and legible.
@ilkeyigiter30382 жыл бұрын
Incredible...I listened to an hour long lecture without understanding it and all I needed was a 11min video.
@frontire_ace3 жыл бұрын
Your robotic and static pace of the voice makes it even more amazing, although I am struggling but that's my problem. The step-by-step procedure of your explanation pathway seemed pretty good! Thanks fam.
@edmund-osborne5 жыл бұрын
Extremely helpful because you included the code and an in-depth explanation. Thank you!
@TheDannyjoblack9 ай бұрын
This explanation is miles better than that of my professor. I am a great student and went on here for guidance in rather simplistic terms, and you beautifully delivered.
@rodanon1984danoron4 ай бұрын
you are a great student, yet you can't understand your professor's explanation? You don't seem that great, to be frank.
@hbcoding5553 Жыл бұрын
Thank you so much for this. Many people explain minimax codes and alpha beta pruning, but none that I have seen actually gave some sort of coding example. Thank you for this. its amazing.
@fledgeart8 ай бұрын
This channel is by far the most interesting and useful channel I've ever come across, and im so glad I've been able to watch and learn from these videos over the past few years. thank you, truly
@efecantepe39903 жыл бұрын
Man, I am trying to program a checker-engine and this video definitely shows how I am going to start. Excellent.
@Mew__2 жыл бұрын
For some ungodly reason, alpha-beta keeps reappearing in my university courses. This is the third year in a row that I'm referencing this video -- and it delivers every time.
@randomrandom4504 жыл бұрын
Thank you, after a couple of videos explaining minimax + alpha-beta pruning, I got the idea of the theory but couldn't figure out the code that is... in the end pretty simple when you explain it. Simple recursion, a dept first search passing down a min and max as parameters. Thank you for the simple step by step explanation.
@Kudoshi2 жыл бұрын
I paid thousands of dollars to go for university. Ended up listening and understanding more from an 11 minute video from youtube. Thanks alot man
@MrSonny6155 Жыл бұрын
I was under the impression that pruning can only occur if there was a value immediately above and that it was doing some sort of local comparison, so seeing 7:23 blew my mind. Now that I've actually seen the algorithm, this makes so much more sense.
@cristibranisteanu53384 жыл бұрын
You explained in 11 minutes, what the teacher tried and failed in 2 hours and 120 slides! Great Video!
@gabrielmarcondes98143 жыл бұрын
this video is so good that I will download and backup it everywhere possible so civilization never loses this encapsulated knowledge. super job mate. your channel is just awesome.
@puppergump41172 жыл бұрын
If google starts deleting youtube we're all screwed anyways.
@minimanzero22625 жыл бұрын
Literally the best resource for minimax out there well done. This is amazing content instant sub
@jazzper_nl10 ай бұрын
Studied AI at university 1999-2003 and with the current AI popup trying to relearn everything from the past (how ironic). This video helped a lot! We used Prolog back than.
@tuulosss2 ай бұрын
Even though this video is old, I'd like to thank you for making it. It was a great help for me in learning this for my exam. Good job!
@committedcoder33524 жыл бұрын
When I first watched this video so long ago, I was so confused, but now I’ve done my first year of CS at college and it makes perfect sense! Wow. Weird that education actually did something for me.
@dieulam28302 жыл бұрын
amazinggg!!! You explained better than my teacher at school
@manhtiennguyen1704 Жыл бұрын
very true
@keithdavis003 жыл бұрын
Nice. I've been teaching this on and off to summer interns for a couple of decades from published papers and a whiteboard, but this video will be a first-stop teaching tool--thanks!
@marcosalmistraro78693 жыл бұрын
thank you so so much man. You managed to explain this in a much much better way than the professor at my uni, who took 1.5 h to basically say nothing. May the gods be in your favor
@haribhatt343 жыл бұрын
You have forced me to leave a comment, which I rarely do on a KZbin video. This is the only video/explanation I have watched for Minimax and Alpha beta pruning. I can confidently says, the only one anyone might need. The code for minimax could have been intimidating, but you explained it beautifully. I subscribed your channel even though I don't do graphic stuff, just a random DS Algo guy. I am happy that I stumbled upon this video. Would love if you keep uploading some more DS Algo Videos.
@ollieellis61894 жыл бұрын
having the edges colour schemed was super useful thank you
@Ch1n4Sailor6 жыл бұрын
Thank you!!! The best, simplistic and straight-forward example in I've seen... Thank you for making this understandable... Every other video on this (other than yours...!) leaves you more confused than the last...
@jatinsaini77903 жыл бұрын
This video is the best video on KZbin explaining this algorithm.
@waltersmith81343 жыл бұрын
I was really confused by almost all other videos about this topic, but you made it clear and showed really nice examples. Great video!
@dannychan94613 жыл бұрын
Your explanation is way better than my teacher did... Thanks!
@builtbydhruv7 ай бұрын
best vedio on minax i came accross . It is way way better than the MIT lectures .
@Coder-zx4nb5 жыл бұрын
This made so much more sense. Way less cluttered than the other popular video on this topic
@eeriksp4 жыл бұрын
You have a very clear voice and it is very easy to follow. Thank you!
@WaseemYusuf5 жыл бұрын
OMG!! This is the first of your videos I am seeing and I simply can't express how good it is. The way you showed the code and stepped through it to explain was just so ELEGANT! Liked, commented and subscribed!!
@ShubhamGupta-nm1tz5 жыл бұрын
This guy is a legend. Haven't seen a clearer explanation of this algorithm anywhere else.
@michaelpersiyanov61314 жыл бұрын
I love this video. I've been searching for an easy explanation for the *idea* behind alpha-beta pruning for days. The video just took a few seconds for me to get it. Subscribed.
@Qubit313Ай бұрын
I don't know how to be grateful enough! Thank you so much sir ❤
@gerecht_0528 Жыл бұрын
This man wrapped up this concept in 11 mins whereas my university professor and his TA failed to do so miserably for over 2 weeks. Our education system sucks. We need more qualified people in our institutes. Thank you for your efforts @Sebastian Lague.
@adnansamivlogs77899 ай бұрын
My God, thank you so much for uploading this. My professor can't explain any of this, so You Tube is my lifeline at the moment. God bless you in your endeavours InshaAllah!
@vuhoang590310 ай бұрын
If the player makes a move that is not considered optimal (according to the evaluation function) then the bot would gain even more benefit than it expected since the algorithm assumption is both players will make the optimal move. Also, this is just the algorithm, whether the bot is considered smart or not depends mostly on the evaluation function of the bot (this is where all the strategies of the bot go).
@geoffreymartin8019 Жыл бұрын
Best explanation of minimax I found. Helped me get through my tic-tac-toe app. Thank You!!
@chaoticprogramming3 жыл бұрын
Thanks! I was trying to make a chess AI since your video but I might have overstepped my current skill bounds so I am making a checkers AI, and this sped it up a lot! I am still looking for more improvements, but this was great to start out.
@dhimanashish4 жыл бұрын
Well explained man! I knew how it works but I think I still ended up learning something after watching your video.
@AliAli-wi2ys3 жыл бұрын
4 years after and still useful
@henriquesousa60892 жыл бұрын
Really good. I was looking for a better explanation of alpha and beta code wise. This did the job perfectly
@Ohrenbanane3 жыл бұрын
Very nice explanation with great visualization. Also very helpful that you showed this pseudcode and went trough it step by step.
@emmanuelparvez52346 ай бұрын
The best explanation of this algorithm's code!
@yuxiaofei3442 Жыл бұрын
so clear,this is what call good education video,deep explain,yet damn easy grasp
@code19975 жыл бұрын
Thanks for this video mate, you explained this way better and faster than our Professor
@zaynabb.51409 ай бұрын
you explained it better than my professor explained it in 75 minutes, tysm
@MattYang4 жыл бұрын
Absolutely fantastic video, amazing production quality. Just fantastic all around!
@PunmasterSTP2 жыл бұрын
Minimax? More like "Man, these are some great facts." Thanks for sharing; this was a really illuminating description and demonstration of the algorithms!
@lucaswerlemelz95026 ай бұрын
Great video and very helpful. One thing though that got me a bit confused is that you are using the concept of depth in the opposite way that it is the standard for trees. Usually, depth 0 is the root of the tree, and then you increment as you traverse each layer of child nodes. But anyway that is just a convention. Your explanation of the algorithm is 10/10.
@rafsangoni69793 жыл бұрын
My university took a screenshot of your pseudo code to teach this topic. But without this video is something else. Nice explanation, great work!
@zzador4 жыл бұрын
I really like your videos. Your voice is so soothing it's almost as Bob Ross would have given a programming course. All your code is well explained and easily understandable. Besides that your videos are incredibly inspiring.
@leducphuclong Жыл бұрын
This is the best explanation I ever watched, I'm sure !!
@rodrigoborjas77275 жыл бұрын
This is the Best algorithm video. It left me min understanding and max confusion.
@dmuiruri3 жыл бұрын
a very intuitive demo of the algorithm
@Dark_Peace3 жыл бұрын
me after spending 30min on wikipédia : this is black magic me 2min into Seb's video : I understand everything !
@simonroed69213 жыл бұрын
This is my first comment ever on KZbin, but I simply had to comment on this one to show my appreciation for how incredible this explanation was! Thank you!
@minimalistasimples4 жыл бұрын
Thanks for uploading the video. Its really insightful for people who want to learn
@PMA_ReginaldBoscoG2 жыл бұрын
Give this man 1 million subscribers soon.
@alehandr0s5 жыл бұрын
Best minimax algorithm explained video. Kudos
@jeeylaanoromiyaa25695 жыл бұрын
mini max video xxx
@JO-vj9kn4 жыл бұрын
Fantastic work! I'm basing my AI agent solely on this video so hope it's correct ;) It's so much more intuitive to see it animated than reading some greek pseudocode.
@中文中国-t4u6 ай бұрын
Man keep updating these cool videos they are helping a lot thanks for your hard work
@poneis884 жыл бұрын
Thank you very much for the explanation, especially about alpha-beta pruning. It was the clearest explanation I saw so far.