gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Bug in GnoGo 3.2


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Bug in GnoGo 3.2
Date: Mon, 06 May 2002 21:08:24 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Markus wrote:
> here is a bug report for GnuGo 3.2.
> 
> ***assertion failure:
> genmove.c:510 - is_legal(*move, color) near F1***
> 
>  (variation 387)
>    A B C D E F G H J
>  9 . X . . . . . X X 9
>  8 . X . . . . X X O 8
>  7 . X X X X X X O O 7
>  6 . X O O O O X O O 6
>  5 X X X O + O X O . 5
>  4 O X O O O O O O . 4
>  3 O O O X X X O O O 3
>  2 . O X X O X X O . 2     WHITE has captured 3 stones
>  1 . O O X O . X X . 1     BLACK has captured 1 stones
>    A B C D E F G H J
> 
> The log files are attached. The complete command for GnoGo
> is at the head of neurogo-gnugo-54.cmd-white.log.

Thanks for the report. The crash was due to a mistake in the aftermath
code and is fixed by the appended patch. For the record, this crash
can only occur when using the --capture-all-dead option.

/Gunnar

--- aftermath.c.orig    Mon May  6 21:06:03 2002
+++ aftermath.c Mon May  6 15:29:09 2002
@@ -123,11 +123,13 @@
   for (pos = BOARDMIN; pos < BOARDMAX; pos++) {
     if (!ON_BOARD(pos))
       continue;
-    else if (board[pos] == color && worm[pos].unconditional_status == ALIVE)
+    else if (board[pos] == color && worm[pos].invincible)
       distance[pos] = 0;
     else if (!do_capture_dead_stones
-            && board[pos] == other 
-            && worm[pos].unconditional_status == DEAD)
+            && ((board[pos] == other 
+                 && worm[pos].unconditional_status == DEAD)
+                || (board[pos] == color
+                    && worm[pos].unconditional_status == ALIVE)))
       distance[pos] = 0;
     else
       distance[pos] = -1;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]