MTD(f): Difference between revisions

Content deleted Content added
Line 5:
 
== Pseudocode ==
'''function''' MTDF(root : node_type;, f : integer;, d : integer) : integer;
g := f;
upperboundupperBound := +INFINITY;
lowerboundlowerBound := -INFINITY;
'''repeat'''
'''if''' g == lowerboundlowerBound '''then''' beta := g + 1 '''else''' beta := g;
g β := AlphaBetaWithMemory(root, beta - g+1, beta, d);
'''if''' g < beta '''then''' upperbound := g '''else''' lowerbound := g;
β := g
'''until''' lowerbound >= upperbound;
g := AlphaBetaWithMemory(root, β-1, β, d)
'''return''' g;
'''if''' g < β '''then'''
upperBound := g
'''else'''
lowerBound := g
'''until''' lowerboundlowerBound >= upperbound;upperBound
'''return''' g;
 
== Performance ==