LinuxCommandLibrary

gnuchess

Play chess against a computer opponent

SYNOPSIS

gnuchess [-h | --help] [-v | --version] [-u] [-e] [-l PGNFILE | --load PGNFILE] [-S LEVEL | --setlevel LEVEL] [bookfile]

PARAMETERS

-h, --help
    Display usage help and exit

-v, --version
    Display version info and exit

-u
    Two-player mode (user vs user, no AI)

-e
    Easy mode: AI skips thinking during user turns

-l PGNFILE, --load PGNFILE
    Load game from specified PGN file

-S LEVEL, --setlevel LEVEL
    Set initial search depth level 1-10

bookfile
    Use alternate opening book file

DESCRIPTION

GNU Chess is an open-source, text-mode chess program from the GNU Project. It lets users play against a built-in AI engine or another human via the terminal. The board displays in ASCII art, and moves use standard algebraic notation like e4 or Nf3. Features include adjustable skill levels (1-10), game saving/loading in PGN format, move undo, history listing, and hints. The engine uses alpha-beta search with bitboard representation for efficiency. Start with gnuchess for user (white) vs computer (black); use -u for player vs player. Ideal for headless servers, quick games, or learning. Strength peaks around 2500 Elo at level 10, suitable for casual to intermediate play. Supports UCI protocol for GUI integration like xboard. Lightweight with no dependencies beyond standard C library.

CAVEATS

Text-only interface; no graphics or mouse support.
AI strength moderate vs modern engines.
Level 10 may take time on slow hardware.

IN-GAME COMMANDS

Type ? for full list.
Key ones: new (new game), quit (exit), save file.pgn (save PGN), load file.pgn (load), undo, hint, list (move history), level N (set level).

MOVE INPUT

Use SAN like e4, Nf3, O-O (kingside castle).
Or long form e2e4.
Press Enter after move.

HISTORY

Developed since 1984 by Stuart Cracraft as first GNU game.
Version 5 (1997) popular with 20+ variants.
Version 6 (2007 rewrite) uses bitboards, UCI; active maintenance for UCI/XBoard compatibility.

SEE ALSO

xboard(6), scid(6), crafty(6)

Copied to clipboard