gnugo

play the game of Go against the computer

TLDR

Start a game with ASCII display
$ gnugo --mode gtp
Play with a specific board size
$ gnugo --boardsize [9]
Set AI difficulty level
$ gnugo --level [10]
Play interactively in ASCII mode
$ gnugo --mode ascii
Replay an SGF game file
$ gnugo -l [game.sgf] --mode ascii
Score a finished game
$ gnugo -l [game.sgf] --score finish

SYNOPSIS

gnugo [options]

DESCRIPTION

gnugo is a program that plays the board game Go against the user. It supports multiple board sizes, adjustable AI strength, and can communicate through the Go Text Protocol (GTP) for integration with graphical frontends.In ASCII mode, moves are entered as coordinates (e.g., "C4"). The AI analyzes board positions using pattern matching and reading ahead. Use pass to pass your turn and quit to exit.

PARAMETERS

--mode MODE

Interface mode: ascii, gtp, or gmp.
--boardsize N
Board size (default: 19). Common sizes: 9, 13, 19.
--level N
AI thinking level (0-10, default: 10).
--handicap N
Number of handicap stones.
--color COLOR
Choose color: black or white.
--komi N
Set komi (compensation points, default: 5.5).
-l, --infile FILE
Load an SGF game file for analysis or replay.
-L, --until MOVE
Stop loading the SGF file just before the specified move is played.
-o, --outfile FILE
Save the game to an SGF file.
--score MODE
Estimate or finalize the score of a loaded game (estimate, finish, aftermath).
--printboard
Print the board after each move.
--quiet
Suppress informational messages.

PREVIEW

    A B C D E F G
 7  . . . . . . .
 6  . . X . . . .
 5  . X O X . . .
 4  . . X O . . .
 3  . . . . . . .

INSTALL

sudo apt install gnugo
sudo dnf install gnugo
sudo pacman -S gnugo
sudo zypper install gnugo
nix profile install nixpkgs#gnugo

CAVEATS

Requires no special terminal support in ASCII mode. The AI is moderately strong but not competitive with modern Go engines like KataGo. GTP mode is intended for use with graphical frontends.

HISTORY

GNU Go has been developed by the Free Software Foundation since 1989. It was one of the strongest open-source Go programs before the advent of neural network-based engines.

SEE ALSO

gomoku(6), gnuchess(6)