a library of eyes in go
DESCRIPTION
A Library of Eyes in Go. Author: Thomas Wolf, Matthew Pratola Dept of Mathematics Brock University Presented by: Xiaozhen Niu. Outline. Introduction Bend-4-in-the-corner Positions Position Generation Position Evaluation Unusual Positions Influence of External Liberties Summary. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/1.jpg)
1
A Library of Eyes in Go
Author: Thomas Wolf, Matthew PratolaDept of Mathematics
Brock UniversityPresented by: Xiaozhen Niu
![Page 2: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/2.jpg)
2
Outline Introduction Bend-4-in-the-corner Positions Position Generation Position Evaluation Unusual Positions Influence of External Liberties Summary
![Page 3: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/3.jpg)
3
Introduction Eye evaluation is important
for life and death problem Goal: generate a library of
monolithic eyes positions with stored solutions
![Page 4: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/4.jpg)
4
Bend-4-in-the-corner Positions Definition Bend-4-type positions Characterization
![Page 5: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/5.jpg)
5
Definition If for a regular position, passing belongs
to the best moves of both sides then either: Position is unconditional dead, seki or alive,
called settled Position is not settled, having a ko status,
now it is called calm
![Page 6: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/6.jpg)
6
Bend-4-type Positions Three properties:
Initial position does not have a ko-forbidden point
Defender is not unconditionally dead
Passing is the single best move for defender
![Page 7: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/7.jpg)
7
Best First Moves Bend-4-type positions have more than
one solutions: If playing elsewhere is beneficial then the
single best move for attacker is to pass If playing elsewhere is not beneficial, or
attacker is asked to kill, then it should play the move leads to ko
![Page 8: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/8.jpg)
8
Characterization Four types of bend-4 positions:
![Page 9: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/9.jpg)
9
Characterization (2)
![Page 10: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/10.jpg)
10
Position Generation Unique representations of three cases
of eyes: In the corner On the edge In the centre
Norm-locating procedure use shift, rotation and reflection repeatedly for a store position when encountering a new position
![Page 11: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/11.jpg)
11
Generation Use 64 bit hash code (Zobrist) to identify a
monolithic eye position (made from White and Black is the attacker)
Start with three eyes of size 1 and increasing successively (around 200 million positions of size up to 11)
![Page 12: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/12.jpg)
12
Generation (2) The generation includes 4 steps:
At first all internally empty eyes All possible legal combinations of white stones are generated All possible legal combinations of black stones are generated Positions including one or more ko-fights will be generated
once for each empty potential ko point
![Page 13: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/13.jpg)
13
Observations Growth factors (Log (Number of positions))
are remarkably constant according to size The number of positions only grow little by
adding white stones The number of extra positions due to initial
ko grows faster then other numbers, and it’s highest for corner eyes
![Page 14: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/14.jpg)
14
Position Evaluation Use program GoTools, performs binary alpha-
beta search To answer whether a position is at least “worth
one eye” so that it could live if it had another “eye”, evaluate two cases
The eye on its own One extra external 1-point eye being attached
Status of eyes often depend on the number of external liberties
Computations are done for 0 to 31 external liberties for two cases
![Page 15: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/15.jpg)
15
Observations
![Page 16: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/16.jpg)
16
Observations A large proportion of all eyes are
unconditionally alive (do not need to store). Only store a small fraction of all eyes
The larger the eye, the more likely the status and/or the best move depend on the number of external liberties and the more records are needed for the eye
![Page 17: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/17.jpg)
17
Optimizations In evaluating, eye size n either keep its size, or
it shrinks. Any smaller eye can be evaluated by using stored information
Evaluate eyes with many interior stones first and then empty ones later
In theory each case would be evaluated 128 times (2x2x32), but it can always be sped up
Consistency check: White must not do worse when having more external liberties or extra external eyes
![Page 18: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/18.jpg)
18
Efficiency Monolithic eye database is a single read-only
file A module in GoTools norm-transforms any
monolithic eye encountered during a computation by performing a rotation, reflection and shift
Generates a hash code, look up the entry and decode the information (status and moves)
Time saving, but loading a large database is slow!
![Page 19: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/19.jpg)
19
Unusual Positions Calm positions: a position is not settled,
and passing is one of the best move for both sides
Include: Bend-4-type Eyes of size 5, 6, 7…
![Page 20: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/20.jpg)
20
Eyes of Size 5
4 such positions All have exactly
1 external liberty and the status is that White needs 1 external ko-threat to live
![Page 21: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/21.jpg)
21
Eyes of Size 6 Two types of calm positions of size 6, one is in
diagram 8 where White needs 1 ko-threat to live. In second type Black needs one ko-threat to kill
![Page 22: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/22.jpg)
22
Eyes of Size 7 Black needs exactly 1 external ko-threat to kill
![Page 23: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/23.jpg)
23
Eyes of Size 8 Black needs exactly 1 external ko-threat to kill
![Page 24: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/24.jpg)
24
Eyes of Size 9 14: Black need 2 ko-threats to kill. 15: White needs an
extra eye and 1 ko-threat to live. 16: with 2 or 0 external liberties it is calm (Black needs 2 or 1ko-threats). But with 1 external liberty it’s not calm for 1 ko-threat
![Page 25: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/25.jpg)
25
Eyes of Size 10 17,18: Black
needs 2 ko-threats; 19: Black needs 1 ko-threat; 20: White needs 1 ko-threat
![Page 26: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/26.jpg)
26
Eyes of Size 11 21: Black needs 3 ko-threats to kill. 1 external liberty
it’s not calm, 0 external liberty is calm with Black needs 2 ko-threats; 22: Black needs 2 ko-threats; 23: Black needs 1 ko-threat; 24: White needs 1 ko-threat
![Page 27: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/27.jpg)
27
Influence of External Liberties
Solution strategy depends on the number of external liberties
The more external liberties, the more ambitious aim White can try, i.e. a complete win instead of a ko
![Page 28: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/28.jpg)
28
Choices of Best Moves For 1 or 2 external liberties, Black plays a1 or
d3 is equivalent (both needs 1 ko-threat)
![Page 29: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/29.jpg)
29
Choices of Best Moves (2) With 3 external liberties: d3 is better (needs 1 ko-threat)
than a1 (needs 2 ko-threats) Values of passes: d3 (1 ko-threat and 4 passes of White)
or a1 (2 ko-threat and 2 passes of White)?
![Page 30: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/30.jpg)
30
Choices of Best Moves (3) 4 external liberties: Black d3 is unconditional loss
whereas a1 at least leads to a ko (needs 3 ko-threats)
![Page 31: A Library of Eyes in Go](https://reader036.vdocument.in/reader036/viewer/2022062309/56813bc3550346895da4ee75/html5/thumbnails/31.jpg)
31
Summary Cover monolithic eyes of size up to 11 All possible internal configurations of stones of
both sides are considered Each eye is evaluated and the best
status/moves are provided If results in ko, the number of ko-threats are
determined