bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] gnubg.bd


From: Joseph Heled
Subject: Re: [Bug-gnubg] gnubg.bd
Date: Tue, 05 Nov 2002 07:30:24 +1300
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020829


Joern Thyssen wrote:
On Tue, Nov 05, 2002 at 07:06:09AM +1300, Joseph Heled wrote

Yes, I store the distribution for taking one or more chequers off which
can be used for gammon probabilities.


There is a place for saving here as well - I guess in most of those positions the probabilty of gammon is 0. Not sure how the details would work. For example, all positions with all 6 points non empty and op with more than one roll. Actually positions with top 4 points non empty is enough.


My compression scheme works as follows:

I store a table with 8 bytes entries:

4 byte: offset into file
1 byte: index into aProb
1 byte: non-zero elements in aProb
1 byte: index into aGammonProb
1 byte: non-zero elements in aGammonProb

So the "price" for storing a zero gammon distribution is 2 bytes. I
think I can live with that.

For example, the 6 pt database is 6,945,792 bytes for both bearoff
distribution and gammon distribution. With the compression scheme above
it shrinks to 1,467,498 bytes. Storing only bearoff distribution results
in a file of size is 1,339,230 bytes, so storing the gammon distribution
only costs 130kb.
Still, there is some overhead compared to your bb1.o at 1,126,324 bytes.

But I don't store gammons. The numbers look very reasonable. I only wish you would have waited for me to finish the analysis and see if it is needed or not :)

On the whole, it is good to give the user the options of deciding if she wants perfect play at the expense of time and disk space. I am just not sure it should be so high on your agenda at this stage.

-Joseph


-Joseph


Jørn






reply via email to

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