Download presentation
Presentation is loading. Please wait.
1
Mathematical Morphology Applied to Computer Go Author: Bruno Bouzy Presenter: Ling Zhao June 30, 2004
2
Outline Motivations Contributions Mathematical Morphology (MM) & Go Zobrist’s model for influence recognition Adaptation of MM to Go Implementation issue Experimental results Conclusions
3
Motivations Influence Territory Position evaluation
4
Contributions Link Zobrist’s model with mathematical morphology Extend Zobrist’s model Good results for territory recognition Implemented in both Indigo and GnuGo and is working
5
Mathematical morphology (MM) “Analysis of signals in terms of shape” Widely used for image processing Applications: 1. Image restoration 2. Edge detection 3. Texture analysis 4. Noise reduction 5. Computer Go!
6
Operators in MM Input: a set of elements Dilation: A + neighboring elements of A Erosion: A – neighboring elements of ~A Closing set: E(D(A)), Opening set: D(E(A)) Dilation Erosion
7
Liberties and eyes in Go Find liberties Find eyes
8
Simple territory Macro Operator:
9
Fuzzy territory Problems: Boolean values are not sufficient.
10
Zobrist’s model (’69) Used to recognize influence Init: +64 -> black intersections -64 -> white intersections, 0 -> all else Iterations (4 times) positive points -> send out +1 to neighbors negative points -> send out –1 to neighbors
11
Improved model using MM terms Key fact: forbid points who has neighbors (including itself) with both positive values and negative values. Dz(point): value(point) + num_of(points with values of same sign) Ez(point): abs(value(point))-num_of(points with value of zero or of opposite sign) no sign change (put it zero then)
12
Examples 0 0 0 0 0 0 0 0 64 0 0 64 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 64 1 1 64 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 D1D1 0 0 0 1 0 0 1 0 0 0 0 0 2 2 2 2 2 0 0 0 0 1 2 64 3 3 64 2 1 0 0 0 2 2 2 2 2 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 D2D2 0 0 0 1 0 0 1 0 0 0 0 0 2 2 2 2 2 2 0 0 0 2 4 6 5 5 6 4 2 0 1 2 6 64 7 7 64 6 2 1 0 2 4 6 5 5 6 4 2 0 0 0 2 2 2 2 2 2 0 0 0 0 0 1 0 0 1 0 0 0 D3D3 0 0 0 0 0 0 0 0 2 1 1 2 0 0 0 0 0 4 6 5 5 6 4 0 0 0 2 6 64 7 7 64 6 2 0 0 0 4 6 5 5 6 4 0 0 0 0 0 2 1 1 2 0 0 0 0 0 0 0 0 E 1 o D 3 0 0 0 0 0 0 0 0 64 7 7 64 0 0 0 0 0 0 0 0 E 7 o D 3 e = d (d-1) +1
13
“Efficient” implementation of D Bouzy’s implementation // init line[0] = line[t+1] = 0; void SI::dilation(SI *q) { for (int i=1; i<=t; i++) { q->line[i] = line[i] | line[i-1] | line[i+1] | (line[i]<<1) & mask | (line[i]>>1) & mask; } My implementation
14
Experimental results Xz(d, d(d-1)=1) when d=4 or 5 is very good Example using Xz(4,13)
15
Build into Go program Indigo GnuGo “The Bouzy 5/21 algorithm is interesting in that it corresponds reasonably well to the human concept of territory. This algorithm is still used in GNU Go 3.4 in the function estimate_score “ Author’s claim: 1. “a model which recognized “territories”... as human players do”. 2. “The recognition is accurate and robust”.
16
My conclusions Nice model to apply mathematical morphology to Go. Quite accurate in territory recognition compared to other computer approaches. Can be efficiently computed.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.