[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Bearoff database question
From: |
Joern Thyssen |
Subject: |
Re: [Bug-gnubg] Bearoff database question |
Date: |
Thu, 10 Jun 2004 06:57:17 +0000 |
User-agent: |
Mutt/1.4.2.1i |
On Thu, Jun 10, 2004 at 07:04:41AM +0200, Joachim Matussek wrote
> Hello,
>
> I just wanted to use bearoffdump.exe. Can anyone tell me how the
> positions are numerated within the bearoff databases. When i want to
> look for a special position?s output, how can i calculate its position
> number?
One-sided enumeration:
Assume you have C chequers and P points. The total number of one-sided
positions is binom(C+P,P).
000...0000 : #0
100...0000 : #1
010...0000 : #2
001 ..0000 : #2
000...0001 : #P
200...0000 : #P+1
110...0000 : #P+2
101...0000 : #P+3
...
020...0000 : #P+#P
etc.
That is, we start enumerating all positions with 0 chequers, then all
positions with 1 chequer, and then all positions with 2 chequers etc.
Two-sided enumeration:
two sided enum =
(one sided enum for player on roll) * binom(C+P,P)
+ (one sided enum for opponent)
I hope this helps!
This is the same enumeration used by Hugh Sconyers to index his
databases, except that he doesn't include position #0.
J?rn