[Top][All Lists]

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

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

From: Joern Thyssen
Subject: Re: [Bug-gnubg] Some more code-related questions
Date: Mon, 27 Oct 2003 09:09:47 +0000
User-agent: Mutt/1.4.1i

On Mon, Oct 27, 2003 at 12:16:38AM -0700, Thomas Hauk wrote
> Thanks again for the responses, Jim.
> Here is what I've distilled from our discussion. The following lines of 
> code are what I think would be needed in order to get gnubg to perform a 
> standard (gnubg)2-ply search on any given board, for a 1-pt match:
>    cubeinfo gnu_ci = {1, -1, 0, 1, {0, 0}, 0, 0, 0, {1.0, 1.0, 1.0, 1.0}, 
>    evalcontext gnu_ec = {FALSE, 0, 2, 0, 0};
>    if(FindBestMove(gnu_move, die1, die2, gnu_board, &gnu_ci, &gnu_ec, 
> defaultFilters) < 0) {
>       printf("Cannot move\n");
>    } else {
>       printf("gnubg choses '%s'\n",FormatMove(temp_str, gnu_board, 
> gnu_move));
>    }
> (Where die1 and die2 are the two dice values, and gnuboard is the 
> arbitrary position)
> Is this correct? I want gnubg to producing the best-quality search 
> possible for the given ply setting ("grandmaster"?).

In that case you should supply another movefilter instead of the
"defaultFilter". The 2-ply "supremo" setting uses the "large"

aaamfMoveFilterSettings[ 3 ]   (from eval.c)

gnu_ci.arGammonPrice is inconstent with your gnu_ci.nMatchTo setting,
since the gammon price corresponds to money play, but the match length
suggests a 1pt match (where all gammon prices are nil).

I'd suggest you change the nMatchTo member of gnu_ci to 0 to make it
money play. Cubeless money play is often used for benchmarks since the
neural nets almost exclusively are trained for cubeless money play.

If you want to avoid problems with inconsistent gnu_ci you can call

SetCubeInfo( &gnu_ci, 
             1 /* nCube (not used for cubeless money play) */, 
             -1 /* fCubeOwner(not used for cubeless money play) */, 
             0 /* fMove (not used for cubeless money play) */, 
             0 /* nMatchTo */, 
             0 /* fMove */, 
             {0,0} /* anScore (not used for money play) */, 
             1 /* fCrawford (not used for money play),
             0 /* fJacoby (most be 0 for cubeless money play),
             0 /* fBeavers (not used for cubeless money play),
             VARIATION_STANDARD );

> Also, what kind of time controls does gnubg have? I think Jorn mentioned 
> to me that the standard Control-C interrupt can be used to stop the search 
> routine if the user desires. I just tried that with the gui myself, but 
> the problem is that while search seems to be stopped, a move isn't chosen. 
> (I will want to be adding a way to constrain the time used per move later 
> on).

gnubg doesn't have that particular type of timecontrols you're looking for. 


Attachment: pgpIrODuCPC1G.pgp
Description: PGP signature

reply via email to

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