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.