User Tools

Site Tools


chess:programming:alpha-beta_pruning:example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
chess:programming:alpha-beta_pruning:example [2021/10/30 23:28] peterchess:programming:alpha-beta_pruning:example [2021/10/30 23:35] (current) peter
Line 30: Line 30:
       * It could have been +INF or -INF, it still would not matter.       * It could have been +INF or -INF, it still would not matter.
       * We never even had to look at it because the minimizer was guaranteed a value of 5 or less.       * We never even had to look at it because the minimizer was guaranteed a value of 5 or less.
-      * So as soon as the maximizer saw the 6 he knew the minimizer would never come this way because he can get a 5 on the left side of B.+      * So as soon as the maximizer saw the 6 he knew the minimizer would never come this way because the minimizer can get a 5 on the left side of B
 +        * The Minimizer would always go for the left side of B as this gives a lesser value.
       * This way we do not have to look at that 9 and hence saved computation time.       * This way we do not have to look at that 9 and hence saved computation time.
   * E returns a value of 6 to B.   * E returns a value of 6 to B.
     * At B, beta = min(5, 6) which is 5.     * At B, beta = min(5, 6) which is 5.
     * The value of node B is also 5.     * The value of node B is also 5.
 +
 +----
  
 So far this is how our game tree looks. So far this is how our game tree looks.
Line 42: Line 45:
 {{:chess:programming:alpha-beta_pruning:min_max2.jpg?400|}} {{:chess:programming:alpha-beta_pruning:min_max2.jpg?400|}}
  
----- 
  
   * B returns 5 to A.   * B returns 5 to A.
Line 68: Line 70:
     * Therefore the best value at A is max(5, 2) which is a 5.     * Therefore the best value at A is max(5, 2) which is a 5.
   * Hence the optimal value that the maximizer can get is 5.   * Hence the optimal value that the maximizer can get is 5.
 +
 +----
  
 This is how our final game tree looks like. This is how our final game tree looks like.
chess/programming/alpha-beta_pruning/example.1635636510.txt.gz · Last modified: 2021/10/30 23:28 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki