← 返回命令列表

Linux command

gnugo 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

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

说明

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.

参数

--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.

FAQ

What is the gnugo command used for?

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.

How do I run a basic gnugo example?

Run `gnugo --mode gtp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --mode _MODE_ do in gnugo?

Interface mode: ascii, gtp, or gmp.