[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Bug Game for gnugo 3.2 (with output)
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] Bug Game for gnugo 3.2 (with output) |
Date: |
Tue, 11 Jun 2002 00:57:20 +0200 (CEST) |
On Mon, 10 Jun 2002, Gunnar Farneback wrote:
> Josh Stern wrote:
> > Output was:
> >
> > ***assertion failure:
> > value_moves.c:2550 - 0 near PASS***
>
> Has someone managed to reproduce either of Josh's two crashes? Just
> loading the position and generating a move doesn't suffice, at least
> not for me.
>
> The assertion above is slightly bizarre, by the way. It happens in
> this code:
>
> default:
> /* This means probably someone has introduced a new threat type
> * without adding the corresponding case above.
> */
> gg_assert(0);
> break;
>
> I'm pretty sure that this shouldn't be possible and if it were we
> should have caught it much erlier.
I couldn't reproduce it either. However, the patch below is obviously
necessary; it's indeed surprising but not too remote that we didn't
catch this earlier.
Arend
arend_3_4.2:
- fix ALL_MOVE move reason to even value
Index: engine/move_reasons.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.h,v
retrieving revision 1.19
diff -u -r1.19 move_reasons.h
--- engine/move_reasons.h 3 May 2002 17:57:58 -0000 1.19
+++ engine/move_reasons.h 10 Jun 2002 22:57:28 -0000
@@ -22,6 +22,7 @@
/* values for move_reason.type */
#define THREAT_BIT 1
+/* Only use even values for non-threat move reasons! */
#define ATTACK_MOVE 2
#define ATTACK_MOVE_GOOD_KO 4
#define ATTACK_MOVE_BAD_KO 6
@@ -62,7 +63,7 @@
#define ANTISUJI_MOVE 70
#define EITHER_MOVE 100
-#define ALL_MOVE 101
+#define ALL_MOVE 102
/* Bitmap values for move_reason.status */