[Top][All Lists]

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

[gnugo-devel] changed board_hash after reading

From: Martin Holters
Subject: [gnugo-devel] changed board_hash after reading
Date: Wed, 17 Aug 2005 21:31:38 +0200

Hi all,

when trying some optimisations in reading.c, I tripped over the strange
behaviour that reading changes the board_hash, eventually causing
inconsistent cache entries. For example, in my desperate measure to get
a grip on things,

  result = do_attack(str, &the_move);
  ASSERT1(result == do_attack(str, &the_move), str);

the assertion fails sometimes, as the first do_attack may cause changes
to the board_hash, making the second one retrieve a differing result. Am
I correctly assuming that this is not how things should be?

I digged a little deeper to find out that 

  if (komaster_trymove(...))

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?

Martin Holters <address@hidden>

reply via email to

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