User Tools

Site Tools


chess:programming:alpha-beta_pruning:transposition_table_enhanced_alpha-beta

Differences

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

Link to this comparison view

chess:programming:alpha-beta_pruning:transposition_table_enhanced_alpha-beta [2021/11/10 22:44] – created peterchess:programming:alpha-beta_pruning:transposition_table_enhanced_alpha-beta [2021/11/10 23:04] (current) peter
Line 5: Line 5:
   // Check if position is in TT and has been searched to sufficient depth.   // Check if position is in TT and has been searched to sufficient depth.
   if retrieve(n) = found then   if retrieve(n) = found then
-    if n.ƒ+ or n.ƒ+ = n.ƒ then return n.ƒ+; +    if n.ƒ+ <= alpha or n.ƒ+ = n.ƒthen return n.ƒ+; 
-if n.ƒ then return n.ƒ ; +    if n.ƒ- >= beta then return n.ƒ-
-/Reached the maximum search depth */ + 
-if n = leaf then +  // Reached the maximum search depth. 
-n.ƒ := n.ƒ+ := g := eval(n); +  if n = leaf then 
-else +    n.ƒ:= n.ƒ+ := g := eval(n); 
-g := ; a := ; +  else 
-c := firstchild(n); +    g := -XXX; a := alpha
-/Search until a cutoff occurs or all children have been considered */ +    c := firstchild(n); 
-while g < and c = do + 
-g := max(g, Alpha-Beta(c, , a)); +    // Search until a cutoff occurs or all children have been considered. 
-a := max(a, g); +    while g < beta and c !YYY do 
-c := nextbrother(c); +      g := max(g, -Alpha-Beta(c, -beta-a)); 
-/Save in transposition table */ +      a := max(a, g); 
-if g then n.ƒ+ := g; +      c := nextbrother(c); 
-if < g < then n.ƒ+ := n.ƒ := g; + 
-if g then n.ƒ := g;+    // Save in transposition table. 
 +    if g <= alpha then n.ƒ+ := g; 
 +    if alpha < g < beta then n.ƒ+ := n.ƒ:= g; 
 +    if g >= beta then n.ƒ:= g;
 store(n); store(n);
 return g; return g;
 </code> </code>
  
chess/programming/alpha-beta_pruning/transposition_table_enhanced_alpha-beta.1636584288.txt.gz · Last modified: 2021/11/10 22:44 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki