an one-eye solver based on proof and disproof numbers

21
An One-eye Solver Based on Proof and Disproof Numbers Akihiro Kishimoto [email protected]

Upload: regina

Post on 13-Jan-2016

35 views

Category:

Documents


1 download

DESCRIPTION

An One-eye Solver Based on Proof and Disproof Numbers. Akihiro Kishimoto [email protected]. 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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: An One-eye Solver Based on Proof and Disproof Numbers

An One-eye Solver Based on Proof and Disproof Numbers

Akihiro Kishimoto

[email protected]

Page 2: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 3: An One-eye Solver Based on Proof and Disproof Numbers

Definition of One-eye Problems

• 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

Page 4: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 5: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 6: An One-eye Solver Based on Proof and Disproof Numbers

What Happens?

• 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

B

A

C

E

FOR node AND node

pn(E) >= th.pn

pn(E) = pn(A) + pn(F)

D

th.pn = pn(A) + 1

Win for AND

Page 7: An One-eye Solver Based on Proof and Disproof Numbers

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) =

Page 8: An One-eye Solver Based on Proof and Disproof Numbers

Plausible Proof and Disproof Numbers (cont’d)

• Minimal distance will be backed up to parent– All the children with

larger min. distance are solved

• Example

B

A

C D

E

F

Win for OR

md = 0

md = 1

md = 2 0

md = 3 0

md = 2

Ignode pn(C) pn(E)= pn(F)

OR node AND node pn(E)= pn(A)

Page 9: An One-eye Solver Based on Proof and Disproof Numbers

Results with Df-pn + Plausible Proof and Disproof Numbers

• Much better!– # of Problems solved: 73

• C.f. without this technique: 9

Page 10: An One-eye Solver Based on Proof and Disproof Numbers

Enhancements to Df-pn

• What is needed?– Detect an eye/false eye earlier

• Virtual connections

• Protected points

– Reduce branching factor• Forced moves

Page 11: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 12: An One-eye Solver Based on Proof and Disproof Numbers

Virtual Connections (cont’d)• Attacker’s connection • Defender’s connection

Page 13: An One-eye Solver Based on Proof and Disproof Numbers

Protected Points

• 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

Page 14: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 15: An One-eye Solver Based on Proof and Disproof Numbers

Forced Defender’s Move

• Conditions1. No empty eye point2. Only one safe attacker’s

block3. Attacker’s block has a

path to safe stones

– What to do?– Attacker win for

attacker– Defender prevent attacker’s

connection

Page 16: An One-eye Solver Based on Proof and Disproof Numbers

Forced Attacker’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

Page 17: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 18: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 19: An One-eye Solver Based on Proof and Disproof Numbers

Conclusions

• Df-pn + safe knowledge works very well– Need fairly simple enhancements– Guarantee correct results– Become the current best(?) solver

Page 20: An One-eye Solver Based on Proof and Disproof Numbers

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

Page 21: An One-eye Solver Based on Proof and Disproof Numbers

Problems Unsolved in 5 Minutes

Black to play Black to play