Step by Step: Alpha Beta Pruning

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025
  • CS188 Artificial Intelligence
    UC Berkeley, Spring 2013
    Instructor: Prof. Pieter Abbeel

ความคิดเห็น • 260

  • @notjosh934
    @notjosh934 3 ปีที่แล้ว +11

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

  • @lava_tiger
    @lava_tiger 9 ปีที่แล้ว +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!

  • @vipulnj512
    @vipulnj512 7 ปีที่แล้ว +197

    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 ปีที่แล้ว +1

      💯

    • @NormaNsNs
      @NormaNsNs 2 หลายเดือนก่อน

      ty you cleared my doubts !

  • @bryanbocao4906
    @bryanbocao4906 6 ปีที่แล้ว +48

    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 ปีที่แล้ว +1

      Thanks man that helped A LOT .

  • @nguyendh92
    @nguyendh92 9 ปีที่แล้ว +165

    You saved my ass right before my A.I exam

    • @RudolfCickoMusic
      @RudolfCickoMusic 9 ปีที่แล้ว +2

      +Dinh Hung Nguyen yeah

    • @DFAEHR89
      @DFAEHR89 9 ปีที่แล้ว +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 7 ปีที่แล้ว

      i have an AI exam in a few hours lol

    • @nanomeite1268
      @nanomeite1268 7 ปีที่แล้ว

      me 2

  • @VibeWithSingh
    @VibeWithSingh 10 ปีที่แล้ว +23

    one advice: Keep it clean and clear !!

  • @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 10 ปีที่แล้ว

    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.

  • @Silvergrooves42
    @Silvergrooves42 10 ปีที่แล้ว +1

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

  • @ArindamReviews
    @ArindamReviews 10 ปีที่แล้ว +1

    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!

  • @kakkwxt3653
    @kakkwxt3653 8 ปีที่แล้ว +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.

    • @sequencer7-l7p
      @sequencer7-l7p 8 ปีที่แล้ว +1

      Thank you for sharing. I understand better now.

    • @Crisp3333
      @Crisp3333 8 ปีที่แล้ว +1

      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

  • @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.

  • @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.

  • @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!

  • @dotafarm2699
    @dotafarm2699 9 ปีที่แล้ว

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

  • @Lavapulse
    @Lavapulse 11 ปีที่แล้ว +6

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

  • @adamtheanalyst
    @adamtheanalyst 3 ปีที่แล้ว +1

    Excellent walk through!

  • @michaelbauers8800
    @michaelbauers8800 9 ปีที่แล้ว +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 6 ปีที่แล้ว +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

  • @MultiSmokeDank420
    @MultiSmokeDank420 11 ปีที่แล้ว

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

  • @BigBobSchnobb
    @BigBobSchnobb 7 ปีที่แล้ว +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 ปีที่แล้ว

      Always initiate unexplored max node to -infinity

  • @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.

  • @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.

  • @ckoparkar
    @ckoparkar 11 ปีที่แล้ว +3

    Thank you. This helped me a lot !!

  • @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.

  • @gryzman
    @gryzman 10 ปีที่แล้ว +58

    Clear as mud

  • @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.

  • @chrisedwards4584
    @chrisedwards4584 11 ปีที่แล้ว

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

  • @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.

  • @noodletrooper
    @noodletrooper 10 ปีที่แล้ว +16

    This is the best video explanation on youtube for alpha beta pruning

    • @seimkeim
      @seimkeim 7 ปีที่แล้ว +10

      No, it's not.

    • @aaron___6014
      @aaron___6014 7 ปีที่แล้ว

      nope

    • @MorrisHsu-h1p
      @MorrisHsu-h1p 6 ปีที่แล้ว +3

      th-cam.com/video/zp3VMe0Jpf8/w-d-xo.html&ab_channel=JohnLevine
      way better

  • @rain_357
    @rain_357 ปีที่แล้ว

    This was really helpful for me. Thank you!

  • @nilanjanmhatre1960
    @nilanjanmhatre1960 6 ปีที่แล้ว +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.

  • @Neophytez
    @Neophytez 6 ปีที่แล้ว +9

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

  • @PelagicShadow
    @PelagicShadow 4 ปีที่แล้ว

    You sir, are a GOD

  • @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

  • @waseemusman2765
    @waseemusman2765 9 ปีที่แล้ว

    Thank u sir.I have an A.I exam tomorrow.

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

  • @radulescuiulia8988
    @radulescuiulia8988 11 ปีที่แล้ว

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

  • @lancelofjohn6995
    @lancelofjohn6995 3 ปีที่แล้ว

    nice video,I can understand the notion now.

  • @ParantapSharma
    @ParantapSharma 10 ปีที่แล้ว +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.

  • @johnsonkuan8823
    @johnsonkuan8823 8 ปีที่แล้ว

    Great video. Thank you.

  • @juicedup14
    @juicedup14 4 ปีที่แล้ว

    5 rewatches later
    Its making sense

  • @balazsvincze1368
    @balazsvincze1368 4 ปีที่แล้ว

    Thanks, great explanation!

  • @RebellisSpiritus
    @RebellisSpiritus 7 ปีที่แล้ว +12

    Pretty much how Dragon Ball tournament was organized

  • @frankzhang105
    @frankzhang105 4 ปีที่แล้ว

    Thanks. Helps lots

  • @vishwassiravara9649
    @vishwassiravara9649 9 ปีที่แล้ว

    Great video , very clear .

  • @yassiitz19
    @yassiitz19 11 ปีที่แล้ว +6

    much appreciated, very thorough explanation yet clear and simple.

  • @abhishekdeshmukh7416
    @abhishekdeshmukh7416 9 ปีที่แล้ว

    thanks a lot prof.

  • @sunok7729
    @sunok7729 10 ปีที่แล้ว

    can't thank you enough!

  • @pawesosnowski253
    @pawesosnowski253 9 ปีที่แล้ว

    Thanks very much!

  • @lemonwaterr
    @lemonwaterr 6 ปีที่แล้ว

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

  • @Harm00se
    @Harm00se 9 ปีที่แล้ว

    This is brilliant, much appreciated sir.

  • @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

  • @airsoftdude0
    @airsoftdude0 5 ปีที่แล้ว

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

  • @jreaganmorganchannel
    @jreaganmorganchannel 9 ปีที่แล้ว +245

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

    • @malcolm5969
      @malcolm5969 8 ปีที่แล้ว +3

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

    • @MoSho23
      @MoSho23 8 ปีที่แล้ว +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 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 ปีที่แล้ว

      😂😂

  • @IsaacJoshi
    @IsaacJoshi 6 ปีที่แล้ว

    great video

  • @kamilbolka
    @kamilbolka 7 ปีที่แล้ว

    Nice and simple! Thanks.

  • @Vhanrox
    @Vhanrox 12 ปีที่แล้ว

    thanks that helped to give me the last hint to understand alpha beta pruning =)

  • @gazelledeleuze
    @gazelledeleuze 9 ปีที่แล้ว

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

  • @luanpd8397
    @luanpd8397 7 ปีที่แล้ว

    OMG tks sir! you save my life !

  • @pancekaradzov3885
    @pancekaradzov3885 6 ปีที่แล้ว +15

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

  • @NubcackeRider
    @NubcackeRider 3 หลายเดือนก่อน

    Thank you, seriously

  • @ankitrko7
    @ankitrko7 10 ปีที่แล้ว

    Awesome Explaination!

  • @rusnakviktor1580
    @rusnakviktor1580 9 ปีที่แล้ว

    Crystal clear!

  • @anishdesai3082
    @anishdesai3082 11 ปีที่แล้ว

    Wonderfully explained. Thanks a lot!

  • @LavenderSky499
    @LavenderSky499 10 ปีที่แล้ว

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

  • @juliangentles3383
    @juliangentles3383 11 ปีที่แล้ว

    Thanks this helps much

  • @aaronsoria345
    @aaronsoria345 6 ปีที่แล้ว

    Thanks, you're great

  • @uasiva1997
    @uasiva1997 6 ปีที่แล้ว

    thanks a ton! one of the best explanations :)

  • @vzntoup
    @vzntoup 11 ปีที่แล้ว

    Thanks a lot my friend !

  • @MrTayemMomen
    @MrTayemMomen 9 ปีที่แล้ว

    Thanks a lot, sir.

  • @ahmetozdemir2565
    @ahmetozdemir2565 6 ปีที่แล้ว

    thank you so much

  • @BBoyXy
    @BBoyXy 11 ปีที่แล้ว +2

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

  • @onesevenfiveone
    @onesevenfiveone 11 ปีที่แล้ว

    Thank you professor.

  • @lasandun
    @lasandun 11 ปีที่แล้ว

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

  • @barisballi70
    @barisballi70 2 ปีที่แล้ว

    thank you

  • @amiteshkumar3057
    @amiteshkumar3057 9 ปีที่แล้ว

    great work

  • @monyettenyom2540
    @monyettenyom2540 4 หลายเดือนก่อน

    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.

  • @tiffanie8000
    @tiffanie8000 6 ปีที่แล้ว

    it's well explained. thanks

  • @notsubzero2992
    @notsubzero2992 หลายเดือนก่อน

    bro cooked 11 years ago and He thought we wouldn't notice

  • @radumatei9387
    @radumatei9387 10 ปีที่แล้ว

    Nice. Works for me.

  • @haimbendanan
    @haimbendanan 9 ปีที่แล้ว

    Thanks a lot, very helpful

  • @vishalsaxena6780
    @vishalsaxena6780 10 ปีที่แล้ว

    Great vedio!!! thankx a lot....

  • @SeanTraynor_dbblTS
    @SeanTraynor_dbblTS 8 ปีที่แล้ว +7

    Minimisehuhhas an option 4:30
    Got me cracking midst an exam revision session.

  • @JayeshRaoexplorer
    @JayeshRaoexplorer 9 ปีที่แล้ว

    Thanks a ton!!! appreciate it.

  • @momog7312
    @momog7312 5 ปีที่แล้ว

    VERY GOOD VIDEO!

  • @andredejager3637
    @andredejager3637 3 หลายเดือนก่อน

    Hint: if you watch this in reverse it is also difficult to understand

  • @EmilRock88
    @EmilRock88 10 ปีที่แล้ว

    Geniusss!!!! You´v saved my work

  • @Shrishification
    @Shrishification 10 ปีที่แล้ว

    amazing explanation!

  • @videoguy640
    @videoguy640 6 ปีที่แล้ว

    Might be hard if you're learning alpha beta pruning for the first time but excellent for review.

  • @viraj_singh
    @viraj_singh 6 ปีที่แล้ว

    got it! thanks a lot.

  • @nirishamycharla2910
    @nirishamycharla2910 6 ปีที่แล้ว

    Sir,it would be better if you explain it in different slides ....it is very difficult to understand.

  • @sakshi_1702
    @sakshi_1702 8 ปีที่แล้ว

    thank you sir!

  • @hugoburton5222
    @hugoburton5222 5 ปีที่แล้ว +1

    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.

  • @elmehdikzadri1260
    @elmehdikzadri1260 9 ปีที่แล้ว

    Thank you so much !!

  • @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?

  • @cuongpham2486
    @cuongpham2486 8 ปีที่แล้ว

    thank for this tutorial

  • @abhinavsharma8316
    @abhinavsharma8316 10 ปีที่แล้ว

    Very nice explanation. Thank you :)