mathematical morphology applied to computer go author: bruno bouzy presenter: ling zhao june 30,...
Post on 19-Dec-2015
223 views
TRANSCRIPT
Mathematical Morphology Applied to Computer Go
Author: Bruno Bouzy
Presenter: Ling Zhao
June 30, 2004
Outline
Motivations Contributions Mathematical Morphology (MM) & Go Zobrist’s model for influence recognition Adaptation of MM to Go Implementation issue Experimental results Conclusions
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
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!
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
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
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)
Examples0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64 0 0 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
D1
0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0
D2
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
D3
0 0 0 0 0 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 0 0 0 0 0
E1 o D3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64 7 7 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
E7 o D3
e = d (d-1) +1
“Efficient” implementation of DBouzy’s implementation
// initline[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
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”.