[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] autolevel bug
From: |
Evan Berggren Daniel |
Subject: |
Re: [gnugo-devel] autolevel bug |
Date: |
Wed, 25 Sep 2002 18:22:48 -0400 (EDT) |
OK, I think I found the bug. This should fix it, but it's untested.
Thanks
Evan Daniel
On Wed, 25 Sep 2002, Evan Berggren Daniel wrote:
> OK, I'll spend a little time looking at it then. I won't worry about it
> too much, though.
>
> Evan
>
> On Wed, 25 Sep 2002 address@hidden wrote:
>
> >
> > The autolevel code was implemented almost 18 months ago in
> > preparation for tournament play by Tanguy Urvoy. Since GNU
> > Go on Pentium 3 or better is fast enough that it finishes
> > tournament games with time to spare, it was not used this
> > summer, unless Inge used it in Maastricht. Thus it has not been
> > maintained for a long time.
Index: clock.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/clock.c,v
retrieving revision 1.13
diff -u -d -r1.13 clock.c
--- clock.c 16 Sep 2002 08:37:08 -0000 1.13
+++ clock.c 25 Sep 2002 22:21:22 -0000
@@ -543,11 +543,13 @@
* (up to prediction error estimation)
* and update the level.
*/
- if (clk.level > CLOCK_CONTRACT_MIN_LEVEL)
+ if (clk.level > CLOCK_CONTRACT_MIN_LEVEL) {
if ((predicted_tm - clk.error) > expected_tm)
clk.level -= CLOCK_STEP;
+ } else {
if ((predicted_tm + clk.error) < expected_tm)
clk.level += CLOCK_STEP;
+ }
}