210 likes | 353 Views
An One-eye Solver Based on Proof and Disproof Numbers. Akihiro Kishimoto Kishi@cs.ualberta.ca. Today’s Talk. Explain my and Martin’s recent efforts to an one-eye solver Problem Description Df-pn’s Problem and my Solution Enhancements Conclusions and future work.
E N D
An One-eye Solver Based on Proof and Disproof Numbers Akihiro Kishimoto Kishi@cs.ualberta.ca
Today’s Talk • Explain my and Martin’s recent efforts to an one-eye solver • Problem Description • Df-pn’s Problem and my Solution • Enhancements • Conclusions and future work
Crucial stones (one eye) are given Attacker tries to capture crucial stones Defender makes another eye connected to crucial stones Surrounded by attacker’s stones Definition of One-eye Problems
Basic Algorithm • Search algorithm • Df-pn • Depth-first search • Behaves same as Allis’ proof-number search • Less expansion for interior nodes • Terminal node detection • Has an eye • Can’t find any eye space
Basic Df-pn’s Result • Problem Set: • 39 * 2 problems made by Martin (3-20 empty squares) • Black goes first alive • White goes first kill • Results • Very Bad! (Pentium III 700Mhz, 100 MB TT, 5 minutes) • 9 Problems solved • 20 Problems exceeded maximal thresholds • 49 Time out
df-pn’s problem Condition for exceeding thresholds int MID(Node n, Threhold th) { ….. if (n.pn >= th.pn | | n.dn >= th.dn) return UNKNOWN; ….. } Example What Happens? A th.pn = pn(A) + 1 B C D pn(E) >= th.pn E F Win for AND OR node AND node pn(E) = pn(A) + pn(F)
Plausible Proof and Disproof Numbers • Keep the minimal distance from the root for each node • AND node: pn(N1) + … + pn(Nk) (if pn(N1) + … + pn(Nk) != 0) max(pn(Nk+1),…,pn(Nm)) (if pn(N1) + … + pn(Nk) = 0) • N1, …, Nk: N’s children && Nj.min_distance > N.min_distance (1 <= j <= k) • Nk+1, …, Nm: N’s children && Nj.min_distance <= N.min_distance (k + 1 <= j <= m) pn(N) =
Minimal distance will be backed up to parent All the children with larger min. distance are solved Plausible Proof and Disproof Numbers (cont’d) • Example A md = 0 md = 1 B md = 2 0 C D md = 2 Ignode pn(C) md = 3 0 E pn(E)= pn(F) F OR node AND node pn(E)= pn(A) Win for OR
Results with Df-pn + Plausible Proof and Disproof Numbers • Much better! • # of Problems solved: 73 • C.f. without this technique: 9
Enhancements to Df-pn • What is needed? • Detect an eye/false eye earlier • Virtual connections • Protected points • Reduce branching factor • Forced moves
Virtual Connections • Two purposes • Guarantee connections to the crucial stones for defender • Prove attacker’s stones are connected to safe stones • Ensure defender can’t find any eye spaces
Attacker’s connection Defender’s connection Virtual Connections (cont’d)
Conditions A liberty is surrounded by attacker’s stones At least one is a safe block None is in atari safe stones Note: work only one-level Protected Points
Experimental Results with Virtual Connection + Protected Points • Df-pn + plausible pn & dn + Attacker’s VC + PP • Problems solved: 76 • Total # of nodes expanded: 5,724,902 (2,908,003) (for Problems Solved) • The above + Defender’s VC + PP • Problems solved: 76 • Total # of nodes expanded: 5,725,134 (2,907,844) • C.f. previous result: • Problems solved: 73 • Total # of nodes expanded: 5,884,887
Conditions No empty eye point Only one safe attacker’s block Attacker’s block has a path to safe stones What to do? Attacker win for attacker Defender prevent attacker’s connection Forced Defender’s Move
Condition Distance to an eye is 1 Connected to crucial stones What to do? Defender win for defender Prevent defender’s making an eye Forced Attacker’s Move
Experimental Results with Forced Moves • Previous enhancement + forced defender’s move • Problem solved: 76 • Total # of nodes expanded: 4,603,536 • The above + forced attacker’s move • Problem solved: 76 • Total # of nodes expanded: 2,406,596 • C.f. without these methods • Problem Solved: 76 • Total # of nodes expanded: 5,725,134
Summary of the Results Solved Total # of expansion Basic df-pn 9 +plausible pn & dn 73 + virtual connection 76 5,725,134 + forced defender’s move 76 4,603,536 + forced attacker’s move 76 2,40,6596
Conclusions • Df-pn + safe knowledge works very well • Need fairly simple enhancements • Guarantee correct results • Become the current best(?) solver
Future Work • Deal with ko-threats • Only the simplest case is solved • Need more enhancements • Evaluation functions • Virtual disconnections • Benson’s safe regions • Generalized Forced Moves • Measure experiments with real game-playing systems • Treat open positions
Problems Unsolved in 5 Minutes Black to play Black to play