190 likes | 351 Views
A Solution to the GHI Problem for Best-First Search. D. M. Breuker, H. J. van den Herik, J. W. H. M. Uiterwijk, and L. V. Allis. Surveyed by Akihiro Kishimoto. Outline. What is the GHI problem? Some other solutions to GHI BTA (Base-Twin Algorithm) Experimental Results Conclusions.
E N D
A Solution to the GHI Problem for Best-First Search D. M. Breuker, H. J. van den Herik, J. W. H. M. Uiterwijk, and L. V. Allis Surveyed by Akihiro Kishimoto
Outline • What is the GHI problem? • Some other solutions to GHI • BTA (Base-Twin Algorithm) • Experimental Results • Conclusions
Transposition table Enhances search algorithms Chess factor of 5 Checkers factor of 10 Detect “transpositions” Example Introduction Reuse result Save result in TT
GHI Problem (1 / 2) • Transposition table contains a flaw with repetitions • Path to reach a node is ignored • E.g. Alpha-Beta + TT if (TTlookup(&n) == OK && n.LBOUND >= beta) { return n.LBOUND; }
Assumptions: Repetition == draw What is F’s score? Win or draw? GHI Problem (2 / 2):Example A B C D F ? W E W: win for 1st player 1st player 2nd player G W
Solutions Case: Depth-First Search • GHI rarely happens in Alpha-Beta search Ignored in practice • E.g. alpha-beta search int alphabeta(node n, int alpha, int beta) { if (cycle (n) == TRUE) return 0; ……… }
Solutions:Case: ISshogi’s Tsume-Solver(1 / 2) • Shogi: • Mate with 4 repetitions Loss • GHI really happens • Can’t solve some problems in Shogi Zuko take an ad hoc approach to avoid
Do not store a loss because of a repetition Save the threshold of proof numbers If (Cycle(n) == true) (n == root) return a loss Check if n is really a losing position Example Solutions:Case: ISshogi’s Tsume-Solver (2 / 2) Loss Loss 1st player 2nd player
Beta-Twin Algorithm (1 / 8) • Solution for proof-number search [c.f. Allis:94] • Idea: two identical positions can have different scores • Base node • Can expand deeper • Twin node • Link to base node
Beta-Twin Algorithm (2 / 8) Uppercase: Beta node Lowercase: Twin node A B C D F f W E c G W 1st player 2nd player
Beta-Twin Algorithm (3 / 8) • Prepare new concepts • Possible-draw: draw because of a repetition • Can be a win • Draw: real draw • Mark possible-draw and keep the depth (of the ancestor) if in a repeated position • Select the most proving node among the nodes marked neither possible-draws nor draws
Beta-Twin Algorithm (4 / 8) A Depth = 0 Depth = 1 B Depth = 2 Mark as a possible draw C D E Depth = 3 =2 c F Depth = 4 d e Depth = 5 1st player 2nd player
Beta-Twin Algorithm (5 / 8) • If all the children are marked as either possible-draw or draw: • Mark node under way as a possible draw • Back up the minimal possible-draw depth • Delete all the possible-draw marks from the children draw possible-draw
Mark as a possible draw Take minimal possible-depth Delete possible draw mark =2 =2 =2 =3 Beta-Twin Algorithm (6 / 8) A B C D E =2 =2 c F d e 1st player 2nd player
Beta-Twin Algorithm (7 / 8) • If (depth of node == possible draw depth) • Guaranteed to be a draw • Store a draw possible-draw A =0 draw B C a =0
Store a draw Beta-Twin Algorithm (8 / 8) A B Depth = 2 =2 C =2 D E =2 c F d e 1st player 2nd player
Experimental Results (1 / 2) • Game: Chess problems • 117 positions from Chess curiosities and Win at chess • Algorithms: • Tree: Basic proof-number search • DAG: PN-search variant that handles DAG [Schijf:93] • DCG: PN-search variant that handles DCG incorrectly [c.f. Schijf:93] • BTA: Beta-Twin Algorithm
# of positions solved Tree: 99 DAG: 102 DCG: 103 BTA: 107 Total nodes (out of 96) Tree: 4,903,374 DAG: 3,222,234 DCG: 2,482,829 BTA: 2,844,024 Experimental Results (2 / 2)
Conclusions • Theirs: • Proposed a solution to GHI • Worked better than pn-search • Mine: • Can BTA really achieve much better? • In my experience the performance should not improve so much except for some special problems • Needs too complicated implementation