[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] clear_cache mystery
From: |
Gunnar Farnebäck |
Subject: |
[gnugo-devel] clear_cache mystery |
Date: |
Mon, 22 Sep 2008 20:38:33 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.16 (X11/20080724) |
Apply the patch at
http://trac.gnugo.org/gnugo/attachment/ticket/199/gunnar_7_12.9.diff
which is no more complex than this:
--- a/engine/owl.c
+++ b/engine/owl.c
@@ -1027,7 +1027,10 @@ do_owl_analyze_semeai(int apos, int bpos,
if (board[pos] == EMPTY && !mw[pos]) {
if (liberty_of_goal(pos, owlb)) {
- if (!liberty_of_goal(pos, owla)) {
+ int origin = owlb->my_eye[pos].origin;
+ if (!liberty_of_goal(pos, owla)
+ && !(owlb->my_eye[origin].color == owlb->color
+ && max_eyes(&owlb->my_eye[origin].value) > 0)) {
/* outside liberty */
if (safe_move(pos, color) == WIN) {
safe_outside_liberty_found = 1;
Then build and go to the regression directory. Start GNU Go with
../interface/gnugo --mode gtp
and paste in the following commands:
1 loadsgf games/CrazyStone1.sgf 56
2 analyze_semeai D9 G3
3 analyze_semeai D9 G3
4 clear_cache
5 analyze_semeai D9 G3
The result turns out to be:
=1 white
=2 1 1 H2
=3 1 1 H2
=4
=5 1 2 H2
I.e. after doing clear_cache the semeai reading changes result. What's
going on here? Am I doing something stupid in my patch or is something
broken with clear_cache?
(This is testcase semeai:133 and contrary to the test suite the
correct result is 1 1 H2. But that's beside the point here.)
/Gunnar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] clear_cache mystery,
Gunnar Farnebäck <=