Step by Step: Alpha Beta Pruning

  Рет қаралды 694,179

CS188Spring2013

CS188Spring2013

Күн бұрын

Пікірлер: 259
@nguyendh92
@nguyendh92 9 жыл бұрын
You saved my ass right before my A.I exam
@RudolfCickoMusic
@RudolfCickoMusic 9 жыл бұрын
+Dinh Hung Nguyen yeah
@DFAEHR89
@DFAEHR89 8 жыл бұрын
+Dinh Hung Nguyen Attention please at minute 2:28 !!! Hello :) Thank you very much for your explaination. It is very helpful. The algorithm checks whether the value 4 is higher or equal !!! to beta. Thank you, BR
@MohammedYousri017
@MohammedYousri017 7 жыл бұрын
i have an AI exam in a few hours lol
@nanomeite1268
@nanomeite1268 7 жыл бұрын
me 2
@lava_tiger
@lava_tiger 9 жыл бұрын
Thanks for the video! Even though this is a relatively simple algorithm, the only way to really understand it is to go step by step on a toy problem, like you did. Excellent job!
@notjosh934
@notjosh934 3 жыл бұрын
6 hours before the exam and I'm studying now. Why am I like this
@vipulnj512
@vipulnj512 7 жыл бұрын
While examining the children of a maximizer, if v of maximizer > beta, prune the rest of the children. While examining the children of a minimizer, if v of minimizer < alpha, prune the rest of the children.
@uasiva1997
@uasiva1997 6 жыл бұрын
💯
@NormaNsNs
@NormaNsNs Ай бұрын
ty you cleared my doubts !
@bryanbocao4906
@bryanbocao4906 6 жыл бұрын
Some important notes: 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
@yastv4568
@yastv4568 5 жыл бұрын
Thanks man that helped A LOT .
@suryasuresh9330
@suryasuresh9330 4 жыл бұрын
This video helped me understand pruning better thank you! Those of you complaining abt how messy it is, draw it yourself as he goes along.
@a3lex334
@a3lex334 9 жыл бұрын
A very good explanation. A lot of people are complaining about how this could be more simple, but look at the title, it shows you if how exactly algorithm would do this.
@VibeWithSingh
@VibeWithSingh 10 жыл бұрын
one advice: Keep it clean and clear !!
@Silvergrooves42
@Silvergrooves42 10 жыл бұрын
If you understand the minima concept, this is an awesome explanation and it really helped me a lot. Thank you
@ArindamReviews
@ArindamReviews 10 жыл бұрын
Very well detailed explanation of alpha beta pruning given Sir! You are really a good teacher, saved me from this confusing algo! I was tearing my hair getting to understand this, until i came over to your video. Thank you so much!
@aritrakundu8169
@aritrakundu8169 10 жыл бұрын
Worst teacher
@ArindamReviews
@ArindamReviews 10 жыл бұрын
why? You didnt understand the explanation? :(
@aritrakundu8169
@aritrakundu8169 10 жыл бұрын
Nope. Nada.
@ArindamReviews
@ArindamReviews 10 жыл бұрын
:-(
@vikas1590
@vikas1590 9 жыл бұрын
This is a great explanation. I am shocked to see that some people disliked this video....
@grandma_soup
@grandma_soup 5 жыл бұрын
I found this very helpful especially once the values of alpha and beta weren't just infinity and -infinity! I kept pausing the video and working through a couple steps then playing the video to see if I did them right, which really helped me grasp when you change the values of alpha and beta. Great video although it did take me a couple watches to fully get it!
@engineerguyvideos2552
@engineerguyvideos2552 9 жыл бұрын
I know it makes sense and all, but it sure does take a few minutes for it to sink in and stick. Glad you went through the entire process.
@moraigna66
@moraigna66 8 жыл бұрын
Anyone else following the General Game Playing course on Coursera? The Alpha-Beta Search was by far the most confusing one (because of lack of an example) so far in the lectures and this helped a lot.
@moraigna66
@moraigna66 8 жыл бұрын
+moraigna66 Also, there was a lack of a well defined system. No where it mentions how the alpha must only come from "above" for a minimizer but the same minimizer can use a beta from a previously explored "lower" branch and vice-versa for the maximizer.
@dtyuify
@dtyuify 8 жыл бұрын
Congratulations, very well explained. It was very usefull for me. I agree there is not much tutorials which explain this concept as u do. Again, congratulations and thank you man.
@kakkwxt3653
@kakkwxt3653 8 жыл бұрын
To be honest, I found MIT's lecture is a little bit better. The lecturer at MIT (Patrick Winston) provides more intuition behind the alpha beta pruning, while Prof Pieter Abbeel, although shows clear logic behind each step, does not give us reson for why you should do this, and the example is a bit complicated as well. So I personally recommend watching the MIT's AI lecture 6 at first, then watching this.That would be a perfect complement.
@sequencer7-l7p
@sequencer7-l7p 8 жыл бұрын
Thank you for sharing. I understand better now.
@Crisp3333
@Crisp3333 8 жыл бұрын
Yes you are absolutely right, he explains it much better!
@CallumAtwal
@CallumAtwal 8 жыл бұрын
Yup, watch the MIT lecture first then this one! Helps so much
@sourabhbhattacharya8464
@sourabhbhattacharya8464 6 жыл бұрын
exactly......followed your sequence ........helped a lot
@desmondtehweiloon4707
@desmondtehweiloon4707 6 жыл бұрын
Agree, you are correct. The lecture explained better than this guy. Maybe I was a dumb or something. Can't get this video's idea T^T
@monyettenyom2540
@monyettenyom2540 3 ай бұрын
Why is the second child of the middle minimizer pruned? below as a child of minimizer is a maximizer. The v value of the maximizer between 0 and 1 is 1. So at the minimizer we have v = 1, because 1 is the better option than 2.
@dotafarm2699
@dotafarm2699 9 жыл бұрын
you dont know how much u saved me. thanks so much man
@1stMusic
@1stMusic 8 жыл бұрын
9:05 : How are we so sure that there is a lower value in the next branch, thus pruning this branch? I lack the understanding of how you come to that conclusion. If anyone could clear that up for me, I thank you so much.
@toriknorth3324
@toriknorth3324 8 жыл бұрын
+1stMusic Ah, it's not that there's a value less than 2 in the right branch, it's that the minimizer has has the option to choose 2 at that node (and possibly a lower value than 2 if it turns out that the right branch does have a lower value). Since the minimizer has the ability to choose a 2 (or maybe lower) in the main center branch, the maximizer would compare the value of 2 with the value of 6 to see which is higher. If the maximizer chooses the center branch then the minimizer would be able to force a game value of 2 or less; however if the maximizer chooses the left branch then the minimizer only has the ability to force a value as low as 6. thus the maximizer will only want to choose the left branch at that point, no matter what other unexplored values there are in the center branch. Hope that helped if you were still wondering about that.
@1stMusic
@1stMusic 8 жыл бұрын
Tori Knorth Thanks, I got it!
@donpkchannel7203
@donpkchannel7203 3 жыл бұрын
Minute 8:26 why is he sending up 2? instead of 6 which is the highest alfa, beta is still infinity. Dont understand this, is he doing wrong?
@jlpicard7
@jlpicard7 6 жыл бұрын
At around 2:22 to 2:29, Pieter says "for that it checks the following conditions: it checks whether this value of 4, the current value here is higher than beta. If that's the case, then it doesn't need to look at any further children here..." He should have said "...higher than OR EQUAL TO beta."
@Neophytez
@Neophytez 6 жыл бұрын
2:27 should be: current value is higher OR EQUAL than beta
@manifestingtruth8866
@manifestingtruth8866 5 жыл бұрын
Only this is clear and accurate tutorial i have found on the internet..today is my AI exam..thanks a lot to you.
@Lavapulse
@Lavapulse 11 жыл бұрын
Thanks :) Currently working on this in my AI class and this helped a lot.
@kingshanaman
@kingshanaman 2 ай бұрын
The maximizer , towards the end, that has the 8 and 1 doesn't it prune the 1? I think we should prune the 1 the same way the other maximizer, with 9 and 2, prunes the 2. In my understanding, once the maximizer finds the 8 it will prune the 1 because 8 > 6. Remember we said that the maximizer will prune if its value > Beta. I may be wrong but an explanation would be great.
@MultiSmokeDank420
@MultiSmokeDank420 11 жыл бұрын
This video helped me very much with my Artificial Intelligence course. Thank you for taking the time to make this video.
@hugoburton5222
@hugoburton5222 5 жыл бұрын
13:39. It can't be pruned because what happens if that 2 was a 7. When it gets to the minimizer, a 7 is lower than the 8. Therefore it wins, when it gets to the root, the 7 is greater than the 6 therefore the 7 wins. Thus it can't be pruned.
@jonobrien8848
@jonobrien8848 Жыл бұрын
How do you know the nodes are sorted like this such that the max/min knows to prune vs the other node being possibly lower on the same depth pair? (Like when 7 prunes 9 and it was swapped order)
@mistermiyagi6073
@mistermiyagi6073 5 жыл бұрын
this makes a lot of sense if you've already seen this like at least a dozen times. if you're new, don't even waste time watching this
@BigBobSchnobb
@BigBobSchnobb 7 жыл бұрын
In the branch to the right, alpha is already set to 6. This means that the v should be set to 6 initially in the max-nodes, not -infinity as is shown in the video. If you find this hard, look up the minmax algorithm. Alpha-beta is built upon minmax
@BryantSong
@BryantSong 11 ай бұрын
Always initiate unexplored max node to -infinity
@mateuszmagda6522
@mateuszmagda6522 11 жыл бұрын
Listen to the explanation around 09:00 . "A maximizer has a better option than two- six" which comes from the previous branch, incidentally.
@ClarkNi-o4o
@ClarkNi-o4o 5 жыл бұрын
Hi, what if the first node is negative value? For example, if it is -5?
@andredejager3637
@andredejager3637 2 ай бұрын
Hint: if you watch this in reverse it is also difficult to understand
@roarlisfang2860
@roarlisfang2860 4 жыл бұрын
A little bit messy But still 100 times better than my University's AI lecturer My understandeing: When a maximizer is going to look at other children, check if it already has a value that is greater than the best minimizer value along its way to root, you can stop it because the only thing it can do is to make this value more than the current value, however the current value is already greater than the best minimizer value, so the upper minimizer will discard this node anyways. Same thing to a minimizer, if it discovers its value is already smaller than the best maximizer value, you can stop it from expanding, because the only thing it can do is to keep lowering that value and it will be discarded later.
@michaelbauers8800
@michaelbauers8800 9 жыл бұрын
Pretty good explanation. I think the hard to get part, for me, is the best path to the root concept. But if one works through some trees, I think it becomes more clear.
@canzengin3691
@canzengin3691 6 жыл бұрын
Hey thanks for video if we apply alpha beta pruning right to left instead of left to right is it effect the result thank you
@YalnekH
@YalnekH 10 жыл бұрын
Great tutorial, really helped me. But why are alpha and beta passed to leaf nodes? Is this because they're passed before we know its a leaf when implemented?
@azndramafrk94
@azndramafrk94 8 жыл бұрын
Wait. Why isn't beta changed in the middle tree with 2 as its maximizer? When 2 is the max for the node, wouldn't it be propagated up to the minimizer node? Alpha isn't changed but shouldn't beta be changed from +inf to 2? And since alpha > beta, the whole right subtree is pruned.
@muhammadtalha2363
@muhammadtalha2363 6 жыл бұрын
wish i could hit like button 100 millions times thanks man God bless yuh peace
@aimonallouache7993
@aimonallouache7993 7 жыл бұрын
This is a really well explained video. Thanks Pieter
@adamtheanalyst
@adamtheanalyst 3 жыл бұрын
Excellent walk through!
@hugoibanez
@hugoibanez 11 жыл бұрын
I think that the 6th leaf, the number 2 is wrong, isnt it suposed to be the 6 a better option?
@radulescuiulia8988
@radulescuiulia8988 11 жыл бұрын
Great video! I finally understood how alpha-beta pruning works! Thanx!
@notsubzero2992
@notsubzero2992 2 күн бұрын
bro cooked 11 years ago and He thought we wouldn't notice
@Craziestbanana
@Craziestbanana 5 жыл бұрын
it makes sense, but classifying the variable as internal structure of a node would've simplified your explanation greatly, and explaining that there appears to be two forms of pruning, local pruning and greater pruning, local where the local scope of an object is taken into account, in the first instance of the prune shown in this video; and the second where the tactical decision to circumvent this option was taken because no matter what option the maximizer presented to the minimizer the minimizer would've taken the value 2 or lower; as thats where it seems you confused alot of people. note i'm not stating there are different prunes, they use the same strategy just the reasoning behind the prune is different which i've represented with different names.
@nilanjanmhatre1960
@nilanjanmhatre1960 6 жыл бұрын
Thanks a lot. Well explained! I am not sure why others did not get it. Maybe if you first check the theory, then watch this, you should get it.
@noodletrooper
@noodletrooper 10 жыл бұрын
This is the best video explanation on youtube for alpha beta pruning
@seimkeim
@seimkeim 7 жыл бұрын
No, it's not.
@aaron___6014
@aaron___6014 7 жыл бұрын
nope
@MorrisHsu-h1p
@MorrisHsu-h1p 6 жыл бұрын
kzbin.info/www/bejne/sKGWh4CbZa-jnJo&ab_channel=JohnLevine way better
@rain_357
@rain_357 Жыл бұрын
This was really helpful for me. Thank you!
@airsoftdude0
@airsoftdude0 4 жыл бұрын
Great video, really helped! (I'm a junior majoring in AI and Robotics)
@ckoparkar
@ckoparkar 11 жыл бұрын
Thank you. This helped me a lot !!
@jreaganmorganchannel
@jreaganmorganchannel 9 жыл бұрын
First you do this. Then this. Then magic. More magic. Done. Do you understand now?
@malcolm5969
@malcolm5969 8 жыл бұрын
are you kidding me?? or are you a kid in real??? best explained ? where is deep cutting you dumb??
@MoSho23
@MoSho23 7 жыл бұрын
Which part, or what aspects lost you? This stuff always seems like magic at first, but asking questions, discussion, and going t/ examples really helps. I've been trying a few problems before this video, and it really helped make some of the steps click.
@WhatThyHex
@WhatThyHex 7 жыл бұрын
It's well explained it even has to much info, like addition of minimizer at the (main) root. But if you don't understand this I suggest dodging any kind of algorithm based courses in the future
@chilinouillesdepommesdeter819
@chilinouillesdepommesdeter819 6 жыл бұрын
that's because the depth is only 4
@adityasuri4739
@adityasuri4739 5 жыл бұрын
😂😂
@ganfiteatro96
@ganfiteatro96 7 жыл бұрын
3:22 how is 6 better than positive infinity?
@lkez2
@lkez2 7 жыл бұрын
Well it's less than pos inf so which means it isn't higher than the minimizer's current min value so it's valid.
@dieterdietersen9673
@dieterdietersen9673 9 жыл бұрын
that video kind of saved my ass. thank you. maybe you can explain when the cut is called a-cut and when it is calles b-cut
@chrisedwards4584
@chrisedwards4584 11 жыл бұрын
best ever the best the most best fantastic explanation thank you prof.
@waseemusman2765
@waseemusman2765 9 жыл бұрын
Thank u sir.I have an A.I exam tomorrow.
@lancelofjohn6995
@lancelofjohn6995 3 жыл бұрын
nice video,I can understand the notion now.
@RebellisSpiritus
@RebellisSpiritus 7 жыл бұрын
Pretty much how Dragon Ball tournament was organized
@malharjajoo7393
@malharjajoo7393 6 жыл бұрын
lmao. dbsuper sucked ballz
@KindnessCultivator
@KindnessCultivator 6 жыл бұрын
dragon ballz that is ;)
@angelogomes1001
@angelogomes1001 4 жыл бұрын
underrated comment ...
@kellyzhang6012
@kellyzhang6012 5 жыл бұрын
9:07 going to be even worse for the minimizer. Because minimizer will keep the value
@yassiitz19
@yassiitz19 11 жыл бұрын
much appreciated, very thorough explanation yet clear and simple.
@gryzman
@gryzman 10 жыл бұрын
Clear as mud
@lemonwaterr
@lemonwaterr 6 жыл бұрын
Nice speech, could finally understand the concept with of this vid
@aliemara5125
@aliemara5125 11 жыл бұрын
Thanks a lot! I understand it much better now :) btw, i have a strange question: how do u write on the screen? is it a special digital pen? thanks again :)
@Vhanrox
@Vhanrox 12 жыл бұрын
thanks that helped to give me the last hint to understand alpha beta pruning =)
@pancekaradzov3885
@pancekaradzov3885 6 жыл бұрын
Such a messy explanation, I got more confused than I was before watching this video
@Harm00se
@Harm00se 9 жыл бұрын
This is brilliant, much appreciated sir.
@PelagicShadow
@PelagicShadow 4 жыл бұрын
You sir, are a GOD
@ParantapSharma
@ParantapSharma 10 жыл бұрын
a good student need not be a good teacher. to become a really good teacher, you need to spend 10 times more time thinking what is the best innovative way so that my students can grasp this concept easily.
@tweetiebirdism
@tweetiebirdism 7 жыл бұрын
I thought this would explain prune, the game... What language are you speaking?
@nirishamycharla2910
@nirishamycharla2910 6 жыл бұрын
Sir,it would be better if you explain it in different slides ....it is very difficult to understand.
@juicedup14
@juicedup14 4 жыл бұрын
5 rewatches later Its making sense
@wi11ic0ol2
@wi11ic0ol2 10 жыл бұрын
How if alpha and beta's value are the same? we stop?
@TheLoledOne
@TheLoledOne 10 жыл бұрын
u prune
@anishdesai3082
@anishdesai3082 11 жыл бұрын
Wonderfully explained. Thanks a lot!
@BBoyXy
@BBoyXy 11 жыл бұрын
Thank you Thank you Thank you :))) Very very helpful for Computer Engineer
@LavenderSky499
@LavenderSky499 9 жыл бұрын
This really helped me understand alpha-beta minimax! Thank you so much!
@hirisraharjo
@hirisraharjo 6 жыл бұрын
wait. 6 > +infinity? how?
@Darth_Bateman
@Darth_Bateman 5 жыл бұрын
So alpha beta pruning I've found is not explained well by ANYONE individually. I tried geeksforgeeks and hackerearth. I sort of grokked the logic, but then I realized something was missing. So, I came here. The idea that alpha and beta get passed down and up were actually huge, what helps is that alpha goes updated exclusively with maximizers. Beta gets updated exclusively with minimizers. If alpha is greater than beta, you prune the remaining trees if there are still unexplored trees.
@vishwassiravara9649
@vishwassiravara9649 9 жыл бұрын
Great video , very clear .
@uasiva1997
@uasiva1997 6 жыл бұрын
thanks a ton! one of the best explanations :)
@balazsvincze1368
@balazsvincze1368 4 жыл бұрын
Thanks, great explanation!
@johnsonkuan8823
@johnsonkuan8823 8 жыл бұрын
Great video. Thank you.
@infernoyance
@infernoyance 11 жыл бұрын
Thank you so much, for providing this lecture I was having quite a difficult time understanding how alpha beta pruning works...
@sunok7729
@sunok7729 10 жыл бұрын
can't thank you enough!
@EmilRock88
@EmilRock88 10 жыл бұрын
Geniusss!!!! You´v saved my work
@melvinc9583
@melvinc9583 9 жыл бұрын
Thank you so much for this video!!!! Why I can't have a lecturer just like you!!!!!!
@luanpd8397
@luanpd8397 7 жыл бұрын
OMG tks sir! you save my life !
@gazelledeleuze
@gazelledeleuze 9 жыл бұрын
Thank so much for saving my final *big thumbs up*
@SeanTraynor_dbblTS
@SeanTraynor_dbblTS 8 жыл бұрын
Minimisehuhhas an option 4:30 Got me cracking midst an exam revision session.
@lasandun
@lasandun 11 жыл бұрын
Thank you very much for the video. It really helped me!
@manisharyal4239
@manisharyal4239 8 жыл бұрын
What exactly are minimizer or maximizer?
@pha1994
@pha1994 8 жыл бұрын
you are the maximizer. Your opponent is the minimizer.
@nilanjanmhatre1960
@nilanjanmhatre1960 6 жыл бұрын
Consider a chess game, and there are only 2 moves available, hence two paths. The cost function or heuristic is (number of white pieces - number of black pieces). The Maximizer is the white player, who wants to maximize that heuristic function, while the black is the minimizer. But, each players' moves depend on the opposite player moves. Here, the top node is white, i.e. it is his move, hence it is the Maximizer. 2nd level is black's move i.e. minimizer, third is again white's move, hence maximizer. e.g.the 2nd level minimizer will minimize the inputs from both maximizers at 3rd level. "So, white is maximizing among all the black's minimized values and vice versa" Pruning is carried out bcoz, since minimizer will not allow that maximum value even though explored.
@frankzhang105
@frankzhang105 4 жыл бұрын
Thanks. Helps lots
@abhinavsharma8316
@abhinavsharma8316 10 жыл бұрын
Very nice explanation. Thank you :)
@ankitrko7
@ankitrko7 10 жыл бұрын
Awesome Explaination!
@amrmoneer5881
@amrmoneer5881 4 жыл бұрын
would appreaciate it if the pen explanation was more clear
@porada1000
@porada1000 11 жыл бұрын
Thanx man!!that was seriously awesome..
@rudebloke1
@rudebloke1 5 жыл бұрын
Ok not knocking the professor, but seriously, this was quite unclear and then more unclear, and then just muddy. For the best explanation check out John Levine's video: kzbin.info/www/bejne/sKGWh4CbZa-jnJo - he explains the minmax algorithm - he then explains the pruning algorithm. - it is simple - it is not messy - it is concise and not rushed.
@IsaacJoshi
@IsaacJoshi 6 жыл бұрын
great video
@videoguy640
@videoguy640 6 жыл бұрын
Might be hard if you're learning alpha beta pruning for the first time but excellent for review.
@kamilbolka
@kamilbolka 7 жыл бұрын
Nice and simple! Thanks.
@HenkEpic
@HenkEpic 6 жыл бұрын
what the fuck does the infinity do
@abigailhodge6588
@abigailhodge6588 4 жыл бұрын
This SAVED me on my AI midterm, thank you!
Minimax with Alpha Beta Pruning
13:44
John Levine
Рет қаралды 356 М.
A* (A Star) Search Algorithm - Computerphile
14:04
Computerphile
Рет қаралды 1,2 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Alpha beta pruning in artificial intelligence with example.
8:29
Crack Concepts
Рет қаралды 987 М.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 352 М.
Alpha Beta Pruning in Artificial Intelligence
19:53
ThinkX Academy
Рет қаралды 14 М.
Algorithms Explained - minimax and alpha-beta pruning
11:01
Sebastian Lague
Рет қаралды 1,1 МЛН
6. Search: Games, Minimax, and Alpha-Beta
48:17
MIT OpenCourseWare
Рет қаралды 461 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,2 МЛН
Samsung at CES: Everything Revealed in 7 Minutes
6:55
CNET
Рет қаралды 30 М.
minimax algorithm
20:37
Francisco Iacobelli
Рет қаралды 174 М.
A* Search
12:32
John Levine
Рет қаралды 439 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41