[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] changed board_hash after reading
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] changed board_hash after reading |
Date: |
Fri, 2 Sep 2005 20:17:43 +0200 (CEST) |
I wrote:
> Gunnar wrote:
> > Arend wrote:
> > > I will take care of fixing the bug in the 2nd quoted code excerpt.
> >
> > The fix in Martin's patch looks good to me.
>
> Right. I hadn't fully understood the problem when I read Martin's patch,
> and so it didn't make sense to me at the time. I am just running
> regressions for this part of his patch (appended below) and will check
> it in, so we have a baseline to judge the other changes against.
I have done so. Regression results are:
ninestones:570 FAIL A2 [A9|B10|D11|F11|J15|A16]
Total nodes: 1654982994 3159153 13010314
2 PASS
2 FAIL
Arend
> Index: engine/board.c
> ===================================================================
> RCS file: /cvsroot/gnugo/gnugo/engine/board.c,v
> retrieving revision 1.111
> diff -u -p -r1.111 board.c
> --- engine/board.c 12 Jun 2005 09:34:13 -0000 1.111
> +++ engine/board.c 2 Sep 2005 15:33:54 -0000
> @@ -1248,13 +1248,7 @@ komaster_trymove(int pos, int color, con
> *is_conditional_ko = 0;
> ko_move = is_ko(pos, color, &kpos);
>
> - if (!ko_move) {
> - if (komaster == WEAK_KO) {
> - set_new_komaster(EMPTY);
> - set_new_kom_pos(NO_MOVE);
> - }
> - }
> - else {
> + if (ko_move) {
> /* If opponent is komaster we may not capture his ko. */
> if (komaster == other && pos == kom_pos)
> return 0;
> @@ -1293,8 +1287,13 @@ komaster_trymove(int pos, int color, con
> }
> }
>
> - if (!ko_move)
> + if (!ko_move) {
> + if (komaster == WEAK_KO) {
> + set_new_komaster(EMPTY);
> + set_new_kom_pos(NO_MOVE);
> + }
> return 1;
> + }
>
> if (komaster == other) {
> if (color == WHITE)