GNU Backgammon (gnubg
) is software for playing and analysing backgammon positions, games and matches. It’s based on a neural network. Though it already plays on a very high level, it’s still a work in progress. You may play GNU Backgammon using the command line or a graphical interface (based on GTK+).
Currently, GNU Backgammon is actually designed for GNU/Linux. It also compiles and (hopefully) runs under *BSD, IRIX, Solaris and True64 Unix. Last but not least there are frequently binaries for MS Windows and MS DOS. It has also been ported to MacOS. When you successfully port GNU Backgammon to other operating systems, you are welcome to give us a note at bug-gnubg@gnu.org.
The official website is http://www.gnubg.org. The old source code for GNU Backgammon can be dowloaded as a source tarball. There is also a daily snapshot of the source code here. You can also get the source code through CVS. MS Windows binaries are available at this page. GNU/Linux RPMs are also available at this page.
GNU Backgammon is Free Software and is a part of the GNU Project. You may download it for free. For more information see the GNU General Public License. But be aware that GNU Backgammon is not public domain software or shareware as you perhaps know from MS Windows.
Take a look at the GNU home page. It’s also the page for Free Software Foundation.
A good place to start is Backgammon Galore. For an extensive link collection, go to Gammon Links.
Send an email to the gnubg-mailinglist. If it is a bug, be sure to include the name of your operating system, the version of gnubg
you use, and any error messages you receive. Try to describe exactly what happens before the error occurs.
You’re welcome! Send an email with your suggestions to gnubg-mailinglist.
For MS Windows, visit this site. GNU/Linux RPMs are available at this page. For installation on Mac OSX, you should read this page.
No. Everything you need is included in the binaries. If you want to use the 3D board version on Linux, you might have to install the additional libraries that can be found as well on this page.
If you are using a MS Windows operating system, make a copy of either .gnubgrc
or .gnubgautorc
and .gnubgmenurc
. You will find them either in ‘c:’ or the home directory of your GNU Backgammon (for instance: c:\Program Files\gnubg\
). After you have installed the new version, copy them back.
If you are working with GNU/Linux, these files are probably in your home directory (`~/’). They won’t be overwritten by installing a new version of GNU Backgammon, but it’s always a good idea to have a backup of them.
Good luck to you! Download the source code and make sure to read one of the following two items: What software do I need for compiling under GNU/Linux?, What software do I need for compiling under MS Windows?.
Unpack the GNU Backgammon snapshots and follow the instructions of the file `INSTALL’. 1
Nardy Pillards has published a fine instruction guide at http://users.skynet.be/bk228456/GNUBgW.htm. Go to this page and follow the steps shown there.
(Unfortunately this page seems to be gone, for now follow the instructions at http://www.gnubg.org/index.php?itemid=50.)
Check that you have installed all necessary development packages.
Look for warnings or errors during compiling. If you still don’t get a clue, send a message to the gnubg-mailinglist.
Here is a list of CPU and Evaluations per second (Analyse→Evaluation Speed). Feel free to add your CPU:
Evals/sec | CPU | System/Mainboard | RAM | OS | GNUBG-Version | Ann |
---|---|---|---|---|---|---|
679142 | Intel Core i7 980X (4GHz OC) | Asus P6T | 6144 MB | Win 7 ultimate | 20100713 | *4 |
384706 | Intel Core i7 920 D0(3.5GHz OC) | Asus P6T | 6144 MB | Win 7 RC 64bit | 20090907 | *4 |
305000 | Intel Core i7 920 (OC to 3GHz) | MSI x58 | 6144 MB | Win 7 RC 64bit | 20090612 | *4 |
262018 | Intel Core i7 920 (2.67GHz) | Intel X58 | 6144 MB | CentOS5.3-Linux | 20090721 | *4 |
215440 | Intel Core2Quad Q6600 (2.4 GHz) | Dell Vostro 400 | 3072 MB | Win Xp SP3 | 20091102 | *4 |
183384 | Intel Core2Quad Q6600 (2.4 GHz) | Dell Vostro 400 | 3072 MB | Win Xp SP2 | 0.16-mingw | *4 |
109916 | Intel Core2Duo E7400 (2.8 Ghz) | Dell Inspiron 545 | 6144 MB | Win Vista 64bit | 20090625 | *4 |
65528 | Intel Core2Quad Q6600 (2.4 Ghz) | Dell Vostro 400 | 3072 MB | Win Xp SP3 | 20091102 | *5 |
60894 | Intel Centrino Duo (1800 Mhz) | IBM Lenovo X60 | 2048 MB | Win XP SP2 | 0.16-mingw | *4 |
56565 | AMD Athlon64 X2 5200+ (2.6 GHz) | NForce | 2048 MB | Win Vista 32bit | 0.16-mingw | *4 |
46388 | Intel Core2Quad Q6600 (2.4 Ghz) | Dell Vostro 400 | 3072 MB | Win Xp SP2 | 0.16-mingw | *5 |
35170 | Intel Pentium-M (2260 Mhz) | Dell 630m | 1280 MB | Win XP SP2 | 0.16-mingw | |
31719 | AMD Athlon64 X2 5200+ (2.6 GHz) | NForce | 2048 MB | Win Vista 32bit | 0.16-mingw | *5 |
31218 | Intel Centrino Duo (1800 Mhz) | IBM Lenovo X60 | 2048 MB | Win XP SP2 | 0.16-mingw | *5 |
28450 | AMD Sempron 3000+ (1800 MHz) | K8T800-A | 1024 MB | Win 2000 | 0.14-mingw | *1 |
28000 | Intel Core Duo 1.66 GHz | Mac mini Core Duo | 512 MB | Win XP SP2 | 0.14-mingw | |
27000 | Intel Pentium M 735 (1.7 GHz) | AOpen 1557-J | 1024 MB | Win XP SP2 | 0.14-mingw | |
26000 | Celeron 331 2.66 GHz | Dell Dimension 3100 | 512 MB | Win XP SP2 | 0.14.3-devel | |
26000 | Intel Core Duo Mobile 1.73 GHz | Advent 7203 | 1024 MB | Gentoo 2.6.27 | 0.14.3 | |
24500 | Sempron 2800+ (rev E6@2000 MHz) | Asus K8V-X | 768 MB | Win XP SP2 | 0.14.3-devel | |
23000 | P4 2.8 GHz | Asus P4P800D | 1024 MB | Win XP SP2 | 0.14.3-devel | |
21759 | Athlon64 3000+ (32bit mode) | Acer Aspire 1522 | 512 MB | Kubuntu 5.04 | 0.14.3-devel | |
21500 | AMD Sempron 3000+ (1800 MHz) | K8T800-A | 1024 MB | Win 2000 | 0.14.3-devel | *1 |
20120 | Athlon XP 2500+ (@1833 Mhz) | MSI K7N-Delta2 | 1024 MB | Suse Linux 9.2 | 0.14.3-devel | |
20200 | Pentium M 1.7 GHz | Sony Vaio Z1XSP | 512 MB | FreeBSD 5.2 | ||
19515 | Intel Pentium M 0.8 GHz | Sony Vaio PCG-SRX51P | 256 MB | Fedora FC6(T3) | 0.14.3-devel | *2 |
19200 | Pentium M 1.6 GHz | IBM X41 | 1024 MB | Win XP SP2 | 0.14.3-devel | |
16900 | P4 2 GHz | ? | 256 MB | Win 2000 | 0.14-devel | |
14400 | P3 1GHz | Sony Vaio PCG-R600HFPD | 256 MB | Win XP SP2 | 0.16-mingw | |
13000 | AMD 1GHz | Jetway | 1536 MB | Win 2000 | 0.14-devel | *3 |
10506 | Intel Pentium M 0.8 GHz | Sony Vaio PCG-SRX51P | 256 MB | Windows XP(SP2) | 0.14-mingw | |
6200 | celeron 650 MHz | toshiba laptop | 256 MB | Win me | 0.14-devel |
Notes | |
---|---|
*1 | These are the two versions evaluated on the same machine. Big difference! |
*2 | According to cat /proc/cpuinfo |
*3 | Highly variable: 12000 .. 13700 |
*4 | Multiple threads supported |
*5 | No multithread support |
Well, your computer wants to communicate with you. Give it a chance and read (and try to understand) what it is telling you. Then read the next items carefully:
GNU Backgammon reads several different files at startup. It will first try to read a file called gnubg.wd
. This is a file which contains all the neural net weights and is necessary for the program to evaluate positions. If this file is not found, or found corrupted or with an incompatible version, GNU Backgammon will search for a weights file called gnubg.weights
. This file also contains the neural net weights, but is stored in ASCII format. If none of these files are found, GNU Backgammon will start, but it will give you a warning about these missing files, and it will play very poorly.
GNU Backgammon will also read the bearoff databases at startup. There are usually two bearoff databases. The first is called gnubg_os0.bd
, and has stored data about the bearoff probabilities of all position where both players have 15 or fewer chequers left on their six home board points. If this file is not found, GNU Backgammon will create a heuristic bearoff database for these positions. This database is a also called the ‘One Sided Database’, since it evaluates each player separately. The other bearoff database is called gnubg_ts0.bd
. This bearoff database contains win probabilities for all bearoff positions with six or less chequers. It also contains cubeful equities (Money Game) for all the positions. If this file is not found at startup, GNU Backgammon will evaluate late bearoff positions with the one sided bearoff database.
Open the MS Windows menu and go to the entry for gnubg. Right-click with the mouse and choose `properties’. Check, if the `working path’ is the same directory as the `*.exe’-file one line above. If not, adjust the working path.
Install the newest driver for your graphic card. Be sure that you have chosen at least a desktop resolution of 65535 (16 bit colour depth). If your card is a ATI Rage “somewhat” there still might be some problems with the graphical interface (GTK+)and MS Windows.
Using MS Windows, just click on the correct menu entry (`GNU Backgammon for windows’). If it still doesn’t work, check whether `c:\[path-to-your-gnubg]\gnubg.exe’ exists or not.
GNU/Linux users should check if GTK+ is installed.
Did you save your settings (menu: Settings→Save settings) before you quit?
For GNU/Linux users: open a terminal and start gnubg with the option -t
.
MS Windows users: Look for a file called gnubg-no-gui.exe
in GNU Backgammons install directory or open the MS Windows menu Run… and type c:\[path-to-your-gnubg]\gnubg-no-gui.exe
. There is also a menu entry GNU Backgammon Command Line Interface.
When you start a new match, you will be asked to play to a certain amount of points (for example, 7 points). The player who firstly reaches this amount wins the match.
Starting a new session means playing to an infinite amount. Be aware that the rules do slightly differ then. You may break this session at any point and save it.
If you choose to play a new game, GNU Backgammon will open the last saved match or session you quit. When there is no saved match or session you will start a new infinite session.
A beaver is only allowed in a money game session. To beaver means to redouble, retaining control of the cube, immediately after your opponent doubles. For more information see the glossary at Backgammon Galore.
The easiest way to move chequers is to “drag and drop.” Put your mouse pointer over a chequer you want to move, press the left mouse button and drag the chequer to the desired point, holding down the button while dragging.
If you prefer to use mouse clicks, the left mouse button is for the left die shown on your board. Right click your mouse for the right die.
If you always want the higher number displayed on the left, go to the menu Settings→Appearance→General and select Show higher die on left.
The official backgammon tournament rules allow to put all 15 chequers on a point. If you want to play with a maximum of 5 chequers, go to the menu Settings and activate the Egyptian Rule. Note: The Egyptian Rule is not in the standard rules of backgammon. The position evaluator in GNU Backgammon doesn’t have a clue about how to evaluate positions according to the Egyptian rule either. It strongly recommended that this rule is not used if you’re trying to learn backgammon. Note-2: The Egyptian Rule option is no longer available in current versions of GNU Backgammon.
Are you sure? If the answer is yes you should think about going to Monte Carlo this summer and win the Backgammon World Championship.
If this plan fails, check whether the weights file is loaded at startup. See also GNU Backgammon complains about missing files.
Go to the menu Settings→Players and change the values for Player 0. There is also a set of predefined settings you may choose from.
In its default configuration, the dice generator does not cheat. In the menu Settings you may choose between different random dice generators. If you still think GNU Backgammon is cheating, program your own dice generator or roll manually. It doesn’t cheat!
Go to the menu Settings→Players … and click on Player 1. At the top there is a field to change the human player’s name.
Go to the menu `Settings→Appearance’. Here you may change the colour of chequers, the points and the board itself.
Go to the menu `Settings→Appearance’ and click on the `General’ tab at the right. Disable the option `Beep on illegal input’.
A ply describes how far GNU Backgammon evaluates the position. “0-ply” means that GNU Backgammon estimates the worth of the position as it is. A “1-ply” evaluation looks one step deeper. GNU Backgammon also evaluates positions that may occur on further rolls. “2-ply” is another roll further and so on.
The more plies you choose, the more you strengthen GNU Backgammon. Keep in mind that this will also decrease the playing speed.
Note also that “0-ply” in GNU Backgammon is equivalent to the “1-ply” evaluation of Snowie.
It’s possible that Snowie’s is a playing ply while GnuBg’s is a position evaluation ply. When playing at 1-ply Snowie will make each possible move for the player’s roll (that’s 1 ply) and analyse the resulting positions. Playing at 2-ply it will take each of those positions and make all the opponent moves for all possible rolls (the 2nd ply) and then analyse the resulting positions. In GnuBg the initial set of possible moves is taken for granted, ie. not counted as a ply, because GnuBg’s plies are position evaluation plies. Thus, for each of those possible moves a 0-ply analysis is done. GnuBg’s discounting of the first set of moves perhaps makes the counting seem funny.
Looking at it a different way, if you give GnuBg a position and analyse it at 1-ply, it will make all the moves for all possible rolls (the 1st ply) and then analyse the resulting positions. With Snowie it will assume that the position arose from a move (that’s a pretend 1st ply) then make all the moves for all possible rolls (the 2nd ply) and analyse them. This time it’s Snowie that seems to be counting strangely.
Noise is a facility for disturbing GNU Backgammon’s 0-ply evaluation. Raising the noise level decreases its playing strength.
Reduced searches only work with 2-ply evaluations and deeper. It cuts the search for candidate moves to increase evaluation speed.
You will find two small windows titled `Position’ and `Match ID’ at the bottom of the GNU Backgammon window. Here you may use the `position_id’- or `match_id’-format for setting up or copying positions.
An explanation of both formats will follow in GNU Backgammon’s documentation (hopefully soon).
Open a new game, match or session. If gnubg already rolls the dice, it’s ok. Press `edit’, and either type the position_id and press Enter on your keyboard, or use the mouse to set up the chequers.
A mouse click at the border of the board empties the point. A left or right click sets up a certain amount of chequers depending on where exactly on the pip you click. Set up the cube with a right mouse click on it.
You can also drag and drop chequers when holding down the Ctrl key.
Finally, go to the menu and select `Game, Set turn’ to choose the player on roll. The dice will then disappear.
Currently only `*.pos’ by Jellyfish are supported.
You may import .mat
by Jellyfish or .ssg
by Gamesgrid. There is also support for .tmg
files from TrueMoneyGames. Also supported is the oldmove format used on Fibs.
Go to the menu `Game’ and click on `Swap players’.
After analysing a game or a match GNU Backgammon is able to do some comments on chequer play or cube decisions. Open the menu `Window, Game record’ and you will see a list of the moves. If the actual move or cube decision differs from the best, GNU Backgammon will annotate it.
The default settings are:
+0.040 (very good): Not in use yet +0.020 (good): Not in use yet -0.040 (doubtful): ?! -0.080 (bad): ? -0.160 (very bad): ??
You may change these annotations in the menu `Window, Annotation’ choosing another comment for moves and/or double. [Note. The annotation system is borrowed from chess, where !! means excellent, !? means interesting, ! means good, ?! means doubtful, ? means bad, and ?? means blunder.]
GNU Backgammon determines a player’s strength according to her average error (per move):
Average Error | Skill Level |
---|---|
0.000 .. 0.005 | Extra-terrestrial |
0.005 .. 0.010 | World class |
0.010 .. 0.015 | Expert |
0.015 .. 0.020 | Advanced |
0.020 .. 0.025 | Intermediate |
0.025 .. 0.030 | Beginner |
0.030 .. | Novice |
After analysing a game, match or session you can see the summary in the menu `Analyse, … statistics’. Note that you can’t change the ranges of these values.
The pip count is a measurement showing the total number of pips required for a player to bear off all chequers from the current position. It can be regarded as a rough estimate of the “raceness” of the position – a player with a lower pip count may in many situations want to try to race, whilst the opponent (with the higher pip count) may want to try blocking/holding. See also the explanation on BackGammon Galore.
(For the non-native-english speaking community it might be helpful to know that when you roll a six and a five, the total pips of that roll is eleven.)
When bearing off chequers, you may notice a display showing the current epc value (next to the display of Pips). The epc display can be turned on or off under menu Settings —> Options —> Display (at least in the current version, as of June 2005).
epc stands for Effective Pip Count, and is an alternative measurement of the “goodness” of the position. The usual pip count can be a misleading “goodness” estimate when both players are bearing off. What is more important (for making cubing decisions) is the expected number of rolls each player needs to bear off her chequers.
The effective pipcount is defined as this expected number of remaining rolls, multiplied with the average number of pips in a roll, which is 8.167. (The average number of pips in a roll would be 7 if rolling a double wouldn’t yield a double pip count – i.e a double-6 yields 24 pips, not 12.)
Thus, epc takes into account not only the current pip count, but also the expected pip wastage:
effective pip count (epc) = pip count + expected pip wastage
An example:
It’s clear (hopefully) that the expected pip wastage (and hence the epc) increases with more chequers on lower points (e.g. you get pip wastage when rolling a 6 to bear off a chequer from the 2- or 1-point).
It is further explained on BackGammon Galore, especially in a post by Douglas Zare.
How do one calculate the epc then, or the expected number of remaining rolls? Gnu BG uses a prepared database (is this correct?). A player would probably use some quite complicated heuristics (please see the aforementioned post by Douglas Zare, and do get back here and explain it!)
Go find a newer build if you still have the database.
“GWC” is an abbreviation for game winning chances.
“MWC” is an abbreviation for match winning chances.
In the menu `Analyse, Game/Match/Session statistics’ you will see a window with some statistics. Near the bottom, you’ll see four lines beginning with `Missed … and Wrong …’. “dp” means “doubling point” and describes a situation in the game, where you probably should have doubled your opponent.
Could someone expain this one please? [In the context of “Missed doubles (below CP)” and “Missed doubles (above CP)”].
CP = Cash-Point
From Max Friis page http://xfriis.dk/maxfriis/bg/double.html CP is: “your opponent’s take-point now seen from your side of the board (your cash-point which equals 100% minus your opponent’s take-point”
If you are the leader in the match, the relevant take- and double-points will often look something like this (where TP*=CP):
The doubling windows (intervals) are:
[DP;CP] = Your doubling window! This window does not contain any information about redoubles but only the distance to the point where you do not want to play for the double amount of points.
[TP;DP] = 100% minus your opponent’s doubling window now.
[reTP;reDP] = 100% minus your opponent’s doubling window after he has taken.
“TG” is an abbreviation for “too good” (to double). It points to a situation in the game, where you probably should have kept the cube (mostly because of decent, sometimes very good, gammon chances) rather than doubling out your opponent.
This should be an internal link, not an external one. But I can’t figure out how to link internally to a subsection. Anyone?