Node:Obtaining bearoff databases, Previous:Bearoff databases with GNU Backgammon, Up:Bearoff databases



Obtaining bearoff databases

Generate your own

gnubg is supplied with a program makebearoff that is used to generate bearoff databases. Due to various limitations it is only possible to generate bearoff databases with a size less than 2GB, i.e., the 13pt one-sided database and the 11 chequer two-sided database are the largest databases that can be generated with makebearoff.

To generate one sided database issue

     makebearoff -o 10 -f gnubg_os.bd
     

to generate the one sided 10 point database. The program makebearoff uses a cache to store previously generated positions. You may set the cache size with the -s size option, e.g.,

     makebearoff -o 10 -s 123456789 -f gnubg_os.bd
     

to use 123,456,789 bytes of memory for cache size. In general, if the cache size is less than the size of the database to be generated, then extra time is needed to generate the bearoff database because some positions may have to be calculated several times.

makebearoff can also reuse previously generated databases, so if you already had generated the 9 point database you can reuse it:

     mv gnubg_os.bd gnubg_os9.bd
     makebearoff -o 10 -O gnubg_os9.bd -f gnubg_os.bd
     

Note that makebearoff requires temporary disk space to generate both one sided and two sided databases. In general, twice the disk space of the database to be generated is needed.

To generate a two sided database issue

     makebearoff -t 6x8 -f gnubg_ts.bd
     

This example will generate the 8 chequers on 6 points database. Again, it's possible to adjust the amount of memory with the -s option. It's recommended to set the cache size to the maximum amount of memory available (although there is no need to set it beyond the size of the bearoff database to be generated).

Other options for makebearoff are available, see makebearoff --help for the complete set.

At compile time the built-in one sided bearoff database is generated with the command

     makebearoff -o 6 | makebearoff1 -o br1.c
     

which generated a 6 point one sided bearoff database. The database is piped into makebearoff1 that generates the C code for the database. The resulting br1.c is more than 8MB, so it's not distributed with the source for gnubg.

The accompanying program makehyper is used to generate databases for Hypergammon. For example, to generate the 3-chequer database issue the command

     makehyper -c 3 -f hyper3.bd
     

Since the generation is very time consuming makehyper will generate a checkpoint file (in the example above: hyper1.bd.tmp) that can be used to restart the calculation if needed by using the -r option. You can also change the default convergence threshold of 0.00001 if you're happy with less accurate equities. To generate the 3 chequer database you need approximately 400 MB of free memory. On a 2.4 GHz box with 512 MB of RAM the calculation ran for 58 iterations of 3000 seconds each, i.e., a total of 48 hours!

See makehyper --help for the complete set of available options.

Download

You may download the two sided database with 6 chequers on 6 points from ftp://alpha.gnu.org/gnu/gnubg/gnubg_ts0.bd.gz and the one sided database with 15 chequers 6 points from ftp://alpha.gnu.org/gnu/gnubg/gnubg_os0.bd.gz.

Later, other databases may be available for download or it may be possible to purchase these on CDROM or DVD for a nominal fee.

Verification of databases

To verify that your generated or downloaded bearoff database is correct, the table below lists the MD5 checksums for a number of possible databases.

One-sided bearoff databases (compressed)

The table below contains the MD5 checksums for the compressed one sided bearoff databases, i.e., databases generated with default options.

Chequers Points MD5 checksum
15 1 c789f049ec98ce4e307b471257999f39
15 2 b6e61c1625ae4b3b164e93ab064192b9
15 3 346dae6139ccb4b227c534373e5c52e4
15 4 653255f5f9f22fd50277f7ff25b2a343
15 5 2064f9a56b23117d053a573c96a92fa2
15 6 3dc7b833c4670849cee00479a9e21b49
15 7 67235c8e0ee152df5daf36cbeae5b3c2
15 8 a4acbb5c7e9e1f08e561afe0af934e5c
15 9 9c4ddab4e51c3e668c9c97b8f8768dbc
15 10 81b3898f06bbd08ee8295a839251a10a
15 11 78ecb4be86dab6af8755ea4063d50fb6
15 12 770fcff48894a96ebb2249343ef94866
15 13 cc74b69a62f6e648936f533838a527a8
15 14 not available
15 15 not available
15 16 not available
15 17 not available
15 18 not available

Two-sided bearoff databases (with cubeless and cubeful equities)

The table below contains the MD5 checksums for the default two sided bearoff databases.

Chequers Points MD5 checksum
1 6 7ed6f8e7fce16ea2b80e07a4a516653c
2 6 e9d760bf213841c285245ed757a52f4d
3 6 9d67da3db32ad4720cc38eecf9a67967
4 6 9156f37032d1d4b0352a41186e632dfc
5 6 0db19ab08feae1feb33ddbd709479f62
6 6 44b6040b49b46cb9dd2ce8caa947044d
7 6 9eb8b042d4d2ddf8d40e74a892745ad5
8 6 fcdbbc80b7ef84ddc81b839d0f26bed1
9 6 a11b2d410d51401143d05e73f9ffac15
10 6 12dc70c86f356d06bc96ee38dee40c62
11 6 not available
12 6 not available
13 6 not available
14 6 not available
15 6 not available

Two-sided databases for Hypergammon

As the generation of the Hypergammon databases are an iterative process it's not possible to give MD5 checksum for these, as it depend heavily on your convergence threshold, the number of restarts, and rounding errors.

Below is a random position from the database. The equities and percentages in your own database should be very similiar (if not identical):

      GNU Backgammon  Position ID: ADAAAQAkIAAAAA
                      Match ID   : cAkAAAAAAAAA
      +13-14-15-16-17-18------19-20-21-22-23-24-+     O: gnubg
      |       X     X    |   |                X |     0 points
      |                  |   |                  |
      |                  |   |                  |
      |                  |   |                  |
      |                  |   |                  |
     v|                  |BAR|                  |     (Cube: 1)
      |                  |   |                  |
      |                  |   |                  |
      |                  |   |                  |
      | O                |   |                  |     On roll
      | O                |   |             O    |     0 points
      +12-11-10--9--8--7-------6--5--4--3--2--1-+     X: jth
     
                  Player       Opponent
     Position         3018          2831
     
     Owned cube                    : -0.0230
     Centered cube                 : -0.2310
     Centered cube (Jacoby rule)   : -0.2186
     Opponent owns cube            : -0.3548
     
             Win     W(g)    W(bg)   L(g)    L(bg)   Equity  (cubeful)
     static: 0.456   0.244   0.014   0.318   0.019   (-0.168  (-0.219))
     
     
     No double           : -0.219
     Double, pass        : +1.000   (+1.219)
     Double, take        : -0.710   (-0.491)
     
     Correct cube action: No double, beaver