CUTECHESS-CLI(6)

πŸ“¦ version 1.4.0, in nixos 26.05, nixpkgs unstable

🌸 CUTECHESS-CLI(6) β€” Games Manual 🌸

πŸ’– NAME πŸ’–

cutechess-cli β€” Automate chess engine tournaments. That is literally the whole point, bestie. πŸ’…

✨ SYNOPSIS ✨

cutechess-cli -engine engine-options -engine engine-options
              [-engine engine-options ...] [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so the cutechess-cli utility automates chess engine tournaments. No cap, that is its whole job. Its options are as follows β€” yes, every single one, we are going through them all:

  • -engine engine-options β€” Add an engine defined by engine-options to the tournament. See β€œEngine Options”.
  • -each engine-options β€” Apply engine-options to each engine in the tournament. See β€œEngine Options”.
  • -variant variant β€” Set the chess variant, where variant is one of these iconic picks:
    • 3check β€” Three-check Chess
    • 5check β€” Five-check Chess
    • ai-wok β€” Ai-Wok (Makruk variant)
    • almost β€” Almost Chess
    • amazon β€” Amazon Chess
    • andernach β€” Andernach Chess
    • antiandernach β€” Anti-Andernach Chess
    • antichess β€” Antichess / Losing Chess
    • asean β€” ASEAN-Chess
    • atomic β€” Atomic Chess
    • berolina β€” Berolina Chess
    • cambodian β€” Ouk Chatrang (Cambodian Chess)
    • capablanca β€” Capablanca Chess
    • caparandom β€” Capablanca Random Chess
    • cfour β€” Cfour (7x6, line up 4 to win)
    • chancellor β€” Chancellor Chess (9x9)
    • changeover β€” Change-Over Chess
    • checkless β€” Checkless Chess
    • chessgi β€” Chessgi / Drop Chess
    • chigorin β€” Chigorin Chess
    • circulargryphon β€” Circular Gryphon Chess
    • codrus β€” Game of Codrus (Losing Chess Variant)
    • coregal β€” Co-regal Chess
    • courier β€” Courier Chess (Medieval)
    • crazyhouse β€” Crazyhouse (Drop Chess Variant)
    • displacedgrid β€” Displaced Grid Chess
    • dobutsu β€” Dobutsu Shogi (3x4)
    • embassy β€” Embassy Chess
    • euroshogi β€” EuroShogi (8x8)
    • extinction β€” Extinction Chess
    • fischerandom β€” Fischer Random Chess / Chess 960
    • giveaway β€” Giveaway Chess (Losing Chess)
    • gomoku β€” Gomoku (15x15, exactly 5 in a row to win)
    • gomokufreestyle β€” Gomoku Free-Style (5 in a row to win)
    • gothic β€” Gothic Chess
    • grand β€” Grand Chess
    • grid β€” Grid Chess
    • gridolina β€” Berolina Grid Chess
    • gryphon β€” Gryphon Chess
    • gustav3 β€” Gustav III's Chess
    • hoppelpoppel β€” Hoppel-Poppel (has N/B hybrids)
    • horde β€” Horde Chess (v2)
    • janus β€” Janus Chess
    • jesonmor β€” Jeson MΓΆr
    • judkins β€” Judkins Shogi (6x6)
    • karouk β€” Kar Ouk (One-check Ouk)
    • kinglet β€” Kinglet Chess
    • kingofthehill β€” King of the Hill Chess
    • knightmate β€” Knightmate
    • knightrelay β€” Knight-Relay Chess
    • loop β€” Loop Chess (Drop Chess Variant)
    • losalamos β€” Los Alamos Chess
    • losers β€” Loser's Chess
    • makruk β€” Makruk (Thai Chess)
    • minishogi β€” Minishogi (5x5)
    • modern β€” Modern Chess (9x9)
    • newzealand β€” New Zealand Chess (has N/R hybrids)
    • placement β€” Placement Chess
    • pocketknight β€” Pocket Knight Chess
    • racingkings β€” Racing Kings Chess
    • rifle β€” Rifle Chess
    • seirawan β€” S-Chess (Seirawan Chess)
    • shatranj β€” Shatranj
    • shogi β€” Shogi
    • shoot β€” Shoot Chess
    • simplifiedgryphon β€” Simplified Gryphon Chess
    • sittuyin β€” Sittuyin (Myanmar Chess)
    • slippedgrid β€” Slipped Grid Chess
    • suicide β€” Suicide Chess (Losing Chess Variant)
    • superandernach β€” Super-Andernach Chess
    • threekings β€” Three Kings Chess
    • tictactoe β€” Tic-tac-toe
    • twokings β€” Two Kings Each Chess (Wild 9)
    • twokingssymmetric β€” Symmetrized Wild 9
    • standard β€” Standard Chess (default)
  • -concurrency n β€” Set the maximum number of concurrent games to n.
  • -draw movenumber=number movecount=count score=score β€” Adjudicate the game as draw if the score of both engines is within score centipawns from zero for at least count consecutive moves, and at least number full moves have been played. Captures and pawn moves will reset the counters.
  • -resign movecount=count score=score [twosided=value] β€” Adjudicate the game as a loss if an engine's score is at least score centipawns below zero for at least count consecutive moves. If value is true (default: false) then activate two-sided resign adjudication. The winning side's scores must be at least score centipawns above zero for at least count consecutive moves.
  • -maxmoves n β€” Adjudicate the game as a draw if at least n full moves have been played without result. Ignored if n equals zero (default).
  • -tb paths β€” Adjudicate games using Syzygy tablebases. Paths should be semicolon-delimited list of paths to the compressed tablebase files. Only the WDL tablebase files are required.
  • -tbpieces N β€” Only use tablebase adjudication for positions with N pieces or less.
  • -tbignore50 β€” Disable the fifty move rule for tablebase adjudication.
  • -tournament type β€” Set the tournament type, where type is one of:
    • round-robin β€” Round-robin tournament (default)
    • gauntlet β€” First engine(s) against the rest
    • knockout β€” Single-elimination tournament
    • pyramid β€” Every engine plays against all of its predecessors
  • -event arg β€” Set the event name to arg.
  • -games n β€” Play n games per encounter. This value should be set to an even number in tournaments with more than two players to make sure that each player plays an equal number of games with white and black pieces.
  • -rounds n β€” Multiply the number of rounds to play by n. For two-player tournaments this option should be used to set the total number of games to play.
  • -sprt elo0=E0 elo1=E1 alpha=Ξ± beta=Ξ² β€” Use a Sequential Probability Ratio Test as a termination criterion for the match.

This option should only be used in matches between two players to test if engine P1 is stronger than engine P2. Hypothesis H1 is that P1 is stronger than P2 by at least E0 ELO points, and H0 (the null hypothesis) is that P1 is not stronger than P2 by at least E1 ELO points. The maximum probabilities for type I and type II errors outside the interval [ E0, E1 ] are Ξ± and Ξ².

The match is stopped if either H0 or H1 is accepted or if the maximum number of games set by -rounds and / or -games is reached.

  • -ratinginterval n β€” Set the interval for printing the ratings to n games.
  • -outcomeinterval n β€” Set the interval for printing outcomes to n games.
  • -debug β€” Display all engine input and output.
  • -openings file=file format=[epd | pgn] order=[random | sequential] plies=plies start=start policy=[default | encounter | round] β€” Pick game openings from file. The file can be either in epd (Extended Position Description) or pgn (Portable Game Notation) format. The default format is pgn. Openings can be picked in random or sequential (default) order. The opening depth is limited to plies number of plies. If plies is not set the opening depth is unlimited. In sequential mode start is the number of the first opening that will be played. The minimum value for start is 1 (default).

The value of policy rules when to shift to a new opening. If set to encounter a new opening is used for any new pair of players, round shifts when a new round begins. The default shifts for any new pair of players and also when the specified number of opening repetitions is reached.

  • -bookmode mode β€” Set Polyglot book access mode, where mode is either ram (the whole book is loaded into RAM) or disk (the book is accessed directly on disk). The default mode is ram.
  • -pgnout file [min] [fi] β€” Save the games to file in PGN format. Use the min argument to save in a minimal PGN format. Only finished games will be saved if argument fi is given.
  • -epdout file β€” Save the games to file in FEN format.
  • -recover β€” Restart crashed engines instead of stopping the game.
  • -repeat [n] β€” Play each opening twice (or n times). Unless the -noswap option is used, the players swap sides after each game. So they get to play the opening on both sides. Please note that a new encounter will use a new opening.
  • -noswap β€” Do not swap sides of paired engines.
  • -reverse β€” Use schedule with reverse sides.
  • -seeds n β€” Set the first n engines as seeds in the tournament. The default is 0.
  • -site arg β€” Set the site / location to arg.
  • -srand seed β€” Set the random seed for the book move selector.
  • -wait n β€” Wait n milliseconds between games. The default is 0.
  • -resultformat format β€” Specify the format of result lists. Format can either be a comma separated list of fields or a format name. Format help shows available named formats. The default format lists rank, name, elo, elo error, number of games, score percentage, and draw percentage of every player.
  • -version β€” Display the version information.
  • -help β€” Display help information.
  • -engines β€” Display a list of configured engines and exit.

πŸŽ€ Engine Options πŸŽ€

  • conf=arg β€” Use an engine with the name arg from engine configuration file.
  • name=arg β€” Set the name to arg.
  • cmd=arg β€” Set the command to arg.
  • dir=arg β€” Set the working directory to arg.
  • stderr=arg β€” redirects standard error output into the file arg 🫢 so your engine's messy lil tantrums go somewhere other than your terminal.
  • proto=[uci | xboard] β€” sets the chess protocol, iykyk. Pick uci or xboard ✨
  • tc=[tcformat | inf] β€” sets the time control πŸ’… The format is moves/time+increment, where:
    • moves is the number of moves per tc
    • time is the time per tc (either plain seconds, or minutes:seconds)
    • increment is the time increment per move, in seconds

You can also set an infinite time control with inf ♾️

  • option.name=value β€” sets a custom engine option, no cap πŸŽ€
  • arg=arg β€” passes arg to the engine as a command line argument.
  • initstr=arg β€” sends arg to the engine's standard input at startup 🌸
  • restart=[auto | on | off] β€” sets the engine restart mode:
    • auto means the engine decides whether to restart (this is the default πŸ‘‘)
    • on means the engine is always restarted between games
    • off means the engine is never restarted between games
Heads up bestie: setting this option does not prevent engines from being restarted between rounds in a tournament featuring more than two engines. That's just how it is, periodt.
  • trust β€” trusts result claims from the engine without validation. By default all claims are validated, so this is you literally saying "yeah I believe you" to a machine πŸ’€
  • st=n β€” sets the time limit for each move to n seconds. This option cannot be used in combination with the tc option β€” pick one, bestie, you can't have both πŸ™ˆ
  • timemargin=n β€” lets engines go n milliseconds over the time limit. A little grace period, we love to see it 🧚
  • book=file β€” uses file (a Polyglot book file) as the opening book πŸ“–
  • bookdepth=n β€” sets the maximum book depth (in fullmoves) to n.
  • whitepov β€” inverts the engine's scores when it plays black. Use this one with engines that always report scores from white's perspective, k? ⭐
  • ponder β€” enables pondering if the engine supports it πŸ€”
  • depth=plies β€” sets the search depth limit, in plies.
  • nodes=count β€” sets the node count limit πŸ”₯
  • tscale=factor β€” scales engine timeouts by factor. Only use this option if necessary, fr fr, don't just vibe with it.
  • debug β€” activates debug mode (per protocol, UCI only) πŸ¦‹

🌈 EXAMPLES 🌈

Play ten games between two Sloppy engines with a time control of 40 moves in 60 seconds:

$ cutechess-cli -engine cmd=sloppy -engine cmd=sloppy -each proto=xboard tc=40/60 -rounds 10

Play a single game between Atak and Glaurung engines with a time control of 40 moves in one minute and 30 seconds with one second increment:

$ cutechess-cli -engine name=Atak cmd=Atak32.exe dir=C:\atak proto=xboard -engine cmd=glaurung proto=uci option.Threads=1 -each tc=40/1:30+1

Let me break down the deets for you πŸ’–

  • Use the name=Atak parameter because it's a Xboard protocol 1 engine and doesn't tell its name. Rude of it, honestly.
  • Use the dir=C:\atak parameter to point the location of the executable.
  • Glaurung can tell its name and is in the PATH variable so only the command is needed. Main character energy, it knows who it is πŸ‘‘
  • Set Glaurung to use 1 thread.
  • Set the time control to 40 moves in one minute and 30 seconds with one second increment.

Play a Round-Robin tournament between Fruit, Crafty, Stockfish and Sloppy:

$ cutechess-cli -engine conf=Fruit -engine conf=Crafty -engine conf=Stockfish -engine conf=Sloppy -each tc=4 book=book.bin -games 2 -rounds 10 -repeat
  • Play two games per encounter, effectively multiplying the number of games by 2.
  • Play 10 times the minimum amount of rounds (3). So the total number of rounds to play will be 30, and the total number of games 120. Math ate, honestly πŸ”₯
  • In each two-game encounter colors are switched between games and the same opening line is played in both games.

πŸ‘€ SEE ALSO πŸ‘€

cutechess-engines.json(5) β€” go read it, bestie, it's giving essential companion doc 🫢


πŸ’œ AUTHORS πŸ’œ

The cutechess-cli utility was written by Ilari Pihlajisto, Arto Jonsson and contributors. See the project page for more details. Legends, all of them ✨


🌸 RESOURCES 🌸


And that's the whole page, bestie! πŸ¦‹ This lil gem is from Debian, dated June 28, 2020, and lives at CUTECHESS-CLI(6) β€” go forth and run tournaments, and remember: no cap, read your options πŸ’…βœ¨

πŸ“¦ where this page comes from