--- The Detailed Node Listing ---
Introduction
Rules of the game
Starting GNU Backgammon
Playing a game
Getting hints and Tutor Mode
Setting up a position
Working with matches
Rollouts
Customizing GNU Backgammon
Technical Notes
Frequently Asked Questions
GNU Free Documentation License
This manual describes how to use GNU Backgammon to play and analyze backgammon games and matches. It corresponds to version 0.16-devel (updated in February, 2007).
GNU Backgammon (gnubg) plays and analyzes backgammon games and matches. It is able to play and analyze both money games and tournament matches, evaluate and roll out positions, and more. Driven by a command-line interface, it displays an ASCII rendering of a board on text-only terminals, but also allows the user to play games and manipulate positions with a graphical GTK+ interface. GNU Backgammon is extensible on platforms which support Python.
(No game) new game
gnubg rolls 3, anthon rolls 1.
GNU Backgammon Positions ID: 4HPwATDgc/ABMA
Match ID : MIEFAAAAAAAA
+12-11-10--9--8--7-------6--5--4--3--2--1-+ O: gnubg
| X O | | O X | 0 points
| X O | | O X | Rolled 31
| X O | | O |
| X | | O |
| X | | O |
^| |BAR| | (Cube: 1)
| O | | X |
| O | | X |
| O X | | X |
| O X | | X O |
| O X | | X O | 0 points
+13-14-15-16-17-18------19-20-21-22-23-24-+ X: anthon
gnubg moves 8/5 6/5.
GNU Backgammon is a world class opponent and rates at around 2000 on FIBS, the First Internet Backgammon Server – at its best, it is in the top 5 of over 6000 rated players there). GNU Backgammon can be played on numerous other on-line backgammon servers.
The following features can be found in the current release of GNU Backgammon.
Note
Some language translations are not completed yet.
GNU Backgammon is developed under the GNU General Public License (GPL) and it's part of the GNU project. If you want to know more about GPL and the Free Software Foundation you can visit the FSF website.
This section describes how to play a game, a match or a session of money games against GNU Backgammon, or a human opponent. Authored by Tom Keith. Skilled backgammon players may skip ahead to next section.
Backgammon is a game for two players, played on a board consisting of twenty-four narrow triangles called points. The triangles alternate in color and are grouped into four quadrants of six triangles each. The quadrants are referred to as a player's home board and outer board, and the opponent's home board and outer board. The home and the outer boards are separated from each other by a ridge down the center of the board called the bar.
A board with the checkers in their initial position.
Outer Board O's Home Board
+13-14-15-16-17-18------19-20-21-22-23-24-+
| X O | | O X |
| X O | | O X |
| X O | | O |
| X | | O |
| X | | O |
| |BAR| |
| O | | X |
| O | | X |
| O X | | X |
| O X | | X O |
| O X | | X O |
+12-11-10--9--8--7-------6--5--4--3--2--1-+
Outer Board X's Home Board
An alternate arrangement is the reverse of the one shown here, with the home board on the left and the outer board on the right.
The points are numbered for either player starting in that player's home board. The outermost point is the twenty-four point, which is also the opponent's one point. Each player has fifteen checkers of his own color. The initial arrangement of checkers is: two on each player's twenty-four point, five on each player's thirteen point, three on each player's eight point, and five on each player's six point.
Both players have their own pair of dice and a dice cup used for shaking. A double cube, with the numerals 2, 4, 8, 16, 32, and 64 on its faces, is used to keep track of the current stake of the game.
The object of the game is for a player to move all of his checkers into his own home board and then bear them off. The first player to bear off all of his checkers wins the game.
Direction of movement of White's checkers. Red's checkers move in the opposite direction.
+13-14-15-16-17-18------19-20-21-22-23-24-+
| X | | X |
/---X----------------------------------- X |
| | X | | |
| | X | | |
| | X | | |
| | |BAR| |
| | | | X |
| | | | X |
| | X | | X |
\---------------X----------X-----------> |
| X | | X |
+12-11-10--9--8--7-------6--5--4--3--2--1-+
To start the game, each player throws a single die. This determines both the player to go first and the numbers to be played. If equal numbers come up, then both players roll again until they roll different numbers. The player throwing the higher number now moves his checkers according to the numbers showing on both dice. After the first roll, the players throw two dice and alternate turns.
The roll of the dice indicates how many points, or pips, the player is to move his checkers. The checkers are always moved forward, to a lower-numbered point. The following rules apply:
White opens the game with 53.
+13-14-15-16-17-18------19-20-21-22-23-24-+
| X ^ O | | O . X |
| X +---------5---------^---3----X |
| X O | | O |
| X | | O |
| X | | O |
| O | | X----3---+ |
| O | | X | |
| O X---------------5---+ |
| O X | | X | O |
| O X | | X | O |
+12-11-10--9--8--7-------6--5--4--3--2--1-+
A point occupied by a single checker of either color is called a blot. If an opposing checker lands on a blot, the blot is hit and placed on the bar.
Any time a player has one or more checkers on the bar, his first obligation is to enter those checker(s) into the opposing home board. A checker is entered by moving it to an open point corresponding to one of the numbers on the rolled dice.
For example, if a player rolls 4 and 6, he may enter a checker onto either the opponent's four point or six point, so long as the prospective point is not occupied by two or more of the opponent's checkers.
White rolls 64 with a checker on the bar.
+13-14-15-16-17-18------19-20-21-22-23-24-+
| X O | | O O ^ X |
| X O | | O O | |
| X | | O | |
| X | | O | |
| X | X-----4---+ |
| |BAR| |
| O | | X |
| O | | X |
| O X | | X |
| O X | | X O |
| O X | | X O |
+12-11-10--9--8--7-------6--5--4--3--2--1-+
If White rolls [64] with a checker on the bar, he must enter the checker onto Red's four point since Red's six point is not open. If neither of the points is open, the player loses his turn. If a player is able to enter some but not all of his checkers, he must enter as many as he can and then forfeit the remainder of his turn.
After the last of a player's checkers has been entered, any unused numbers on the dice must be played, by moving either the checker that was entered or a different checker.
Once a player has moved all of his fifteen checkers into his home board, he may commence bearing off. A player bears off a checker by rolling a number that corresponds to the point on which the checker resides, and then removing that checker from the board. Thus, rolling a 6 permits the player to remove a checker from the six point.
If there is no checker on the point indicated by the roll, the player must make a legal move using a checker on a higher-numbered point. If there are no checkers on higher-numbered points, the player is permitted (and required) to remove a checker from the highest point on which one of his checkers resides. A player is under no obligation to bear off if he can make an otherwise legal move.
White rolls 64 and bears off two checkers.
| | | +----6--------->
| | | | +--4-------->
| | | | | |
| | | | X X X X |
| | | X X X X X |
+12-11-10--9--8--7-------6--5--4--3--2--1-+
A player must have all of his active checkers in his home board in order to bear off. If a checker is hit during the bear-off process, the player must bring that checker back to his home board before continuing to bear off. The first player to bear off all fifteen checkers wins the game.
Backgammon is played for an agreed stake per point. Each game starts at one point. During the course of the game, a player who feels he has a sufficient advantage may propose doubling the stakes. He may do this only at the start of his own turn and before he has rolled the dice.
A player who is offered a double may refuse, in which case he concedes the game and pays one point. Otherwise, he must accept the double and play on for the new higher stakes. A player who accepts a double becomes the owner of the cube and only he may make the next double.
Subsequent doubles in the same game are called redoubles. If a player refuses a redouble, he must pay the number of points that were at stake prior to the redouble. Otherwise, he becomes the new owner of the cube and the game continues at twice the previous stakes. There is no limit to the number of redoubles in a game.
At the end of the game, if the losing player has borne off at least one checker, he loses only the value showing on the double cube (one point, if there have been no doubles). However, if the loser has not borne off any of his checkers, he is gammoned and loses twice the value of the double cube. Or, worse, if the loser has not borne off any of his checkers and still has a checker on the bar or in the winner's home board, he is backgammoned and loses three times the value of the double cube.
The following optional rules are in widespread use.
When backgammon tournaments are held to determine an overall winner, the usual style of competition is match play. Competitors are paired off, and each pair plays a series of games to decide which player progresses to the next round of the tournament. This series of games is called a match.
Matches are played to a specified number of points. The first player to accumulate the required points wins the match. Points are awarded in the usual manner: one for a single game, two for a gammon, and three for a backgammon. The double cube is used, so the winner receives the value of the game multiplied by the final value of the double cube.
Matches are normally played using the Crawford rule. The Crawford rule states that if one player reaches a score one point short of the match, neither player may offer a double in the immediately following game. This one game with no doubling is called the Crawford game. If the Crawford game is won by the trailing player then the double cube becomes available in all subsequent games (and it's most often in the best interests of the trailing player to double immediately in these games).
| Match to 5 | White | Black | Doubling
|
| White wins 2 | 2 | 0 | Allowed
|
| Black wins 1 | 2 | 1 | Allowed
|
| White wins 2 | 4 | 1 | Allowed
|
| Black wins 1 | 4 | 2 | Crawford Game
|
| Black wins 2 | 4 | 4 | Allowed
|
| White wins 2 | 6 | 4 | Allowed
|
In this example, White and Black are playing a 5-point match. After three games White has 4 points, which is just one point short of what he needs. That triggers the Crawford rule which says there can be no doubling in next game, Game 4.
There is no bonus for winning more than the required number of points in match play. The sole goal is to win the match, and the size of the victory doesn't matter.
Automatic doubles, beavers, and the Jacoby rule are not used in match play.
If GNU Backgammon is properly installed on your system, you can start it by simply typing gnubg at the command prompt. If you want to start the GNU Backgammon command line interface, you can type gnubg –tty or gnubg -t. With this option, GNU Backgammon starts without the graphic user interface. There is also other options which can be added at the start-up.
The builds of GNU Backgammon which may be downloaded from the main GNU Backgammon page comes with an installation system. The installation system will create a launch menu item in your start menu. Usually the menu item can be found by choosing Start->Programs->GNU Backgammon->GNU Backgammon for Windows..
GNU Backgammon also has a command line interface. This is supplied as a separate executable file on Microsoft Windows. You can start this version of GNU Backgammon by choosing Start->Programs->GNU Backgammon->GNU Backgammon Command Line Interface.
Once you have installed both an X11R6 server and GNU Backgammon for MacOS X, you can run GNU Backgammon for MacOS X by:
cd Applications/gnubg to get into
GNU Backgammon for
MacOS X's folder, and then type ./gnubg to
run it;
cd /Applications/gnubg to get
into GNU Backgammon
for MacOS X's folder, and type ./gnubg to run
it;
The following options control the startup of GNU Backgammon. Most options are available in all versions of GNU Backgammon, but notably, the -w and -t options don't work under MS windows where separate command line and GUI applications exist instead.
GNU Backgammon startup options
Usage:
gnubg [OPTION...] [file.sgf]
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
GTK+ Options
--class=CLASS Program class as used by the window manager
--name=NAME Program name as used by the window manager
--screen=SCREEN X screen to use
--sync Make X calls synchronous
--gtk-module=MODULES Load additional GTK+ modules
--g-fatal-warnings Make all warnings fatal
Application Options:
-b, --no-bearoff Do not use bearoff database
-c, --commands=FILE Evaluate commands in FILE and exit
-d, --datadir=DIR Read database and weight files from DIR
-l, --lang=LANG Set language to LANG
-n, --new-weights=N Create new neural net (of size N)
-p, --python=FILE Evaluate Python code in FILE and exit
-q, --quiet Disable sound effects
-r, --no-rc Do not read .gnubgrc and .gnubgautorc commands
-S, --no-splash Don't show gtk splash screen
-t, --tty Start on tty instead of using window system
-v, --version Show version information and exit
-w, --window-system-only Ignore tty input when using window system
--display=DISPLAY X display to use
To start a new game, match or session choose File->New, or use the New button in the toolbar. This will open a dialog box, where you can select the main options for the new backgammon game you are about to begin.
The dialog for starting a new match.
To start a new match in the CL version type 'new match' or
'new session'.
The shortcut buttons are the quickest way to start the game or match. If you click on the button with the $ sign, you will start a new money game session immediately. If you click on a numbered button, you will start a new match of the specified length.
The dialog allows a fine tuning of the startup options:
The simplest way to roll the dice is to click in the right board area between the board points. You can also roll the dice from the menu Game->Roll or with the keyboard shortcut <Ctrl><R>.
Click in the red rectangle to roll the dice.
To roll the dice the CL version type 'roll'.
When you have moved your checkers to make the desired move, you complete your turn by clicking on the dice.
One way to move the checkers is to click on a checker you want to move and then drag it, while holding the mouse button down, to the desired designation point. If you have the option Show target help when dragging checkers enabled, you will see the a green guiding at any legal target point for the checker you are dragging. You can find this option by choosing Settings->Options...->Display
Move the mouse cursor over the checker you want to move. If you now click the left mouse button, the checker will move the pips of the left die. If you have already moved one checker, clicking on a new checker will move it according to the pips of the remaining die. If you click with the right mouse button on a checker, the checker will move according to the right die.
Using this method for moving the checkers can be really effective. Some users prefer showing the higher die to the left. You can make GNU Backgammon show the highest die to the left if you choose Settings -> Options... -> Dice and check the check box labeled Show higher die on left.
Before you complete your move by clicking the dice, it's possible to undo your moves and return to the position before any checkers have been moved. You can either click the Undo button in the toolbar, or you can choose Edit -> Undo from the menu or the keyboard shortcut <Ctrl><Z>.
There are some shortcuts for moving the checkers. You can make a new point by right clicking on the empty point that you want to make. As an example, if you roll 31 as the opening roll, and you want to play 8/5 6/5, you simply place the mouse cursor on the 5-point and right click. Making points this way also works if you hit a checker, and with doubles.
Another shortcut can be used in the bearoff phase of the game. By clicking in the bearoff tray, two checkers will be born off if such a move is legal.
GNU Backgammon can auto play forced moves for you. This feature can be enabled by choosing Settings -> Options... -> Game , and then check the box Play forced moves automatically.
You offer a double to your opponent by clicking on the cube. This will offer the cube immediately. You can also click Game->Double from the menu or the keyboard shortcut <Ctrl><D>.
You accept a double made by your opponent by clicking on the offered double cube at the board. If you want to decline the double, you can right click on the cube.
There are also three buttons in the toolbar for handling cube offers. These buttons are marked Accept, Decline and Beaver. The beaver button is only activated in money game sessions where beavers are allowed.
The toolbar double buttons.
[[cubebuttons.png]]
There are also menu options from the drop down menu for all the cube actions. Click Game->Take from the menu, to accept an offered double(<Ctrl><T>). Click Game->Drop, from the menu, to to decline an offered double(<Ctrl><P>). Click Game->Beaver, from the menu, to beaver an offered double.
It's also possible to resign during a game. To resign during play press the Resign button in the toolbar. This is the button with the image of a white flag. When this button is pressed, a dialog box will appear where you can select if you want to resign a single game, gammon or backgammon. The resignation dialog may also be reached from the menu system. Click Game->Resign to offer your resignation.
When a resignation is offered a white square will appear on the board area. The square has a number 1, 2 or 3. A square with a 1, means that a single game resignation is offered, a 2 that a gammon resignation is offered, and a 3, means that a backgammon is offered. If you're using a 3D board, the resignation will be a white flag instead of a square.
To accept the resignation click on the numbered square. If you want to decline the resignation, you right click instead. You can also use the same toolbar buttons as for accepting or declining a double. There is also a menu option for accepting and declining resignations. Click Game->Agree to resignation from the menu, to accept an offered resignation. Click Game->Decline resignation from the menu, to decline an offered resignation.
If you want to get a hint of the best move or the best cube action press the Hint button in the tool bar or the menu option Analyze->Hint. This will open a hint window.
The hint window
[[hintwindow.png]]
This Hint window shows a list of all possible moves for the position and dice roll. The different moves are sorted by how GNU Backgammon ranks each move; there is one move on each line in the list. The rest of the numbers may look a bit complicated and cryptic but, once you learn what each number means, it isn't really that bad.
If you're thinking about a cube decision before rolling you can press the same Hint button in the toolbar, as you pressed when you wanted checker play hint. The hint window will again appear, but this time it will look a bit different and it will show a hint of the correct cube decision.
The cube hint window
[[hintcubewindow.png]]
The first lines is the window dialog shows the evaluation depth, and the cubeless equity with the evaluated probabilities. This equity is compensated for the match score. The cubeless equity for a money game, where the the calculation of equity is not compensated for match score, is also reported.
Next follow three lines with cubeful equities. In figure above, the cubeful equity for the player on roll for not doubling at this turn, is +0.123. The equity for a double and the opponent passing is (of course) +1.000, since the player then will win one point. (The number is normalized to cube value of one, so even if it is a redouble to 4 or 8 or higher, the cubeful equity for double/pass is still +1.000 for the doubler.) The third number in figure above is the cubeful equity for the player doubling and the opponent accepting the double. The different option will be listed in order with the best option highest. The number right to the listed equities is the differences from the cube decision considered best.
The last line states the best considered cube action. In the figure above, GNU Backgammon considers the best cube action to be No double, take. When percentage number right to the proper cube action, is a number which indicates the bluff potential. It is the necessary percentage chance you think you can bluff your opponent into passing the cube to make the double theoretically correct. This number is only available when the position is considered No double, take or Too good to double, pass.
As you may see in both figures above, there is a set of buttons below the move list or cube analysis. Here follows a short description of what each of the buttons does:
One of the greatest tools for learning, is Tutor Mode. Tutor mode can be activated by clicking Settings->Options... and then click on the Tutor flag. Activate Tutor Mode by checking the Tutor mode check box.
The tutor window
[[tutor.png]]
In Tutor Mode, GNU Backgammon will analyze your moves and/or cube decisions and compare them with its choices. You set the threshold for its alerts, for example, if you set it for bad then it will only warn you when you make a bad mistake. It will then allow you to re-examine your choice, go right ahead with it, or provide a 'hint' - essentially, showing you its analysis.
The tutor can give warnings on both cube decisions and checker play. If you want the tutor to only warn on cube decisions, you can uncheck the box for the Checker play. Likewise, if you want it to only warn on checker play decisions, you can uncheck the box for the Cube decisions.
The tutor warning window
[[tutorwarning.png]]
In the above figure, you can see a warning dialog from the tutor mode. If you press the button labeled Play anyway, the move you made will be kept and the game will continue. If you press the Rethink button, the dialog will close and the checkers that you moved will be returned to their original positions. You can then rethink the position and try an alternative move. Keep doing this until the Tutor accepts your move as being good enough. Alternatively you can press the Hint button to show the hint window with its list of possible moves and their evaluations. Finally, if you press the End Tutor Mode button, the dialog will close and turn Tutor Mode off.
A similar warning window will also appear for poor cube handling.
The time control feature is not fully implemented with the user interface yet. Hopefully this will be improved in the future.
Think about the Friday night chouette where there was this tough choice between two move candidates. Which move was the best? Or what about that match score cube decision from the weekend tournament. Wouldn't it be nice to be able to set up the position in GNU Backgammon and ask for it's opinion? This is possible in GNU Backgammon, and it's one of the features that really can give you the answer to a lot of questions, and in that way give you a better understanding of the game.
To set up a position, you have to be in Edit mode. To enter Edit mode you simply click the Edit button in the tool bar. There is currently no keyboard shortcut or menu item for entering edit mode. The Edit button is a toggle button and you will stay in edit mode until you release the button by clicking it again.
If your Edit button in the toolbar is disabled it is because there is no game or match in progress. With the current state of GNU Backgammon there must be a game or match in progress to be able to enter edit mode. (This may change in the future.) If there is no game in progress and you want to set up a position, you can simply start a new game or match by clicking New in the toolbar.
When you are in edit mode you will see the the text (Editing) in the match information box below the board.
Setting up a position is basically done by editing the current position. The editing it self is controlled by clicking different areas of the board and may not be obvious at first hand.
In edit mode you can easily clear the board by clicking in one of the bearoff trays. It's often easier to start setting up a position with a empty board, so this feature is really handy. When you click on one of the bearoff tray, all checkers will be moved to the bearoff.
Click in the one of the areas marked with a red ellipse to clear the board.
[[clearboard.png]]
You can also just as easy generate the initial position by clicking the opposite trays when in edit mode. Clicking in one of these trays puts all checkers back to the initial position.
Click in the one of the areas marked with a red ellipse to get to the initial position.
[[initialboard.png]]
Note that the bearoff trays change side when the board is displayed with clockwise movement.
The default method of editing a position is called Quick edit. It's based on clicking on the point where you want to place checkers. The number of checkers placed on the point is depending on where you click, for example if you want to place 3 checkers on a point, clicking on the location where the third checker would go places 3 checkers. This method should be familiar to Snowie users.
Clicking with the left button places checkers for player1, clicking with the right button places checkers for player2. If you want to place more than 5 checkers, click multiple times on the tip of the point. To clear a point, click on the border of the board below or above the point - depending on if the point is in the lower or top half of the board. The bar works just like normal points - the more you click to the middle of the bar, the more checkers will be placed there.
There is also a different way of editing the checker positions. You can drag and drop checkers around the board while you're holding down the Ctrl key on your keyboard. Press the Ctrl key and hold it down. Then left-click the checker you want to drag to another point and drag it with the mouse, (while holding down the Ctrl key and the left mouse button), to the destination point. You can drag checkers to open points or to points where you have checkers of the same color. You can also 'hit' opponent blots with the drag and drop edit method.
This method of editing comes handy when there is just a small adjustment to be done in the position.
The player on turn can be set by clicking the small checker icons below the board. See figure below.
Clicking the White checker image will set White on turn, clicking the Black image will set Black in turn.
[[initialboard.png]]
Note that setting the turn sets the turn before the dice has been rolled. If there is a dice present at the board, setting the turn will remove the dice rolled. In this way you can set up a position to be a cube decision evaluation instead of a move decision evaluation.
The turn can also be set by choosing Game->Set turn. Both these methods for setting the player on turn can also be used without being in edit mode.
You can set the dice for a player by clicking in the middle part of the board where you usually click when you roll the dice while playing. Click in the middle of the right playing area to set the dice for player 0, the bottom player. Click the left dice rolling area to set the dice for player 1, the top player. Once you click one of these areas the dice selection widget will appear and you can select a dice roll by clicking on a dice pair.
Click inside the red rectangle to set the dice for Black. Click inside the green rectangle to set the dice for White.
[[setdice.png]]
Setting the dice in edit mode sets both dice and the player on turn. Setting the dice for player 0, will make player 0 on turn with that specific dice roll to play.
This method for setting the dice roll only works in edit mode. If you're not in edit mode you can set the dice by choosing Game->Set dice... from the menu, however this will set the dice for the player on turn.
Setting the cube is quite simple while you're in edit mode. Simply click the cube in the board and the cube selection widget appears.
Selecting a cube in the first row, where the number is displayed up-side-down, the top player will be the cube owner. The value of the cube will be the value of the cube you click in the widget. Note that the unturned cube is the leftmost cube labeled 64, just as it usually is on real double cube.
Very often i backgammon the match score does matter on how the position is evaluated. GNU Backgammon's evaluation algorithms does take the score into account. You can therefore adjust the the match length and the score to each player while you're in edit mode.
In the figure you see that the score fields are editable while you're in edit mode. Insert the desired match score for each player in these fields. Player 0, the top player, has the left score field and player 1, the bottom player, has the right score. You can also set the match score in the in the match field to the right. There is also a box to tick whenever the position is from a Crawford game.
If you want the computer to do a money game evaluation of the position, you should set the match score to 0 (zero).
Before you can start analyzing the position you have to exit edit mode. This is done by releasing the Edit button in the toolbar by clicking it. Note that editing a position destroys your game record with no warning, so it might be an idea to save your match if you want to keep it.
After you have successfully set up the position you desire, you can now analyze the position. You can click Hint in the toolbar to get the best move of cube decision in the same way as described in the chapter called Playing a game. Hint, rollouts and evaluations done from the hint window will not be saved if you try to save the position. If you want to analyze the position and then be able to save the position and the analysis results you should rather do a move and then click back to the move and then choose Analyze->Analyze move for the menu. You can then work in the analysis pane on the right side instead of in the hint window.
You can enter checkers on a point by clicking on the point. Notice the amount of checkers you add on a point, depends on where on that point you click. Left mouse button, black checkers and right mouse button, red checkers. (assuming you didn't change the colors). You will get used to this editing. and it makes it much faster to set up a position.
See also Albert Silver's post on GammOnLine
GNU Backgammon uses the Smart Game Format (SGF) to store games, matches, sessions and positions. SGF is used in as a standard format for several other turn based games. The SGF files can store all the rolls and moves and cube decisions as well as commentary and analysis.
A game that uses SGF extensively is Go. The format is described at this site.
Since version 0.16 the GUI recognizes all importable files automatically (with the exception of the FIBS format). To open or import a file choose File->Open. A file dialog box will appear where you can select the file and the dialog will inform you of the recognized format, if the file is importable. You can also use the keyboard shortcut Ctrl-O, or the tool bar button labeled Open, to open the file dialog box directly.
It is still possible to import an unrecognized file by using the
underlying command line interface. Enable the command pane by choosing View->Command. In the command pane type in import oldmoves
<filepath> to import, e.g., an oldmoves fibs
formatted file.
The following table contains the supported formats and the corresponding commands for manual import of a file.
| FIBS oldmoves format | import oldmoves <filepath>
|
| Gamesgrid Save Game | import sgg <filepath>
|
| GammonEmpire Game | import empire <filepath>
|
| Hans Berliner's BKG Format | import bkg <filepath>
|
| Jellyfish Game | import gam <filepath>
|
| Jellyfish Match | import mat <filepath>
|
| Jellyfish Position | import pos <filepath>
|
| PartyGammon Game | import party <filepath>
|
| Snowie Text | import snowietxt <filepath>
|
| True Moneygames | import tmg <filepath>
|
If you have played or imported a match into GNU Backgammon, and wish to save your efforts, you can choose File->Save. A file dialog box will appear and you can type in a file name or keep the suggested default file name. (The suggested default file name contains the date, the players name and the length of the match). This will save the whole match of the current match or session. If there is any analysis or commentary available this will also be saved to the file. You can also use the tool bar button labeled Save to open the file dialog box directly. There is also a keyboard shortcut, Ctrl-S, for saving a match or session.
Warning
Please note that saving a position will not save any analysis.
The export dialog is accessed by choosing File->Export This dialog is similar to the save dialog. Again you may
choose a different filename and whether to export an entire match, a
game or a position. Then you must choose an export format as well.
Notice some file formats only supports export of matches and some only
supports position. Only when a legal combination is chosen will ending
the dialog be possible. The following table contains the supported
file formats and the corresponding commands for export. Again notice
that with some formats only some of M(atch), G(ame), P(osition) is
allowed. For example to export a Jellyfish position you would issue
the command export position pos
<filepath>
| Encapsulated Postscript | export <P> eps <filepath>
|
| HTML | export <MGP> html <filepath>
|
| Jellyfish Game | export <G> gam <filepath>
|
| Jellyfish Match | export <M> mat <filepath>
|
| Jellyfish Position | export <P> pos <filepath>
|
| LaTeX | export <MG> latex <filepath>
|
export <MG> pdf <filepath>
| |
| Plain Text | export <MGP> text <filepath>
|
| Portable Network Graphics | export <P> pdf <filepath>
|
| PostScript | export <MG> postscript <filepath>
|
| Snowie Text | export <P> snowietxt <filepath>
|
GNU Backgammon can export the current position, game, match or session in HTML if you wish to publish it on the web.
GNU Backgammon exports in validating XHTML 1.0 with the use of CSS style sheets. You may add your own style sheet to the exported HTML files if you wish to override the default layout, e.g., change colors or fonts.
The board is made up from hundreds of pictures. Currently, you can choose between three different sets of pictures:
The images generated by GNU Backgammon will use your current board design in GNU Backgammon, and honors your settings on clockwise or anti-clockwise movement and board numbering (on, off, dynamic).
If you export a match or session to HTML, GNU Backgammon will write the individual games to separate files. For example, if you export to file foo.html the first game is exported to foo.html, the second game to foo_002.html, the third game to foo_003.html and so forth.
The output from the HTML export can be customized. For example, it's possible to leave out the analysis or parts of the analysis. Also, you may enter a specific URL to the pictures used to compose the board which is useful for posting positions on web-based discussion groups such as Kit Woolsey's GammOnLine, the Danish Backgammon Federation's Debat Forum, or you may opt to use a default set of images available from the gnubg.org web site.
If you want to have html images locally on your computer, you can have GNU Backgammon generate these. The html images will be generated based on the current appearance settings. You can also control the size of the images in the export settings dialog (To get the export settings dialog you can select in the menu Settings->Export.... Select the size of your html images at the bottom right in this dialog
To start the generation of the html images, select in the menu File->Export->HTML images.... In the file dialog box, you can select a directory where the images will be generated. The images are stored in PNG format.
To generate images for the command line, use the command:
export htmlimages directory
where directory is the directory where you want your images to be created.
GNU Backgammon can export games, match and positions to the document typesetting system LaTeX. For exporting a match or session to LaTeX
The LaTeX export will export all board diagrams and analysis if available. The produced documents can therefore be quite large. Note that the LaTeX file produced needs the eepic package. You can get this package at your nearest CTAN mirror((The produced LaTeX file also needs epic, textcomp and ucs, but these are more common in LaTeX distributions so you probably already have these.)).
You can not export a position to LaTeX. (At least not yet!) However, you can export a position to EPS and include this EPS file in your LaTeX document.
It's possible to enter match transcriptions into GNU Backgammon. It's not very difficult. Presuming you're using the GUI, do this:
Tip: while entering the match, if you wish to see GNU Backgammon's opinion while you are entering the moves, play the move on the board and press the Hint button in the tool bar. In the latest builds, if you have done this, the results will then be placed with the move so that it means it is already analyzed when you run the full match analysis. Mind you, it will preserve the information even if you ran a deeper 3-ply or 4-ply from the Hint window. After playing the move and confirming the dice, go back in the move list and click on the move, and you'll see the analysis appear in the Analysis pane as it should.
It's possible to enter illegal moves with a little trick. This is a step by step guide for the example: If a player rolls 41 and the player makes an illegal move as the dice showed 31.
GNU Backgammon can analyze your matches for skill and luck. If you have an open match (as a result of playing, loading or importing), the analysis is started by choosing Analyze->Analyze match. You should now see a progress bar at the bottom right corner of the main interface window while the computer is busy analyzing. During this time you won't be able to interact with the program other than to quit the analysis. The analysis is complete when the progress bar disappears and you hear a small sound. Now, you would probably like to view the result of the analysis. This can be done in terms of overall statistics by choosing Analyze->Match statistics, or in detail by browsing through the match. More on these subjects in the upcoming sections.
You can also analyze just the current game, by choosing Analyze->Analyze game. If you're only interested in the analysis of the current move, you can select Analyze->Analyze move.
You can configure how GNU Backgammon analysis the match or game for you. This can be configured in the dialog box that appears when choose Settings->Analysis.
Analyze settings dialog
[[analysesettings.png]]
In the top left frame in this dialog box, you can select what to analyze. GNU Backgammon is able to analyze three different properties in a match.
In addition you can have the analysis to analyze just one of the players, or both. There is also possible to set a limit of how many moves to be analyzed at each position. When you're reviewing your match, the number of analyzed moves will be limited to number in this field. However, if you want to analyze further moves in a particular position, it's not a problem to do that later. The move that was actually done in the match will be analyzed even if it is ranked below the number of moves limit.
GNU Backgammon will also mark each move or cube decision with Doubtful, Bad and Very bad. You can adjust the limits in equity difference for which label to assign. This is done in the frame box to the left. Notice, currently the Good and Very good classes are not used.
You can also adjust the classes for what GNU Backgammon considers lucky and unlucky rolls. The luck of a roll is defined as the difference of equity after the best move after rolled dice and the equity after best move averaged over all possible rolls.
The right part of the dialog box is an evaluation setting for how each move or cube decision should be evaluated in the analysis. For an explanation of this settings, see the chapter called "[[Evaluation settings]]".
When a match is analyzed in GNU Backgammon you should open the game record window. Open this by checking Window->Game record on from the main menu. The game record window can also be docked into the right side panel. If you want it docked into the right side panel you should check on Window->Dock panels. The game record window shows a list of all the moves in the game. You can also navigate between the games and moves.
The Game record pane
[[gamerecord.png]]
The figure shows a typical game record list. The moves are shown in two columns. The left column shows the moves for player 0,the to player, and the right column shows the moves of player 1, the bottom player. You can navigate through the game with the arrow buttons at the top of the game record. The red buttons with the double arrows take you to the previous game or the next match. (Arrow pointing to the left takes you to the previous game, and the red arrow pointing to the right takes you to the next game.) The green buttons take you one move ahead in the game or one move back. The green arrow button pointing to the right take you to the previous move. The green arrow button pointing to the right take you to the next move or to the next dice roll. If your in the move list where the dice is not rolled, a click on this green Next button will show you the same position with the dice rolled. The last two buttons take you to the next marked move, or to the previous marked move. The green arrow button with a question mark pointing to the left will take you to the previous marked move. The green arrow button with a question mark pointing to the right will take you to the next marked move. You can also go to other games in the match or session by selecting the game in the game drop down menu. You can also go to a move directly by clicking that move in the game record list.
There is also some keyboard shortcuts for navigating through the match. Page Down till take you to the next move and Page up will take you to the previous move.
After a analysis some of the move in the game list will be marked. You will see some moves marked with ? and some with ?! and some with ??. These marks means the same as the marks in normal chess notation.
| ?? | a very bad move
|
| ? | a bad move
|
| ?! | a doubtful move
|
Note that it is the same marks for cube decisions as for checker moves. Nevertheless, checker moves marks are before the cube decisions marks. If no mark exists for checker move, the cube mark is separated by two spaces.
In newer builds of GNU Backgammon the various moves also get a color code. The cube decisions are shown by the background color. The checkers move decisions are shown by the font color.
| Cube(background) | Move(font)
| |
| Very Bad | Yellow | Red
|
| Bad | Pink | Blue
|
| Doubtful | Grey | Green
|
The luck is also marked in the font
| Luck | Font
|
| Very Lucky | Bold
|
| Very Unlucky | Italics
|
You can also study your moves and cube decisions in more detail in the analysis window, or analysis panel if you have checked Dock panels in the Window menu. You can open this window by checking on Window->Analysis. If you have docked panels the analysis panel will appear under the game record. The analysis window is basically the same as the Hint window described in the "[[Playing a game or match]]" chapter.
The Analyze pane
[[analasyepane.png]]
In the figure you can see the analysis panel. At the top of the analysis panel you will see three pull-down menus. The leftmost pull-down menu is a comment on the cube decision. In the figure it is a position where the player didn't double and the GNU Backgammon's analysis of this is empty. There was nothing wrong with not doubling in this position. The user can also override GNU Backgammon's evaluation and mark the cube decision as 'Doubtful', 'Bad' or 'Very bad'. Note that the cube decision pull-down menu will only be visible when the player has the cube available.
The next pull-down menu shows a simple analysis of the roll. The roll in this position was 32. GNU Backgammon's evaluation of this dice roll is also empty. It shows that this particular roll was -.162 equity worse than the average roll. This means that the roll is a bit unlucky, but does not qualify for being marked as an unlucky roll. The rolls are marked in these categories: 'Very lucky', 'Lucky', 'Unlucky' and 'Very unlucky'.
The rightmost pull-down menu, shows the move which was done. In this situation the move that was done was 3/off 2/off. This move did not qualify for any mark. Moves that GNU Backgammon don't like will be marked as 'Doubtful', 'Bad' or 'Very bad'. The user can also override GNU Backgammon's evaluation and mark the move manually with the pull-down menu.
The rest of the analysis window is a notebook of two pages. The first page is the list of possible moves. The list is sorted in the ranked order with the best considered move at the top. The moves are sorted by equity or EMG. In the list in the figure there is only two possible moves. The move that was actually done in the match, is marked with red color. The only difference of this list of moves and the list of moves in the hint window, is that this list does not show the probabilities for each outcome of the game. If you want to see the probabilities of the different outcomes, you can click on the button labeled Details. This will then show you a list with these numbers.
The other page of the notebook is the cube decision analysis. This analysis show exactly the same as in the Hint window described in the chapter called "[[Playing a game or match]]". Note that the cube decision page will only be available if there is a cube decision. It will not be visible if the cube is not available to the player.
There is also a set of tool buttons in the analysis panel. These buttons does exactly the same as the tool buttons in the Hint window, which is described in the the chapter called "[[Playing a game or match]]".
You can get a summary of the analysis from the game, match, or session analysis. The game analysis is a summary for the current game whereas the match or session statistics is a summary of all the games in the match or session. The match analysis is available in the GUI from Analyze->Match Statistics or at the bottom of exported files.
This section provides a summary of the checker play statistics. The following information is available
This section provides information about how Ms. Fortuna distributed her luck. The following information is available:
Thresholds for marking of rolls:
| Deviation of equity from average | Roll is marked
|
| > 0.6 | very lucky
|
| 0.3 - 0.6 | lucky
|
| -0.3 - 0.3 | unmarked
|
| -0.6 - -0.3 | unlucky
|
| < -0.6 | very unlucky
|
Luck ratings:
| Normalized luck rate per move | Luck rating
|
| > 0.10 | Cheater :-)
|
| 0.06 - 0.10 | Go to Las Vegas immediately
|
| 0.02 - 0.06 | Good dice, man!
|
| -0.02 - 0.02 | none
|
| -0.06 - -0.02 | Better luck next time
|
| -0.06 - -0.10 | Go to bed
|
| < -0.10 | Haaa-haaa
|
This section provides a summary of the cube decision statistics: the number of cube decisions, missed doubles, etc.
The last section is the overall summary.
Threshold for ratings:
| Normalized total error rate per move | Rating
|
| 0.000 - 0.002 | Supernatural
|
| 0.002 - 0.005 | World Class
|
| 0.005 - 0.008 | Expert
|
| 0.008 - 0.012 | Advanced
|
| 0.012 - 0.018 | Intermediate
|
| 0.018 - 0.026 | Casual Player
|
| 0.026 - 0.035 | Beginner
|
| > 0.035 | Awful!
|
Please note: The Normalized total error rate per move is multiplied by 1000 in the default settings.
The million dollar question is simple enough: out of all the games that could result from playing this position, how many do we win (and how many of our wins and losses are gammons, and how many are backgammons)? The model is exactly the same as if we had an urn with a googol balls in it (it's a big urn), and many of the balls have win written on them, and some say gammon loss, and if we look hard enough there are a few that read backgammon win, and so on. ((Balls and urns are to probability theorists what teapots and checkerboards are to computer graphics researchers, or squeamish ossifrage is to cryptographers – they seem to come with the territory.)) Instead of having the patience to count the googol balls, we just give the urn a really good shake and then pull 100 balls out without looking, and say for instance "Well, I got 53 wins, 31 losses, 9 gammon wins, 6 gammon losses, and a backgammon win – looks like my equity's roughly +0.26." and go home. If we were a bit more thorough, we could go a bit further and figure out that by cheating and measuring the sample proportions instead of the population proportions, we introduced a standard error of 0.06 into our result. (Of course, the trick is to select a sample size that's big enough that you reduce the standard error to a tolerable level, but small enough that the answer arrives before you get bored.)
It will come as no surprise that a rollout with a limited number of trials follows exactly the same procedure. It's sufficient to say that the proportion of wins/gammons etc. that come up when GNU Backgammon plays against itself (say) 1296 times, aren't likely to vary all that much from the proportion we would get if we measured the proportion of results in every game we could possibly get of GNU Backgammon playing against itself. (Of course, there may still be some doubt whether the results of GNU Backgammon vs. GNU Backgammon are representative of the results of a perfect player vs. a perfect player, or of you vs. Joe Average, but that's another story.)
In GNU Backgammon the Rollout function implements the procedure described above, with the following improvements:
Quasi-Random Dice are used to reduce the element of luck in rollouts. Instead of selecting purely random dice, GNU Backgammon will ensure a uniform distribution of the first roll of the rollout. If 36 trials are requested, one game will start with 11, two games with 21, two games with 31, etc. In general, if n * 36 games is requested, n games will start with 11, 2*n games with 21 etc. This is called rotation of the first roll. Similarly, if n*1296 trials is requested, the second roll will be rotated, such that n games will start with 11-11, n games with 11-21, n games with 21-21, etc. The third roll be also be rotated if the number of trials is proportional to 46656.
Suppose a user stops a 1296 trial rollout after 36 games. The 36 games would have had the following rolls for the first two rolls of each game: 11-11, 21-11, 12-11, 31-11, 13-11, ..., 66-11 Obviously such a rollout will give skewed results since the second roll was 11 for all games! To avoid this problem GNU Backgammon will randomize the sequence of rolls such that it is guaranteed that for any sample of 36 games you have exactly one game with first roll 11, exactly one game with second roll 11, etc. This is called stratification.
GNU Backgammon will actually also rotate and stratify rollouts where the number of trials are not multiples of 36, 1296, etc. The distribution of rolls is obviously not uniform any longer in this case, but it will still provide some reduction of the luck, i.e., no 37 trial rollout will have 3 games with a initial 66.
Before the first game of a rollout, GNU Backgammon creates a pseudo random array which it will use for all the games in the rollout. In effect it has already decided the roll sequence it will use for up to 128 rolls in every game of the rollout. In other words, for a normal rollout where games don't go over 64 moves, every single game of every possible rollout length has already had its dice sequence determined. During the rollout of game n, sequence n will be used, for game n+1 sequence n+1, etc. If it's a rollout as initial position, then whenever the current sequence starts with a double, the sequence is skipped and the dice routine moves on to the next sequence. Say an rollout as initial position is about to start using sequence 275, but that sequence begins with a double. The dice routine moves to sequence 276. On the following game, it will use sequence 277 (it remembers how many it has already skipped).
So, if you select rollout as initial position and 36 games, then you will get a prefect set of rolls for games 1..30 and the first 6 rolls of the next perfect set (the same rolls you would have gotten for games 31..36 if you'd asked for 1080 games or 10800 games or 92 games or whatever.
The dice sequence doesn't know how many trials it will be asked for, it simply generates sequences such that for a normal rollout (rollout as initial position) every 36 (30) games you get all possible 1st rolls, every 1296 (1080) games get every possible first 2 rolls, every 46656 (38880) games you get full sets of 3 rolls, etc.
GNU Backgammon evaluation functionality is driven by 3 separate neural networks. The neural nets evaluates each position statically, and returns the outcome probabilities of the game at the given position. However, there are several different methods and techniques that an evaluation can use, and these can be adjusted. It's possible to set different levels of lookahead, it's possible to add noise to the evaluation, and each evaluation can be done cubeful or cubeless. All these setting together form a total evaluation setting. In GNU Backgammon there are several of these evaluations setting for each operation GNU Backgammon does.