bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Some more code-related questions


From: Jim Segrave
Subject: Re: [Bug-gnubg] Some more code-related questions
Date: Sat, 25 Oct 2003 02:24:16 +0200
User-agent: Mutt/1.4.1i

On Fri 24 Oct 2003 (15:49 -0600), Thomas Hauk wrote:
> Once again, I'll just ask a few questions to see how far off I may be on 
> the answer. 8)
> 
> How does gnubg's search work? Is it basically a beam search, and if so, 
> how are candidates chosen? How many are kept?

0 ply candidates are chosen by static evaluation of each move. The 0
ply move filter decides how many moves to keep - there's a fixed
amount that will always be kept (assuming there are enough
candidates), then the next highest equity n moves are added as long as
they are withing e of the best move's equity, where n and e are part
of the move filter. 

For a one ply evaluation, the result of the above list is then
re-examined, For each move, a set of possible rolls by the other
player is generated (all 21 if the speed is set to 100%, subsets of
the possible rolls for 33% or 50% speeds). The equity of the resulting
position after the best move by the other side is calculated, then
inverted to give the current player's equity. The equities are
averaged over all the rolls. The list of moves will then be reduced if
requested, using the one-ply move filters. 

The above procedure is repeated for each additional ply.


> How do the cubeinfo and evalcontext structs work?

I'm not sure I understand the question - cubeinfo's contain the
current cube owner, cube value, match score, rule sets etc. This is
the data needed to do cubeful equity calculations from the raw
win/wing/winbg/loseg/losebg data. It is also needed even in non-cube
situations such as the Crawford game, as it affects calculating match
winning chance etc.

evalcontexts contain the current choices in terms of plies, if cubeful
evaluations are wanted, if reduced sets of rolls are to be used, etc.

> I want to set up a match between my search procedure at 3-ply (aka 
> gnubg2ply) and gnubg at "best" settings for 3-ply (aka gnubg2ply). To make 
> things simple, I just want to play a series of 1-point matches.
> 1. How do I "turn off" the doubling cube?

Settings->Options->Use Doubling cube


> 2. What function should I call to initiate a "regular" gnubg search, given 
> a board and a roll?

FindnSaveBestMoves()


> How does the NN cache scheme work? How can I turn it on/off? How can it be 
> adjusted?

A key is generated based on the evaluation done (0/1/2/... ply), the board
position, and match state. A hash function on this key is used to
locate a storage point for the evaluation output. I believe (but
haven't checked), that no collision handling is done - if there is a
cache entry there which doesn't match, it is over-written.

Why would you ever wish to turn off the cache - the result is a
dramatic performance hit with no gains that I can imagine. If you
expect that your search algorithm will generate evaluations which are
only applicable at certain points, change the key definitions to
ensure that cache lookups will only succeed in the correct context.

The only adjustment is the cache size, Settings->Options->Other->Cache Size

-- 
Jim Segrave           address@hidden





reply via email to

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