All About GNU

 

by Albert Silver

 

 

          By now, it’s fairly common knowledge that just about all the top players make use of the neural-net backgammon programs such as Snowie, or the older Jellyfish. The impact these programs have had on the way the game is understood and played cannot be understated. Players of all levels have the option of purchasing these revolutionary ‘bots’ (short for robots) in order to not only have the pleasure of getting a drubbing by a world-class opponent as many times as they want, but also have it analyze their moves, games, and matches. The program will point out our mistakes, tell us how big a blunder our move was, and list the best moves. It is still up to us to understand why our move or cube action was wrong, however there is no question such a tool is priceless.

 

            Perhaps ‘priceless’ is a poor choice of words as the price is by no means a given. Though the programs come with different options depending on how much one is willing to spend, a version with all the trimmings, such as importing one’s matches, analyzing the games, grading your play, allowing rollouts, etc. will set you back no less than $380 for Snowie or ‘only’ $220 for the older, and less sophisticated Jellyfish. This would seem to indicate that a top-quality aide is only in reach of someone with deep pockets or a deep commitment.  If not, one has to look at some of the free offerings available on the Internet.

           

            That’s where GNU comes in. GNU is one of those rare-bird phenomenons, which although a true credit to the human spirit, sound practically kooky in their mission: “The ultimate goal is to provide free software to do all of the jobs computer users want to do--and thus make proprietary software obsolete.” Don’t get me wrong. I’d love to see such a utopia real, but just have great trouble seeing it happen. It brings to mind a cynical “you get what you pay for”, which tends to be true more often than not.

 

            When I first heard of GNU Backgammon, I immediately remembered with a grimace my first experience with an old version of GNU Chess several years back: an engine that barely played at an expert level, as opposed to other master-level programs, an absolute bare minimum in functions, and graphics that reminded me of my first Atari video game system…. back in 1977. The surprise that awaited me couldn’t have been greater.

 

            GNU Backgammon is first of all a neural-net program of World-Class strength. It is based on the same technology from which Jellyfish and Snowie originated. On Gamesgrid, the famous online server where many of the world’s best play, an older version of the engine plays constantly, and has achieved a rating as high as 2086. One bot, GGRaccoon, on a weaker setting, though playing instantly, is a favorite sparring partner of the top players there. The current GNU is two versions later, just as fast, and stronger. It is also constantly in development, and a new version should be available by the year’s end.

 

            Furthermore, the interface and functions it offers are nothing short of fantastic. Everything a player needs is there, and more:

 

-                      Import and export one’s games and matches from other sources

-                      Analyze a game or entire match with a detailed report (and grade)

-                      Keeps track of your results in the Player Record

-                      Rollouts galore

-                      Setting up of positions

-                      Export to HTML

-                      And more…

 

The appearance can be changed according to a quantity of skins available, and the board can also be changed according to a large number of settings.

 

            The documentation is another problem. As far as I could see, details on the Windows version (it can be compiled for any OS available, and exists in a Linux version too for example) are very poorly documented, though the intelligence and intuitiveness of the program’s layout make this a very small issue. All the same, there is no need to reinvent the wheel here, so allow me to guide you through the program’s most essential features, their use, and provide a few tips.

 

            Where to get it

 

            The official site of GNU Backgammon is http://www.gnu.org/software/gnubg/ though you should be warned that this is not where you will want to get the program. If you do go through their FTP, you will end up with a confusing interface and an older engine.

It was only after some detective work that I stumbled on the site of one of the authors: GNU Backgammon for Windows (http://home.online.no/%7Eoeysteij/). Go there and download the Installation Archive, a self-installing 8 MB file, and run it. Mind you it is updated regularly, bringing with it new features. For example, in the last few days, a Player Record was added, akin to Snowie’s Account Manager, forcing me to scratch a complaint previously voiced below and add it to the features described.

 

 

Just so you know, there is a rather spooky warning below that says it is for people who “can live with software that suddenly crashes with no sort of warning (…) and like reporting bugs”. Frankly, it’s not nearly so dire, so don’t be put off by this.

 

            Playing a game

 

            The first and most basic feature is to simply set up a game and play, so let’s start with that. Start the program and maximize the window. If the appearance isn’t to your liking, you will find out how to customize it further below.

First set the settings by clicking on the Settings menu at the top, then click on Players. This opens a window displaying the settings for GNU. At the top there is a tab where you can also set your name for the other player. For the GNU engine, I chose the pre-defined setting of World-Class++ for both checker play and cube decisions.

 

 

            Now, still in the Settings menu, select Options. Again, a small window opens. Here, you can activate automatic bear-off, the direction of the moves, choose the equity table to be used (Woolsey’s, Snowie’s, etc.), select Nackgammon AND a great teaching tool: the Tutor Mode.

           

            When activated, the Tutor mode has GNU analyzing your moves and/or cube decisions and comparing them with its choices. You set the threshold for its alerts, so if you set it for bad, 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.

 

 

My personal choices are to set the limit to bad, and to set the Tutor decisions as Same as Analysis. The reason for this last choice is explained in the tip when I explain the Hint window.

 

*Tip* - Before going any further, do not forget to click on Save settings at the bottom of the Settings menu. You must do this every time you make changes you wish the program to remember the next time you load it.

 

To start a game, just click on the File menu, and choose New, and then your choice of a game, match, or money game session. When you are playing, if you wish to see the pip count, go to the top and in the Analyse menu select Pip count, or you can keep it permanently visible by going to the Settings menu and in Appearance check the box Show Pip count permanently. You can also check the gammon values, market window, and Match equity table here.

 

While playing, you can access the main functions through the toolbar at the top:

 

 

            Rolling the dice, doubling, taking or passing a double (thumbs up, thumbs down), etc. Mind you, you can roll the dice simply by clicking on the empty space of the board on the right side. Same goes for doubling, where you can just click on the cube on the board.

 

If you would like GNU’s analysis of a move or cube decision while playing, go to the Analyse menu and select Hint, or press the keyboard shortcut Ctrl-H. For details on the Hint/Annotation window, see below.

 

Importing and Exporting games

 

GNU allows users to import matches from a variety of formats, including the Jellyfish formats (.mat/.pos - also used at Truemoneygames BTW), the FIBS oldmoves format, and the Snowie GamesGrid format (.sgg). Just go to the File menu and choose Import. This will allow you to use its great game and match analysis functions.

 

*Tip* - For those who take online classes, please note that it imports the commentary saved on a move-by-move basis at GamesGrid, so you can see comments in the annotation window when going over the moves. I tested this with an online class and it was all there, neatly saved at every move.

 

 

It also allows users to Export their games and matches into a variety of formats such as the Jellyfish formats, text format, not to mention PDF, LaTex, PostScript, and even HTML. This way you can easily compare notes with either Snowie or Jellyfish if you own either of them.

 

HTML export

 

A special note needs to be added regarding the HTML functions. First of all, to set all the settings as you’d like, you need to go to the Settings and then select Export. There you can choose, down to the smallest details, what it will display and how. The ‘how’ concerns the images used to produce board positions. This is chosen at the bottom of the window and you can choose between its own HTML images or two others, which are FIBS and BBS. This brings up the following tip:

 

*Tip* - If you want to post a position in an online forum that supports HTML you can do this regardless whether the forum itself supports the necessary images. Here’s how you do this:

 

1) First be sure the image to be exported is currently on the board, and then in the Export settings set the HTML board type to fibs2html. In the space below URL to pictures, enter http://fibs2html.sourceforge.net/images/ as shown below. Be sure to click Ok, and then Save Settings.

 

 

2) Go to the File menu, and select Export, then Position, and then HTML.. Save the file and then open it in Internet Explorer. In case this already sounds a bit mysterious, inside IE just go to File à Open à and click on Browse… Locate the HTML file you saved and open it.

3) Once you see the board and image in front of you, still in IE, go to the View menu and select Source… This will open a small window with a lot of code. Copy the entire contents to the body of the post you are writing, and the board and analysis should appear in the forum without any problems.

 

*GammonLine Tip* - If you enjoy the GammonLine BBS, and would like to share an interesting position, the above tip will do the trick, but you can also make use of the GammonLine board images as seen in pretty much every article available. To do this, you only need to change the first step in the above tip.

 

1) Still in the Settings menu, select Export, and below choose instead BBS as the HTML board type. In the space below URL to pictures, enter ../Images/ exactly as shown in the image. Be careful to enter a capital ‘I’, because if you write ../images/ you will get nothing.

 

 

            Now just follow the same steps 2) and 3) and you’ll be cruisin’. J

 

Analyzing matches

 

GNU also comes with a set of functions that allow it to analyze a game or match, provide a detailed graded report, and allow you to navigate through the moves to quickly see the mistakes made.

 

Before starting, you’ll want to configure the settings first, though this will only need to be done once. Go to Settings and select Analysis. A fairly large window will open, allowing you to fiddle with as many settings as you could want. This is also where you set the thresholds for the Tutor mode (dubious, bad, etc.). Feel free to look around, but I simply set this to analyze checker play, cube decisions, and luck, and set the level of analysis at World Class++ for both checker play and cube decisions. The Move limit is the maximum number of moves it will display in the Hint/Annotation window.

 

 

*Tip* - Once more, please do not forget to save (Settings|Save settings) after making changes in the settings, or you will be forced to change them again the next time you start the program.

 

If you just played a match at an online server, import it first, then go to the Analyse menu and select Analyse match, or Analyse Session (money game session). If you only want to analyze a specific game, open it and then select Analyse game. Once started, you will see a bar in the bottom right corner showing the progress made in both the number of moves and percentage completed.

 

Analysis Report and Grade

 

Once GNU has finished analyzing your games, you’ll want to see the report and then go over the bloopers. Here too, the program really shines. In the Analyse menu, select Match statistics, and a window will open. Feel free to resize it (clicking and dragging the edges) to show more information. It will show you the results of both players side by side, allowing you to quickly compare notes.

 

 

In the screenshot above you can see how it appears. It will detail bad moves (and good ones), not to mention rolls of varying luck, and attribute individual grades for your checker play, your cube decisions, your overall playing, and even your luck. It doesn’t have a display in bar charts such as Snowie 3, but I admit to preferring GNU here as I like seeing the individual grades for different areas of the game, and the easy access to the numbers. In this I found Snowie confusing. It is very revealing when you see a very different evaluation of your checker play as opposed to your cube decisions. Another advantage over Snowie 3 is that GNU only grades your checker play according to non-forced moves, whereas Snowie averages the errors on all played moves, including forced moves where no mistakes could be made. You can save these results with the match, so that you can see the analysis at anytime without having to redo it.

 

You can also copy the results of the report to another document. To do this, click on the lines you want to highlight using standard Windows functions (with the Ctrl and Shift keys), and then press the Copy button. Now open a document and paste (Ctrl-V) the contents of the clipboard.

 

*Tip* - If you use a program such as Word or WordPad (do not use Notepad), the formatting will be lost when you paste it, but this is easily fixed: in the document, highlight the text, and change the font to Courier New and the font size to either 9 or 10. Ex:

 

                                      Tami                 KitWoolsey         

Error rate (total)                    -0.205 (-3.793%)     -0.147 (-2.820%)   

Error rate (pr. move)                 -0.006 (-0.115%)     -0.004 (-0.074%)   

Checker play rating                   World class          Supernatural       

Rolls marked very lucky               0                    0                  

Rolls marked lucky                    1                    7                  

Rolls unmarked                        40                   34                 

Rolls marked unlucky                  0                    0                  

Rolls marked very unlucky             0                    0                  

Luck rate (total)                     +0.420 (+7.384%)     +2.497 (+46.057%)  

Luck rate (pr. move)                  +0.012 (+0.205%)     +0.061 (+1.123%)   

Luck rating                           None                 Go to Las Vegas immediately

 

 

Player Record

 

You can keep track of the results obtained in the Player Record. There you can store the statistics of your matches and keep records of the average results obtained such as checker play, cube decisions, and luck. You can then consult different quantities of results to see what areas you feel you need more work, and how you are progressing. After viewing your statistics, go to Analyse and select Add to Player Records. If you wish to view the results, just choose Player Records.

 

Reviewing moves and mistakes

 

Once you have seen the results of the report, you will probably want to go over the mistakes you made. To do this, go to the Windows menu and select Game Record. A small window will appear looking like this:

 

 

You first have to click on a move in the notation before using the arrows. When you see a move highlighted as seen above you can navigate backwards and forwards move-by-move with the green arrows, and game-by-game with the red arrows. If you use the buttons with the question marks on the green arrows, it will go from mistake-to-mistake. In the example used, GNU disagreed with one (only) move by Kit Woolsey. The move in question wasn’t considered a bad mistake, but it did get earmarked as dubious. GNU adds these punctuation marks (standard in chess commentary) in order to identify how it evaluates a move. For example, a ‘?!’ indicates a dubious move, a ‘?’ indicates a bad move, and a ‘??’ indicates a real blunder. Fine, so it disagrees, but what does it suggest?

 

*Tip* - If you wish to reduce the size of the board to better place the Game Record and Annotation windows, go to Settings and then Appearance. In it, select Show dice below board when human is playing.  

 

Hint/Annotation window

 

Evaluation analysis

 

In order to see GNU’s analysis, go to the Windows menu, and click on Annotation. This is essentially exactly the same as the Hint window, except that the latter won’t include a space to add written notes. You will see a window open showing the best to worst moves from top to bottom. Here is what it shows for the dubious move shown above:

 

 

As you can see, it shows the best moves considered, with the move actually played in red, plus the various equity scores for gammons, etc. Most players will focus on the last three, which are the total equity of the move, the difference in equity between the move played and GNU’s top choice, and what move is being evaluated.

 

Here we can see that at 2 plies GNU considers that 13/10* 7/1* was best, with 24/15 close behind. If you’d like to copy this information to a document, click on the moves that interest you in order to highlight them as above, and press Copy. Then paste it where you wish. The tip on changing the font to Courier New size 9 or 10 applies here too if you wish to maintain the formatting.

 

You may also want to have GNU analyze a few select moves a bit deeper. To do this you can have it go a 3rd ply, or do a rollout. Let’s have it do a 3-ply analysis of the three moves I highlighted. Just click on the number ‘3’ and it will do a 3-ply analysis. Be a little patient as 3 plies is considerably slower than 2 plies, but it shouldn’t be too long. If you want to customize the evaluator, click on the button I indicated with a small red circle, and change the parameters you want. Now just click on the Eval button, and let it compute its results. You may also prefer to see the Match Winning Chances of the moves instead of the equity. If so, press the MWC button:

 

 

*Tip* - The reason I suggested the Tutor mode be set to follow the Analysis settings is the following: when I play against GNU, I like it to run a 2-ply check on my moves and alert me if I’m about to play a blunder. This 2-ply check happens to also be the standard level of Analysis I use to analyze my games. I can then leave the Eval setting at different custom setting, so that when reviewing my moves, all I need to do is press the Eval button and always get that custom evaluation.

 

Here we see the results of the 3-ply analysis, displayed in percentiles. We can also see that GNU now clearly favors 24/15 after deeper analysis. How about a rollout?

 

Rollouts

 

Rollouts can be done at any time either directly from the Analyse menu with the Rollout option, or from the Hint/Annotation window. However, pending future versions of GNU, I suggest you do it from the Hint/Annotation as only there can you then export the results to the clipboard using the Copy button. In both cases, the same options window is used as its reference. You will want to set your preferred options the first time by clicking on the […] button to the right of the Rollout button. I use two settings, one that is quick-and-dirty and gives good results within a few minutes, and another that is much slower but is possibly more precise.

 

·        Quick-and-dirty:

o       Set the number of games to about 500 games using the arrows on the right

o       0 (zero) truncation (meaning it is a full rollout)

o       Activate variance reduction

o       Set the level to Expert.

 

It should look like this:

 

 

·        More precise:

o       Set the games to about 500 games

o       Truncation should be 7 (5 is probably ok too and faster)

o       Activate the Variance reduction

o       Set the level to World-Class

o       Note: this setting is very slow and may take as long as an hour to analyze a couple of moves.

 

*Tip* - Whenever running a rollout, you will always want the Variance Reduction activated as it greatly increases the reliability of the results. This ingenious technique was introduced by Fredrik Dahl, the author of Jellyfish. In a nutshell, it factors in luck when evaluating results, so that the program doesn’t need 10,000 games to average out the luck of the dice and that way be sure luck wasn’t a factor in the results obtained. With it, 100 rolled out games with Variance Reduction can be the equivalent of 5,000 – 10,000 games with no Variance Reduction.

 

Once you have set your choices, press Ok, and then the Rollout button. Once more: Remember to save your settings before exiting the program or you will need to reconfigure your settings the next time you use GNU.

 

*Tip* - One unfortunate aspect of GNU right now, is the state of open windows that hold the different data. With the annotation window open, displaying cube decision analysis, one can easily lose sight of the board. Don’t hesitate to drag it down or minimize it. Remember that the windows are all accessible there at the bottom of the screen in the Windows toolbar.

 

Setting up a position

 

Naturally, other than matches and games, you might just want to set up a position from a book or other source, and ask GNU’s expert advice. First, you must start a new game or match, then just press the Edit button, located at the top in the toolbar.

 

 

At the bottom, you will now see you have the option of setting the scores or the names of the players. If you want to change the dice on the board, whose turn it is to play, or the doubling cube, you must go to the Game menu at the top, and at the bottom of the menu select your choice.

 

*Tip* - if the dice have already been played and you want to edit the position to a cube decision, change the turn of the player to play and the dice will be cancelled.

 

Moving and setting up the checkers is a cinch and Snowie users will feel at home as the method is identical. To remove or add white checkers to a point for example, use the right mouse button and click on the point. You determine the number of checkers to be added or removed by the height of the point you press. For example, if you have 5 white checkers on the 6-point and want to only have 3, right-click on the 3rd checker and the top two will be removed. Adding checkers is the same, and for checkers of the other color, use the left mouse button. Try it and experiment a little. It’s a lot easier to do than for me to explain.

 

Once the position is set up, press the Edit button again to exit Edit mode. Now just go to the Analyse menu and select Hint (suggested even for rollouts).

 

Appearance: skins and boards

 

Skins

 

There’s good news and bad news here. The good news is that you can change the overall appearance of the menus through a number of skins included with the installation. The bad news is that you can’t do this from within the program and must do it manually. The procedure is fairly painless if you aren’t afraid of moving a couple of files in the Windows Explorer.

 

Open Windows Explorer, and enter the \Program Files\gnubg directory. In it there is a directory called \Themes, where the skins are located, and in that, you will see a number of directories with the names of the skins they contain. Enter the directory you want and copy the files in it to the main \gnubg directory. It will ask you if you want to overwrite the files in it. Say yes, and start GNU to see the changes. It is important to copy and not move the files, so if you’re not Windows savvy, this means holding the Ctrl key on the keyboard down while dragging the files. Keep the Ctrl key pressed when you let go of the mouse button. My favorite is the one called ‘mac’, and is what you see throughout this article.

 

Boards

 

The appearance of the boards can also be changed (and was one of the first things I wanted to change to tell you the truth), though it doesn’t come with any presets, and all changes must be done manually. To make changes, go to the Settings menu and select appearance. A window will appear, displaying a number of tabs at the top, allowing you to modify the appearance of different areas until you hit on a combination you like. You will need to drag the left or right edges of the window to show all the tabs (such as for the dice) as some won’t show at first. There’s little to explain here, other than to comment on a nice touch that permits one to change the type of the wood of the board.

 

I have experimented with this and come up with a few nice board combinations (fairly classic) which I will share with you. If you set the options exactly as detailed at the end, you will get the board in the picture.

 

 

Conclusion

 

By now it should be clear that while a number of backgammon players have complained about the steep prices of top commercial software excluding them from the tools and type of progress available to more fortunate players, that complaint is now definitely without foundation.

This isn’t to say that a program such as Snowie doesn’t have an edge in functions, including more detailed options, or presentation with a more sophisticated interface, not to mention strength probably with the arrival of Snowie 4, but the competition is tough as nails, and has the most essential features sought after by players.

It’s true that it is ever a work in progress and has its rough edges, but with time they will undoubtedly be ironed out for the most part. It is also an engine that is stronger than its older top-of-the-line siblings in GamesGrid, and at its price (free), one would have to be crazy not to have it, even if one does own the legendary Snowie. After all, two heads are better than one.

I would like to effusively thank the authors of GNU Backgammon and its numerous contributors, and would also like to suggest that anyone enjoying their efforts make a contribution to the Free Software Foundation (FSF), the principal organizational sponsor of the GNU Project, as a token of appreciation. The FSF survives mostly off the contributions, however small, of private donations, and without it, those loud complaints mentioned above would be entirely justified.

 

 

 

 

Extra Board designs

 

Opacity for the checkers is always set at 1.00

 

 

Checkers (0)  :  Red: 1.00; Green: 1.00; Blue: 1.00; R. Index: 3.0; Dull: 0.9; Diffuse: 20.0

Checkers (1)  :  Red: 0.05; Green: 0.05; Blue: 0.05; R. Index: 3.0; Dull: 0.9; Diffuse: 15.1

Board             :  Red: 0.95; Green: 0.90; Blue: 0.85; Smooth: 0.1

Border            :  Ebony

Points (0)       :  Red: 0.00; Green: 0.65; Blue: 0.50; Smooth: 0.1

Points (1)       :  Red: 0.30; Green: 0.30; Blue: 0.30; Smooth: 0.1

 

 

Checkers (0)  :  Red: 1.00; Green: 1.00; Blue: 1.00; R. Index: 3.0; Dull: 0.9; Diffuse: 20.0

Checkers (1)  :  Red: 0.00; Green: 0.00; Blue: 0.00; R. Index: 3.0; Dull: 0.9; Diffuse: 15.1

Board             :  Red: 1.00; Green: 0.85; Blue: 0.45; Smooth: 0.1

Border            :  Walnut

Points (0)       :  Red: 0.80; Green: 0.50; Blue: 0.00; Smooth: 0.1

Points (1)       :  Red: 0.50; Green: 0.25; Blue: 0.00; Smooth: 0.1

 

 

Checkers (0)  :  Red: 1.00; Green: 1.00; Blue: 1.00; R. Index: 3.0; Dull: 0.9; Diffuse: 20.0

Checkers (1)  :  Red: 0.00; Green: 0.00; Blue: 0.00; R. Index: 3.0; Dull: 0.9; Diffuse: 15.1

Board             :  Red: 0.75; Green: 0.75; Blue: 0.75; Smooth: 0.1

Border            :  Walnut

Points (0)       :  Red: 0.60; Green: 0.00; Blue: 0.00; Smooth: 0.1

Points (1)       :  Red: 0.00; Green: 0.00; Blue: 0.45; Smooth: 0.1