[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] --experimental-semeai
From: |
bump |
Subject: |
Re: [gnugo-devel] --experimental-semeai |
Date: |
Tue, 18 Jun 2002 19:47:42 -0700 |
> > (2) I think for correctness we are supposed to push and pop
> > the owl data. When I added this to the semeai code I was getting
> > crashes that I haven't been able to resolve yet. I can post a patch
> > later if anyone is interested in thinking about this.
>
> This might be related to my changes in push_owl, so I can of course look
> into this.
Here's the patch. It crashes in ld_owl:101.
***assertion failure:
owl.c:3988 - owla->color == (1+2-(owlb->color)) near PASS***
Dan
Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.91
diff -u -r1.91 owl.c
--- engine/owl.c 3 Jun 2002 15:00:59 -0000 1.91
+++ engine/owl.c 15 Jun 2002 14:48:47 -0000
@@ -827,9 +827,10 @@
&& stackp < MAX_SEMEAI_DEPTH
&& semeai_trymove(mpos, color, moves[k].name, apos, bpos,
owl_phase, moves[k].value)) {
- if (1)
- if (debug & DEBUG_SEMEAI)
- dump_stack();
+ if (owl_phase)
+ push_owl(&owla);
+ if (debug & DEBUG_SEMEAI)
+ dump_stack();
if (board[bpos] == EMPTY) {
this_resultb = DEAD;
this_resulta = ALIVE;
@@ -847,6 +848,8 @@
if (this_resultb == DEAD && this_resulta == ALIVE) {
memcpy(owla->goal, saved_goal, sizeof(saved_goal));
+ if (owl_phase)
+ pop_owl(&owla);
popgo();
owl_phase = save_owl_phase;
*resulta = ALIVE;
@@ -874,6 +877,8 @@
best_move_k = k;
}
memcpy(owla->goal, saved_goal, sizeof(saved_goal));
+ if (owl_phase)
+ pop_owl(&owla);
popgo();
owl_phase = save_owl_phase;
}
@@ -4532,7 +4537,10 @@
static void
push_owl(struct local_owl_data **owl)
{
- gg_assert(*owl == &owl_stack[owl_stack_pointer]);
+ /* This assertion is not safe during semeai reading since both
+ * owl data get pushed on the same stack. */
+ if (0)
+ gg_assert(*owl == &owl_stack[owl_stack_pointer]);
/* Do we need to enlarge the stack? */
if (owl_stack_pointer == owl_stack_size - 1) {
if (0)
- Re: [gnugo-devel] GNU Go 3.3.3, (continued)
- Re: [gnugo-devel] GNU Go 3.3.3, Trevor Morris, 2002/06/05
- Re: [gnugo-devel] GNU Go 3.3.3, bump, 2002/06/05
- Re: [gnugo-devel] GNU Go 3.3.3, Gunnar Farneback, 2002/06/05
- Re: [gnugo-devel] GNU Go 3.3.3, bump, 2002/06/05
- Re: [gnugo-devel] GNU Go 3.3.3, Trevor Morris, 2002/06/06
- Re: [gnugo-devel] GNU Go 3.3.3, bump, 2002/06/06
- arend_3_4.1: test fixed (Re: [gnugo-devel] GNU Go 3.3.3), Arend Bayer, 2002/06/07
- [gnugo-devel] --experimental-semeai, Arend Bayer, 2002/06/18
- Re: [gnugo-devel] --experimental-semeai, bump, 2002/06/18
- Re: [gnugo-devel] --experimental-semeai, Arend Bayer, 2002/06/18
- Re: [gnugo-devel] --experimental-semeai,
bump <=
- Re: [gnugo-devel] --experimental-semeai, bump, 2002/06/18