[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]  


Starting and Leaving @gnubg

This chapter describes how to run @gnubg{}, and how to end it when you are finished.

Invoking @gnubg

Start GNU Backgammon by running the program gnubg. Once started, it will process commands from the terminal.

You can also instruct @gnubg{} to read an existing game or match from a file, to play or analyse. To read from filename, specify gnubg filename.

@gnubg{} will give you a short summary of how to invoke it if given the option @option{--help} (@option{-h} for short), and report its version with @option{--version} (@option{-v}).

GNU Backgammon will normally use a graphical board window if a window system is available. To prevent this behaviour and use standard terminal output instead, you can specify the @option{--tty} option (which can be abbreviated to @option{-t}).

By default, @gnubg{} will attempt to load pre-trained neural net weights; if you have no weights or wish to train a net from scratch, you can supply the @option{--no-weights} (@option{-n}) option, and new weights will be randomly generated.

FIXME the previous command is out of date; --no-weights is now --new-weights.

FIXME document --no-bearoff, --no-rc, --datadir and --window-system-only options.

Leaving @gnubg

exit
quit
To exit @gnubg{}, use the exit or quit commands (they are synonymous). If you are currently playing a game, the match in progress will be lost, so @gnubg{} will ask you if you are sure you want to exit in this case.

@gnubg{} will also exit upon end-of-file; you can therefore exit by typing an end-of-file character (usually C-d, i.e. hold the CTRL key and press D).

If you send an interrupt sequence (often by pressing C-c), the current @gnubg{} command (if any) will be terminated. This can be useful if you do not want to wait for a slow command to complete.

Shell Commands

You can execute shell commands from @gnubg{} without leaving or suspending it.

![command]
Invoke a subshell to execute command. If you do not give a command, a shell will be invoked (the shell is specified by the environment variable @env{SHELL} if it is set, or defaults to `/bin/sh' if not).


[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]