Oystein explains how to use sagnu for windows

> Hi Joseph,

Hi, Chuck!

> Ok excuse my lack of computer knowledge but here is what I did.
>
> 1.  I downloaded the program for "windows"
> 2.  ssa-1.8-bin-i386-win appeared on my desktop
> 3.  I double-clicked on the icon and the "self extracting Archive" box came
> up.
> 4.  I clicked on extract and it was successful. 

So far, so good!

> 5.  what do you mean to run sagnu w/o any parameters?  I found the sagnubg
> folder on my "c" drive but the 4 icons in the folder do not run.

You have to open a "Command Prompt Window". At my computer it's opened by clicking Start->Accessories->Command Prompt. If you find the right menu item, you will get a nice black window on your screen. In this window you will be able to give commands to the computer by typing them. This may sound a bit old fashioned (What? No user interface?), but I can tell you that this is the best way to control a computer. With a command prompt like this you will suddenly feel that you control the computer and not vice versa.

Now type in this black window:

cd \

and press the return key. cd is a abbreviation for 'change directory'. Typing cd \ and pressing return, takes you to the root directory of your hard disk. Now type:

cd sagnubg

and press return again. This will take you to the right directory. Hopefully your prompt now looks like this:
C:\sagnubg>

At this prompt type:

dir

this command dir will list all the files in that directory. Hopefully you will see a list like this:

Volume in drive C is 51_02_02
Volume Serial Number is A4A6-5994

Directory of C:\sagnubg

01.01.2003  17:44    DIR            .
01.01.2003  17:44    DIR            ..
13.08.2002  10:15            41 472 bunzip2.exe
13.08.2002  10:15            49 664 bzip2.exe
01.01.2003  16:06         1 044 777 gnubg.weights
01.01.2003  17:41         1 452 544 sagnubg.exe
              4 File(s)      2 588 457 bytes
              2 Dir(s)  112 882 757 632 bytes free

These filenames looks familiar!

Now, from the prompt we can start the program sagnubg.exe simply by typing sagnubg and pressing return. sagnubg will then return this message to you:

failed to initalize GNU bg

This is returned as an error message to the user because sagnubg can't find the weights file. We therefore have to tell sagnubg where the weights file is. The weights file, gnubg.weights, is here in the very same directory as we're working in. The same directory is called . (a single dot). You can see it in the dir listing. (There's also a directory called .. (two dots), that the name of the directory one level up, but let's not worry about this right now.). Now type:

sagnubg -w .

(Yes, notice the dot). -w is what we call an option to the program. The -w option to sagnubg, tells the program where the weights file is, and as we know, it is in this directory, and we therefore type -w . to tell the program. If everything is now done correctly, you should get the text:

s version 1.8 weights 0.16-e30 moves2plyLimit 20 rolloutLimit 5 nRollOutGames 12
96 cubeAway 7 include0Ply 1 evalPlies 2 shortCuts 1 osrGames 1296

in your window. Notice that you didn't get a new prompt to type into. This is because the program is still running, waiting for position descriptions to roll out. The program must therefore be terminated before you can continue. You terminate the program by holding down the Ctrl key while pressing the letter C. Ctrl-C is the ordinary way to terminate a program at the command prompt. Look, you got your C:\sagnubg> prompt back after pressing Ctrl-C.

> I am lost on what I should be doing next.

Let's say Joseph assign you to rollout the positions in file contact-0040 (he will mail you). Download the file (from your Web browser (*) or whatever) and be sure to save it in the same directory as you have your sagnubg, assumed C:\sagnubg.

(*) Some web browsers try to open the file as a text file and you will see lots of strange characters on the screen. If this happens you should right-click in the link to the file and choose "Save Link Target as..." , or whatever it says in your browser.

If you now go back to the black window with the command prompt, you can type dir again and press return. This will then give you this list:

02.01.2003  00:15     DIR           .
02.01.2003  00:15     DIR           ..
13.08.2002  10:15            41 472 bunzip2.exe
13.08.2002  10:15            49 664 bzip2.exe
02.01.2003  00:15            21 217 contact-0040.bz2
01.01.2003  16:06         1 044 777 gnubg.weights
01.01.2003  17:41         1 452 544 sagnubg.exe
              5 File(s)      2 609 674 bytes
              2 Dir(s)  112 882 593 792 bytes free

Notice that contact-0040.bz2 is present in this list. This file is the data file it is actually a file contains a description of all the positions you are assigned to roll out. The issue now, is that the file is compressed with something called bz2. The data file must therefore be uncompressed first. It can be uncompressed by typing:

bunzip2 contact-0040.bz2

Now type dir again, and you will see the same listing as earlier, but the extension .bz2 should be gone for the data file. The size of the file is also increased. (If you're curious you can even take a look at the file by opening it in WordPad.)

OK! Now everything is set for starting the rollouts. Type:

sagnubg -w . contact-0040 contact-results-0040

and press return. Now wait! These rollouts will take a looooong time to complete. Go to bed and let the computer be running over the night, or go to the pub, or to the backgammon club or what ever.

After some hours, the simulations are hopefully completed, and you will see that you got your prompt back. Type dir. As usual, you will see a listing of the files in the directory. Hopefully sagnubg have created a file called contact-results-0040. This file is big. Joseph is working on a dialup connection (?) and you therefore don't want to send him a very big file. You should therefore pack the file before you mail it to him. The packing can be done like this:

bzip2 -9 contact-results-0040

This will create a file called contact-results-0040.bz2 in your disk. (You can of course verify that by typing dir', but you guessed that didn't you?) Now, open you mail client and type a mail to Joseph, and attach the file contact-results0040.bz2.

> Sorry for the problems.

We are sorry we didn't explain this better. We're really looking forward to your contribution to the project and we will always help you out as good as we can, if you get any further problems, or if you have any further questions.