gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] engine/influence.c (and DFA)


From: Dave Denholm
Subject: Re: [gnugo-devel] engine/influence.c (and DFA)
Date: 03 Sep 2002 15:50:19 +0100

Arend Bayer <address@hidden> writes:

> On 3 Sep 2002, Dave Denholm wrote:
> 
> > Hi,
> >    I was just having a look at influence.c, since that is where the
> > profile shows the most time being spent.
> >
> > Noticed something odd about the unrolled loop in accumulate_influence():
> > it still has 'continue' statements in it, which means, unless I'm missing
> > something obvious, the behaviour is different when the loop is unrolled or 
> > not.
> >
> > When the loop is not unrolled, the continue means to go and do the
> > next direction.
> >
> > But when the loop is unrolled, the same continue statement means
> > abandon this queue entry entirely, and go on to the next one.
> 
> Indeed I get quite different results when I define
> EXPLICIT_LOOP_UNROLLING to 0. We should fix that, but it might need some
> retuning of the influence.
> 


Hmm - adding a  do { ... } while(0)  around the macro body still doesn't
generate quite the same game  (based on  ./gnugo -b 100 --seed 12345)


I noticed that the unrolled version doesn't visit the neighbours in
exactly the same order. Changing this also does give exactly the
same game whether the loop is unrolled or not. Unrolling the loop
reduced the time from 6 minutes to 5 minutes 37 seconds. (I had been
wondering whether the measured speedup had been due to it doing less
work, rather than due to the unrolling.)


( Doesn't seem a good thing for influence to depend on the order
 of visiting nodes, but ..?)



On subject of testing speedups : perhaps it would be useful to have a variant on
twogtp which spawns two engines, but rather than playing them
against each other, sets the same seed and asks them to generate moves. It 
verifies
that they play identically at all times. This would make it easier to automate
testing changes which are intended to be speedups only.

Or just a shell script which runs with -b and a few different seeds.


dd
-- 
address@hidden          http://www.insignia.com




reply via email to

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