Great explanation! Some important notes as well: 1) only in a Max node can update the corresponding alpha, so does Min for beta. 2) v can only be returned up to its parent 3) alpha and beta can only be passed down from its parent 4) cut the current node from the tree whenever alpha >= beta In the graph on the right whiteboard, shouldn't all the alpha, beta are initialized as -infinity and infinity, respectively? At 13:07, for the completeness of the logic flow, I think we should set the beta to be 2 in the node(v=2, alpha=8, beta= ), then because alpha(8) > beta(2), we prune the right subtree.
Great teacher, got a B on my AI exam with your videos about tree search algorithms 👌 explained it way better in a couple of minutes than my teacher in an hour
Every single time I see that you have uploaded a video about a topic, I lose all fear, that I'm not going to be able to understand it. This is not an exaggeration, you've helped me avoid so much confusion and desperation. Thank you so much John!
the best explanation about minimax. You are a great professor. I watched a lot of videos about minimax algorithm, but only your video I understood clearly
Wonderful video. This helped a lot! Working through the example in real time and explaining your thought process as you went really helped make this click.
Watched it in approximately 9 minutes (X1.5 speed) and this has been the most precise and to-the-point explanation I have watched so far and believe me I have watched many. Thank you sir
The best explanation of alpha beta pruning. "If the value is greater than beta that means min is going to prefer the branch that lead to beta." That line made it click for me.
I want to thank you sir, you have done what my teacher was unable to do, a good explanation, it took me three days to understand this, and finally I understood thanks to this video
I must be missing something because the following scenario seems like a possible scenario where alpha beta pruning can discount a superior position down the road. In chess, isn't it possible to have a move sequence where moves 6 ply out may show an inferior score for white but if the line was analyzed further, we'd see that white might be able to force a mate by taking a material loss. Wouldn't alpha beta pruning possibly discount such a line by abandoning further computational depth for that line such that it would never be able to see that a temporary drop in maximization of white's score actually sets up for a win for white? I guess my question can be reduced to this: Is it possible for alpha beta pruning to discount a line that is temporarily inferior (low score) but a few moves further out we discover a forced mate? Could alpha beta pruning throw out the analysis for such lines? Also, the entire principle of the minimax algo (in my opinion) is the scoring we give specific positions based on what information has been learned about chess over the centuries. We rank certain material with specific scores and also certain positions with specific scores. If the methodology of scoring the current state of the chess game is imperfect, then the minimax algo may not always be 100% optimal in the search tree it explores based on those scores. Let me give a quick counter example to (hopefully) better illustrate my argument. In the game of chess, there is really only one ultimate score -- is there a sequence of moves from the current game position where white (or black if playing black) can force a checkmate of the opposing king. Every other analysis within the game is of no consequence if it doesn't lead to a line where the opposing king is checkmated (or if checkmating is not possible, the only other analysis of consequence is trying to draw the current game). A new chess engine called Oracle is created using hardware from thousands of years into the future. Oracle is able to analyze 100 ply within the game in a matter of microseconds. Oracle discovers a line where white sacrifices four pieces (let's say a pawn, a knight, a bishop and a rook) in order to force a mate on the opposing king approximately 20 moves out. Now in this example, wouldn't current engines stop processing this line after the first or second piece was lost because the minimax score / alpha beta pruning? The current engine might discount the sequence of moves and call the first sacrifice a blunder because it never processed this particular line deeper. I could be way off here because my knowledge of minimax with A/B pruning is incomplete -- that's why I'm throwing this out there for others with more experience. Is this a disadvantage of minimax with AB pruning?
Wow, this lecture helps me understand the alpha-beta algorithm, the pseudo code is very helpful to understand. Quite intuitive. Where is the link for the assignment?
amazing explanation would be better to set Alpha to -minus infinity and Beta to Plus infinity and to set v initially to -infinity if we're max and +infinity if we're min. Helps clarify the decision making.
Thank you sir! I was wondering if there is a formula that can calculate the maximum number of nodes that can be pruned in a tree with a depth of d and a branching factor of b.
What would be a real life example ?. For example, when robo vacuum is trying to clean a house, what would be the example of pruning here ?. Is pruning happening when robo vacuum for example when it says task finish although it's not like skipping task because there are an obstacles blocking its way?
pruning can miss the best value returning. In the example, the best value should be 9 not 8. Pruning can accelerate the performance, but it not always give the best result (or best move).
Great explanation! Some important notes as well:
1) only in a Max node can update the corresponding alpha, so does Min for beta.
2) v can only be returned up to its parent
3) alpha and beta can only be passed down from its parent
4) cut the current node from the tree whenever alpha >= beta
In the graph on the right whiteboard, shouldn't all the alpha, beta are initialized as -infinity and infinity, respectively?
At 13:07, for the completeness of the logic flow, I think we should set the beta to be 2 in the node(v=2, alpha=8, beta= ), then because alpha(8) > beta(2), we prune the right subtree.
all solid things to point out, thanks
It works like a charm, Thanks!
Yeah, this algorithm is total shit
beta would never assigned the value of two; the function would return before that variable assignment.
Thanks this helped me so much, you have no idea
Excellent explanation! The video is clear, concise, and precise. We want more videos from you. Please teach us more about AI.
Great teacher, got a B on my AI exam with your videos about tree search algorithms 👌 explained it way better in a couple of minutes than my teacher in an hour
Great work! Well done
THANK YOU SIR! I finally know alpha beta pruning!!! Your explanation was crystal clear. If you taught my AI course, I would never ditch class!!
Every single time I see that you have uploaded a video about a topic, I lose all fear, that I'm not going to be able to understand it. This is not an exaggeration, you've helped me avoid so much confusion and desperation. Thank you so much John!
the best explanation about minimax. You are a great professor. I watched a lot of videos about minimax algorithm, but only your video I understood clearly
5 year later and still best video on alpha-beta pruning. Thank you sir.
Thanks for making me feel old! Very glad it's useful 😀
Thank you very much sir , explaining with the algorithm side by side helped a lot.
As a self-learner, this video is by far the best explanation I've ever seen. Clean, concise, and to the point.
This definitely has to be the most thorough explanation I found on the topic. Thank you! :D
He is god. He explained everything in just 13 minutes. I wish if I came across this video earlier it could have saved my time. Great teacher!!
I'm so thankful that this video exists in RUclips ❤❤❤❤
Your videos are so concise and helpful. They're the only thing keeping my grade decent in my Intelligent Systems class.
Glad you like them!
One of the best video on youtube to understand Alpha Beta pruning.
Want more video like this to get more understanding of AI.
You are a great lecturer, not many people can do this.
Thanks! :)
Thanks. That was my nth video on that topic and this time it clicked. Thanks for taking the time to go through it so deliberately. :)
You're very welcome!
Can you do a video on nonlinear planning with Goal Stack...
Just wanted to thank you for your great videos! Watching them pre-exam to refresh and they're all very clear and informative
Wonderful video. This helped a lot! Working through the example in real time and explaining your thought process as you went really helped make this click.
He saved my exam. Thnxx sir for such a great explanation.
Watched it in approximately 9 minutes (X1.5 speed) and this has been the most precise and to-the-point explanation I have watched so far and believe me I have watched many. Thank you sir
This is the best video I have seen which explains the algorithm along with the graph.
This is the hotest content online about this chapter!
So concise and precise!🎉
Thank you!
it's just amazing. all your videos are the definition of crystal clear explanation. perfect. I wish you'll do more videos
Fantastic explanation. No one on RUclips has ever explained this algorithm so nicely using it's pseudo code . Very nice Sir, Respect
Great explanation! I already knew what steps to take, but it wasn't really clear why I should take those steps. It is clear to me now.
Why was this so hard for me. U explained this so easily
Watching this once saves me so much time that might've gone into reading through a textbook section on this particular algorithm
I have to admit you are the only one who could explain and impart knowledge to even the dumbest person like me. You are the great great teacher.
The best explanation of alpha beta pruning. "If the value is greater than beta that means min is going to prefer the branch that lead to beta." That line made it click for me.
Respect to you sir. You explained it so well! I'm very grateful!
Thank you. I've seen many videos and could not understand until I saw this video. Many thanks for your clear explanation!!
Don't expect to instantly understand this topic, but your video did it. Thanks. :D
Awesome!! Seen most of your videos(Loved A* video too) and I must say that this topic was a bit tricky till I saw this ! You make it sound so simple
Your videos help me so much with my course, thanks!
This is the best video about this topic
One of the best explanation, Thank you John Levine.
Thank you Sir, after checking many videos on the same topic, your lecture makes me understand the topic.
I want to thank you sir,
you have done what my teacher was unable to do, a good explanation,
it took me three days to understand this, and finally I understood thanks to this video
Thank you very very much! It takes a long time for me to understand the alpha-beta pruning .Luckly ,I find this vedio.
Nice lesson, Biblo. The great eye watching you is pleased.
an excellent teacher , thank's a lot. we'r waiting for more courses about AI :) Good luck
this is amazingly helpful for me! thank you sir for this explanation!
Thank you for this amazing video and explaination, not many have the ability to do this 🌸🖤
thank you for the video, it really helped me a lot doing my exam study!!
Really good!! Thanks for taking the time to explain it properly.
Thank You . You're an amazing teacher .
Thanks Shivam! Glad you found it useful.
God Bless This Beautiful Explanation🙏
Brilliant explanation. Just what I needed. Thank you.
Thank You so much sir!
God Bless you!
The only explanation that made sense to me!
I must be missing something because the following scenario seems like a possible scenario where alpha beta pruning can discount a superior position down the road.
In chess, isn't it possible to have a move sequence where moves 6 ply out may show an inferior score for white but if the line was analyzed further, we'd see that white might be able to force a mate by taking a material loss. Wouldn't alpha beta pruning possibly discount such a line by abandoning further computational depth for that line such that it would never be able to see that a temporary drop in maximization of white's score actually sets up for a win for white?
I guess my question can be reduced to this:
Is it possible for alpha beta pruning to discount a line that is temporarily inferior (low score) but a few moves further out we discover a forced mate? Could alpha beta pruning throw out the analysis for such lines?
Also, the entire principle of the minimax algo (in my opinion) is the scoring we give specific positions based on what information has been learned about chess over the centuries. We rank certain material with specific scores and also certain positions with specific scores. If the methodology of scoring the current state of the chess game is imperfect, then the minimax algo may not always be 100% optimal in the search tree it explores based on those scores.
Let me give a quick counter example to (hopefully) better illustrate my argument. In the game of chess, there is really only one ultimate score -- is there a sequence of moves from the current game position where white (or black if playing black) can force a checkmate of the opposing king. Every other analysis within the game is of no consequence if it doesn't lead to a line where the opposing king is checkmated (or if checkmating is not possible, the only other analysis of consequence is trying to draw the current game). A new chess engine called Oracle is created using hardware from thousands of years into the future. Oracle is able to analyze 100 ply within the game in a matter of microseconds. Oracle discovers a line where white sacrifices four pieces (let's say a pawn, a knight, a bishop and a rook) in order to force a mate on the opposing king approximately 20 moves out.
Now in this example, wouldn't current engines stop processing this line after the first or second piece was lost because the minimax score / alpha beta pruning? The current engine might discount the sequence of moves and call the first sacrifice a blunder because it never processed this particular line deeper.
I could be way off here because my knowledge of minimax with A/B pruning is incomplete -- that's why I'm throwing this out there for others with more experience. Is this a disadvantage of minimax with AB pruning?
Great presentation of work. would it be possible to link the supplementary material associated with this lecture?
Goated Explanation Sir!
Wow, this lecture helps me understand the alpha-beta algorithm, the pseudo code is very helpful to understand. Quite intuitive. Where is the link for the assignment?
Great explanation 👌
Very good video. I will now attempt to code my own tic-tac-toe solver :)
this mans single handedly getting me through AI
this is life-saving sir thanks a lot ^-^
Thank you so much! You're the best!!
OMG! Very very clear! I came from CS188 step by step.
Damn, you are good. Thanks for helping
Awesome explanation sir thanks from india
amazing explanation
would be better to set Alpha to -minus infinity and Beta to Plus infinity and to set v initially to -infinity if we're max and +infinity if we're min. Helps clarify the decision making.
Thank you, sir. You are a great teacher!
This is so helpful!! Thank you so much!
Alpha-beta pruning using {v, α, β}: 4:33
very good Explanation Sir! :)
Best explanation by far
Thanks teacher...I watch your videos in Azerbaijan✨
Thank you so much for your video. It's really clear.
Is it just me or is he the actor who played Benjamin Linus from LOST (Michael Emerson)? He both looks and speaks exactly like Ben.
Thank you! Finally clicked after watching this video.
Great! Really glad it was useful.
Great explanation!
Amazing videos! Thank you!
this video was so helpful.
thank you.
Tomorrow I'll have my final exam of this, wish me luck please! You're a sigma beast
Good luck Fabio!
Good work right there!!!
thanks man, you gave me a great favor
this guy makes me wanna go back to school
Great Explanation! Thanks alot.
Thank you so much!
Thanks. your explain is quit clear😊
bsdk english to theek se bol le 6th pass ma ki chut
I did not understand why the last branch was pruned, at V=2,alpha=8 and beta=' '(where the values are 9,-1), alpha was definitely > 9 and alpha>beta
Thank you sir! I was wondering if there is a formula that can calculate the maximum number of nodes that can be pruned in a tree with a depth of d and a branching factor of b.
Again, superb teaching. Thank you!
Thanks!
loved the way you explaine
Very clear explanation, Thank you
great explanation!!! Thank you!!!
thank you so much for the lecture.
Great video, great explanatiom!
Would the -2 value not be pruned as we have a deep cut off situation ? We can see that Max will be = 8? Is there point in exploring -2?
Please make a video on Negamax as well, would be perfect if includes Transposition in the algorithm either. And thanks for the lesson, thank you.
Thanks a lot, you made my day !
What would be a real life example ?. For example, when robo vacuum is trying to clean a house, what would be the example of pruning here ?. Is pruning happening when robo vacuum for example when it says task finish although it's not like skipping task because there are an obstacles blocking its way?
You did not define the term "pruning". What do you mean "that will show you where the search can be pruned"?
It means the search will never explore that path. Pruned nodes and their child nodes will be ignored by the minimax algorithm to save computing time.
pruning can miss the best value returning. In the example, the best value should be 9 not 8. Pruning can accelerate the performance, but it not always give the best result (or best move).
Sirrr love your vids
great explaining prof
Thank you so much sir. !!!!
THANK YOU SIR, you saved my exam