gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] abort on inconsistent genmove result


From: Arend Bayer
Subject: [gnugo-devel] abort on inconsistent genmove result
Date: Sun, 15 Sep 2002 17:05:52 +0200 (CEST)

I've looked at that most recent bug report (Subject: gnugo bug).

The problem in that game was at move 58: GNU Go intended to play PASS
here, but cgoban records the move as J9. The problem was that genmove
returned a positive value, but PASS as move -- this is inconsistent,
it is supposed to return a negative value if it wants to pass
(and this inconsistency can probably confuse all interface functions).

This was here caused by fill_liberty(). I am not familiar with the code
there, but I guess it should now be rather easy to track the problem
down.

The assertion below in genmove() catches such cases.

Arend


Index: engine/genmove.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v
retrieving revision 1.48
diff -u -r1.48 genmove.c
--- engine/genmove.c    28 Aug 2002 09:44:27 -0000      1.48
+++ engine/genmove.c    15 Sep 2002 14:51:36 -0000
@@ -286,6 +286,7 @@
   int retval;

   retval = do_genmove(&move, color, 0.4);
+  gg_assert(retval < 0 || ON_BOARD1(move));

   if (i) *i = I(move);
   if (j) *j = J(move);





reply via email to

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