bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] problem with evaluations


From: Gary Wong
Subject: Re: [Bug-gnubg] problem with evaluations
Date: Thu, 23 Jan 2003 17:08:15 -0500
User-agent: Mutt/1.3.28i

On Thu, Jan 23, 2003 at 05:33:02PM +0000, Joern Thyssen wrote:
> On Wed, Jan 22, 2003 at 03:05:55PM -0500, Gary Wong wrote
> > I am considering a fix by modifying EvalRace(), EvalContact() and
> > EvalCrashed() to keep track of the incremental evaluations independently.
> > There would be a single global variable indicating the context the
> > evaluation is in (normally -1, indicating that incremental evaluations
> > are not useful; during 0-ply evaluations, ScoreMoves() would push a
> > unique identifier onto the stack to specify its context, and restore the
> > old identifier afterwards).  EvalRace(), EvalContact() and EvalCrashed()
> > would decide what type of evaluation to use at each call: if the global
> > indicator is -1, they would use NNEVAL_NONE; if the indicator is not -1
> > but not the same as the last call to that identifer, they would use
> > NNEVAL_SAVE; otherwise, NNEVAL_FROMBASE.  I think this would solve the
> > problem of using more than one neural net during ScoreMoves(), as well
> > as coping with cache hits on some but not all evaluations.  Is this
> > approach reasonable, or are there something I'm missing?
> 
> Sounds fine, as long as we handle recursiveness, i.e., ScoreMoves
> calling itself.

I think that having ScoreMoves() save the old context on entry and restore
on exit ought to work (the saved contexts will be scattered across the
CPU stack, giving us LIFO ordering, which ought to be what we want).  By
incrementing a single static integer each time we need one, we can
guarantee unique contexts each time.

I've committed your earlier workaround to CVS on the trunk and branch-0-13.
I'll try to get around to implementing the above fix one day soon.

Since there don't seem to be any outstanding show-stoppers on branch-0-13,
I'll tar up 0.13.0 shortly.

Cheers,
Gary.
-- 
   Gary Wong           address@hidden           http://www.cs.arizona.edu/~gary/




reply via email to

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