bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Some results from my 'Dice' game


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Some results from my 'Dice' game
Date: Sat, 16 Aug 2003 17:03:47 +0000
User-agent: Mutt/1.4.1i

On Fri, Aug 15, 2003 at 10:54:23AM -0600, Thomas Hauk wrote
> On Fri, 15 Aug 2003, Joern Thyssen wrote:
> > I'll try to write a standalone version of the code you can use for
> > testing.
> > 
> > I'll start with the cubeles code since this is the simplest one.
> 
> Wow Joern, thanks. You rock. 8)

Hmm, this is a bit harder than I initially thought. I think it requires
some major work on eval.c and friends to sort this out.

I've attached a small program that shows an example on how to call the
evaluator.  I've coded a few small examples that should be appropriate
for you.

You can link the program with:

gcc -g -O2 -o hauktest hauktest.o eval.o positionid.o pub_eval.o
matchequity.o matchid.o i18n.o getopt.o getopt1.o osr.o bearoffgammon.o
bearoff.o path.o drawboard.o format.o -Llib -levent -Llib -levent -lm
-lxml2

The board is encoded as 2 times 25 integers, int anBoard[ 2 ][ 25 ],
representing the 24pt to the 1pt plus the bar. Note that the evaluator
always assumes that the player on roll is player 1, e.g., anBoard[ 1 ],
so every time you descent one level you must swap anBoard[ 0 ] and
anBoard[ 1 ]. 

The cubeinfo struct contains information about the cube, score, player
on roll. For money play you can just set it to the values I provided in
the attached file. For match play you need to invert the fMove paremeter
each time you descent one level.

The evalcontext controls the evaluator. I guess you'll only call the
cubeless 0-ply evaluator so you can just use the evalcontext from my
example in the attached file.

Ask away if you have any questions!

Jørn

Attachment: hauktest.c
Description: Text document

Attachment: pgplilUhrS9t0.pgp
Description: PGP signature


reply via email to

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