gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] changed board_hash after reading


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] changed board_hash after reading
Date: Wed, 17 Aug 2005 23:21:03 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Martin wrote:
> I digged a little deeper to find out that 
> 
>   if (komaster_trymove(...))
>     popgo();
> 
> can alter the board_hash. I blame this on the invocations of
> set_new_komaster() and set_new_kom_pos(). Before I start figuring out
> what komaster_trymove does (and how to fix it): Is this indeed a problem
> to be fixed or am I overlooking something and making wrong assumptions?

This looks like a bug. As far as I can tell the problem is that
board_hash is stored in a stack in do_trymove() but in the case of
komaster_trymove() it would need to be stored already at the start of
komaster_trymove() rather than when trymove()/tryko() is eventually
called. More specifically it needs to be stored before it is updated
in set_new_komaster()/set_new_kom_pos().

Please see if you can find a nice and clean solution to the problem.
Quick and dirty solutions are not very hard to come up with but I
would much prefer something good.

What I don't understand is why this hasn't caused more obvious
problems. Actually, could you just try something quick and dirty and
see what effects it has on the regressions? See also this message from
Arend when he made komaster part of the board state:

http://lists.gnu.org/archive/html/gnugo-devel/2004-04/msg00042.html

/Gunnar




reply via email to

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