[Top][All Lists]

[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: Wed, 22 Jan 2003 15:05:55 -0500
User-agent: Mutt/1.3.28i

On Wed, Jan 22, 2003 at 06:48:34PM +0000, Joern Thyssen wrote:
> The following script (after a cold-start of gnubg) gives rubbish:
> set matchid MAFgACAAEAAA
> set board zx4AALjbFgCBAA
> set eval cheq eval plies 0
> set dice 6 1
> show board
> hint
> The problem seems to lie with NNevalAction. If I hardcoded NNevalAction
> to return NNEVAL_NONE both scripts run fine...

I think the problem is that some of the moves lead to evaluations from
the contact net, and other use the crashed net.  Obviously it is not
possible to perform incremental evaluations with both nets from the
same base, but the code in ScoreMoves() which controls the incremental
evaluator (by setting moveNumber) sets up all evaluations after the
first to be incremental.

Another possible bug (I haven't tested it) is that if the first evaluation
is found in the cache, then the side effect of setting up the base
in NeuralNetEvaluate() will not occur, and subsequent evaluations will
be wrong.

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?

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

reply via email to

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