This directory contains a program which does exhaustive-search analysis of bearoff positions in backgammon. Because searching a tree takes exponential time in the depth of the tree, you really don't want to use this on "large" positions; exactly what "large" means depends on the computer you're using and how long you're prepared to wait! The program is written in CWEB, a literate programming system. If you haven't a clue what that means, have a look at comp.programming.literate, or read Knuth's book "Literate Programming". CWEB source gets munged to produce C (program) and TeX (documentation). Since many users don't have CWEB, this directory contains the C and TeX too. It also contains a DVI file produced from the TeX, and the macro file "cwebmac.tex" needed to make the TeX work. Warning: This is a slightly non-standard version of CWEB, called CWEB 3.x. You can get a copy by anan ftp to ftp.cwi.nl, in directory pub/cweb. --- Caveats: Er, this may not work properly if you have 64-bit integers. It certainly won't work at all if you have 16-bit integers. --- Using the program: Invoke it as "race position1 - position2 [-r roll]" A position is a list of up to 6 non-negative numbers whose total is at most 15. It indicates the number of men on the 1-point, 2-point etc. You specify first of all the position of the player who's on move, and then that of the other player. The numbers should be separated by spaces. A roll is a list of either 2 or 4 numbers from {1,2,3,4,5,6}. The output from the program should be pretty self-explanatory; perhaps I should mention that the after-one-roll equities it gives when you don't specify a roll are in the order no-cube,p1-has-cube,p2-has-cube. --- Why you should use this program: There is another program floating about the net which does much the same as this, called "race2". Its main drawback is that it is about 5 times slower, and gives less information. If you don't mind that, fine. It may on occasions be more accurate, with a difference of about 10^-6 at most, because it uses double-precision reals everywhere and mine uses integers. This isn't quite fair: on machines with fast floating-point arithmetic, the speed difference is much less. My program is still faster, though. Gareth McCaughan 27/6/1995