Step by Step: Alpha Beta Pruning

Sdílet
Vložit
  • čas přidán 7. 02. 2013
  • CS188 Artificial Intelligence
    UC Berkeley, Spring 2013
    Instructor: Prof. Pieter Abbeel

Komentáře • 252

  • @vipulnj512
    @vipulnj512 Před 6 lety +180

    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.

  • @nguyendh92
    @nguyendh92 Před 8 lety +153

    You saved my ass right before my A.I exam

    • @RudolfCickoMusic
      @RudolfCickoMusic Před 8 lety +2

      +Dinh Hung Nguyen yeah

    • @DFAEHR89
      @DFAEHR89 Před 8 lety +1

      +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 Před 7 lety

      i have an AI exam in a few hours lol

    • @nanomeite1268
      @nanomeite1268 Před 6 lety

      me 2

  • @bryanbocao4906
    @bryanbocao4906 Před 5 lety +39

    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 Před 5 lety +1

      Thanks man that helped A LOT .

  • @valeriogalieni2840
    @valeriogalieni2840 Před 8 lety +17

    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!

  • @VibeWithSingh
    @VibeWithSingh Před 9 lety +20

    one advice: Keep it clean and clear !!

  • @Silvergrooves42
    @Silvergrooves42 Před 9 lety

    If you understand the minima concept, this is an awesome explanation and it really helped me a lot. Thank you

  • @grandma_soup
    @grandma_soup Před 5 lety

    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!

  • @suryasuresh9330
    @suryasuresh9330 Před 3 lety

    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 Před 9 lety

    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.

  • @michaelbauers8800
    @michaelbauers8800 Před 8 lety +1

    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.

  • @mistermiyagi6073
    @mistermiyagi6073 Před 5 lety +1

    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

  • @notjosh934
    @notjosh934 Před 3 lety +1

    6 hours before the exam and I'm studying now. Why am I like this

  • @engineerguyvideos2552
    @engineerguyvideos2552 Před 8 lety

    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.

  • @dtyuify
    @dtyuify Před 7 lety

    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 Před 7 lety +38

    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.

    • @nathanieldwiputra1630
      @nathanieldwiputra1630 Před 7 lety +1

      Thank you for sharing. I understand better now.

    • @Crisp3333
      @Crisp3333 Před 7 lety +1

      Yes you are absolutely right, he explains it much better!

    • @CallumAtwal
      @CallumAtwal Před 7 lety

      Yup, watch the MIT lecture first then this one! Helps so much

    • @sourabhbhattacharya8464
      @sourabhbhattacharya8464 Před 5 lety

      exactly......followed your sequence ........helped a lot

    • @desmondtehweiloon4707
      @desmondtehweiloon4707 Před 5 lety

      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

  • @vikas1590
    @vikas1590 Před 8 lety

    This is a great explanation. I am shocked to see that some people disliked this video....

  • @Lavapulse
    @Lavapulse Před 10 lety +6

    Thanks :) Currently working on this in my AI class and this helped a lot.

  • @jonobrien8848
    @jonobrien8848 Před rokem

    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)

  • @dotafarm2699
    @dotafarm2699 Před 8 lety

    you dont know how much u saved me. thanks so much man

  • @muhammadtalha2363
    @muhammadtalha2363 Před 6 lety

    wish i could hit like button 100 millions times
    thanks man God bless yuh
    peace

  • @moraigna66
    @moraigna66 Před 8 lety

    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 Před 8 lety

      +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.

  • @aimonallouache7993
    @aimonallouache7993 Před 6 lety

    This is a really well explained video. Thanks Pieter

  • @adamtheanalyst
    @adamtheanalyst Před 3 lety +1

    Excellent walk through!

  • @BBoyXy
    @BBoyXy Před 10 lety +2

    Thank you Thank you Thank you :)))
    Very very helpful for Computer Engineer

  • @ArindamReviews
    @ArindamReviews Před 9 lety

    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!

  • @aliemara5125
    @aliemara5125 Před 11 lety

    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 :)

  • @Harm00se
    @Harm00se Před 9 lety

    This is brilliant, much appreciated sir.

  • @YalnekH
    @YalnekH Před 10 lety

    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?

  • @Neophytez
    @Neophytez Před 5 lety +9

    2:27
    should be: current value is higher OR EQUAL than beta

  • @radulescuiulia8988
    @radulescuiulia8988 Před 10 lety

    Great video! I finally understood how alpha-beta pruning works! Thanx!

  • @MultiSmokeDank420
    @MultiSmokeDank420 Před 10 lety

    This video helped me very much with my Artificial Intelligence course. Thank you for taking the time to make this video.

  • @anishdesai3082
    @anishdesai3082 Před 10 lety

    Wonderfully explained. Thanks a lot!

  • @ckoparkar
    @ckoparkar Před 10 lety +3

    Thank you. This helped me a lot !!

  • @BigBobSchnobb
    @BigBobSchnobb Před 7 lety +5

    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 Před 4 měsíci

      Always initiate unexplored max node to -infinity

  • @jreaganmorganchannel
    @jreaganmorganchannel Před 8 lety +247

    First you do this.
    Then this.
    Then magic.
    More magic.
    Done. Do you understand now?

    • @malcolm5969
      @malcolm5969 Před 7 lety +3

      are you kidding me?? or are you a kid in real??? best explained ? where is deep cutting you dumb??

    • @MoSho23
      @MoSho23 Před 7 lety +1

      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 Před 6 lety

      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 Před 5 lety

      that's because the depth is only 4

    • @adityasuri4739
      @adityasuri4739 Před 5 lety

      😂😂

  • @hugoibanez
    @hugoibanez Před 10 lety

    I think that the 6th leaf, the number 2 is wrong, isnt it suposed to be the 6 a better option?

  • @airsoftdude0
    @airsoftdude0 Před 4 lety

    Great video, really helped! (I'm a junior majoring in AI and Robotics)

  • @user-og3cw4ti6j
    @user-og3cw4ti6j Před 5 lety

    Hi, what if the first node is negative value? For example, if it is -5?

  • @azndramafrk94
    @azndramafrk94 Před 7 lety

    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.

  • @yassiitz19
    @yassiitz19 Před 10 lety +6

    much appreciated, very thorough explanation yet clear and simple.

  • @MrVbogdan
    @MrVbogdan Před 11 lety

    Thank you! Well done!

  • @gryzman
    @gryzman Před 9 lety +58

    Clear as mud

  • @mateuszmagda6522
    @mateuszmagda6522 Před 10 lety

    Listen to the explanation around 09:00 . "A maximizer has a better option than two- six" which comes from the previous branch, incidentally.

  • @rusnakviktor1580
    @rusnakviktor1580 Před 8 lety

    Crystal clear!

  • @sunok7729
    @sunok7729 Před 10 lety

    can't thank you enough!

  • @JayeshRaoexplorer
    @JayeshRaoexplorer Před 8 lety

    Thanks a ton!!! appreciate it.

  • @EmilRock88
    @EmilRock88 Před 10 lety

    Geniusss!!!! You´v saved my work

  • @johnsonkuan8823
    @johnsonkuan8823 Před 7 lety

    Great video. Thank you.

  • @canzengin3691
    @canzengin3691 Před 5 lety

    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

  • @icanseeitinyourface
    @icanseeitinyourface Před 11 lety

    Beautiful.

  • @onesevenfiveone
    @onesevenfiveone Před 10 lety

    Thank you professor.

  • @lemonwaterr
    @lemonwaterr Před 6 lety

    Nice speech, could finally understand the concept with of this vid

  • @lasandun
    @lasandun Před 10 lety

    Thank you very much for the video. It really helped me!

  • @chrisedwards4584
    @chrisedwards4584 Před 11 lety

    best ever the best the most best fantastic explanation thank you prof.

  • @rain_357
    @rain_357 Před rokem

    This was really helpful for me. Thank you!

  • @pawesosnowski253
    @pawesosnowski253 Před 9 lety

    Thanks very much!

  • @elmehdikzadri1260
    @elmehdikzadri1260 Před 8 lety

    Thank you so much !!

  • @donpkchannel7203
    @donpkchannel7203 Před 2 lety

    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?

  • @nakedsu
    @nakedsu Před 9 lety

    Thank so much for saving my final *big thumbs up*

  • @pancekaradzov3885
    @pancekaradzov3885 Před 5 lety +15

    Such a messy explanation, I got more confused than I was before watching this video

  • @roarlisfang2860
    @roarlisfang2860 Před 3 lety

    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.

  • @J3tm4x
    @J3tm4x Před 10 lety

    Thank you very much!!!!

  • @balazsvincze1368
    @balazsvincze1368 Před 3 lety

    Thanks, great explanation!

  • @dieterdietersen9673
    @dieterdietersen9673 Před 8 lety

    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

  • @LavenderSky499
    @LavenderSky499 Před 9 lety

    This really helped me understand alpha-beta minimax! Thank you so much!

  • @frankzhang105
    @frankzhang105 Před 3 lety

    Thanks. Helps lots

  • @uasiva1997
    @uasiva1997 Před 5 lety

    thanks a ton! one of the best explanations :)

  • @vishwassiravara9649
    @vishwassiravara9649 Před 8 lety

    Great video , very clear .

  • @kamilbolka
    @kamilbolka Před 6 lety

    Nice and simple! Thanks.

  • @vzntoup
    @vzntoup Před 10 lety

    Thanks a lot my friend !

  • @Shrishification
    @Shrishification Před 9 lety

    amazing explanation!

  • @tweetiebirdism
    @tweetiebirdism Před 7 lety

    I thought this would explain prune, the game...
    What language are you speaking?

  • @aaronsoria345
    @aaronsoria345 Před 6 lety

    Thanks, you're great

  • @abhishekdeshmukh7416
    @abhishekdeshmukh7416 Před 8 lety

    thanks a lot prof.

  • @barisballi70
    @barisballi70 Před 2 lety

    thank you

  • @lancelofjohn6995
    @lancelofjohn6995 Před 2 lety

    nice video,I can understand the notion now.

  • @Chris_t0
    @Chris_t0 Před 9 lety +269

    way too messy

  • @israelayokunnu7974
    @israelayokunnu7974 Před 5 lety

    Awesome!

  • @ankitrko7
    @ankitrko7 Před 9 lety

    Awesome Explaination!

  • @ahmetozdemir2565
    @ahmetozdemir2565 Před 5 lety

    thank you so much

  • @TheNata96
    @TheNata96 Před 5 lety

    Perfect!

  • @1stMusic
    @1stMusic Před 8 lety

    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 Před 8 lety +1

      +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 Před 8 lety

      Tori Knorth Thanks, I got it!

  • @PelagicShadow
    @PelagicShadow Před 4 lety

    You sir, are a GOD

  • @Craziestbanana
    @Craziestbanana Před 5 lety

    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.

  • @vext01
    @vext01 Před 11 lety

    Thanks for this screencast :)

  • @ParantapSharma
    @ParantapSharma Před 9 lety +24

    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.

  • @jlpicard7
    @jlpicard7 Před 5 lety

    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."

  • @porada1000
    @porada1000 Před 11 lety

    Thanx man!!that was seriously awesome..

  • @MrTayemMomen
    @MrTayemMomen Před 8 lety

    Thanks a lot, sir.

  • @jorandebraekeleer7557
    @jorandebraekeleer7557 Před 4 lety

    THANK YOU SO MUCH

  • @melvinc9583
    @melvinc9583 Před 8 lety +3

    Thank you so much for this video!!!!
    Why I can't have a lecturer just like you!!!!!!

  • @viraj_singh
    @viraj_singh Před 5 lety

    got it! thanks a lot.

  • @haimbendanan
    @haimbendanan Před 8 lety

    Thanks a lot, very helpful

  • @luanpd8397
    @luanpd8397 Před 6 lety

    OMG tks sir! you save my life !

  • @manifestingtruth8866
    @manifestingtruth8866 Před 4 lety

    Only this is clear and accurate tutorial i have found on the internet..today is my AI exam..thanks a lot to you.

  • @TheMroystein
    @TheMroystein Před 11 lety

    Thanks ! Perfect

  • @RebellisSpiritus
    @RebellisSpiritus Před 6 lety +12

    Pretty much how Dragon Ball tournament was organized

  • @xkusjeriannex
    @xkusjeriannex Před 9 lety

    Thanks!

  • @juicedup14
    @juicedup14 Před 4 lety

    5 rewatches later
    Its making sense

  • @nilanjanmhatre1960
    @nilanjanmhatre1960 Před 5 lety +4

    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.