Skip to main content

Blindfold chess CLI with built-in engines

Project description

ch0 - Blindfold Chess CLI

Minimal terminal game for playing blindfold chess against built-in engines.

Quick start

  • Install deps with uv sync (Python 3.13+).
  • Run the game: uv run ch0 and follow the prompts to pick an engine and color.
  • Optional: place book.bin in the repo root to enable opening-book moves.

Gameplay

  • Play blindfolded in the terminal: enter SAN moves (e4, Nf3, exd5, a8=Q) or commands like show, moves, fen, pgn, resign.
  • Start from the lobby with start, choose engine and color; the bot moves automatically on its turn.
  • Use help in the lobby or in-game to list commands; quit exits.
  • Commands can be prefixed with : (e.g., :show).
  • PGN is built as you play; you can print it when the game ends.

Dependencies

  • Python 3.13+ with uv for managing the virtualenv (uv sync).
  • Runtime: python-chess; optional colorama for Windows ANSI colors (auto-enabled if installed).
  • Optional data: book.bin opening book in the repo root.

Engines

  • Options: random, andoma, sunfish, or uci.
  • UCI lets you provide a path/command to any UCI engine (e.g., Stockfish) and plays via python-chess.
  • Includes the open-source Sunfish and Andoma engines under src/ch0/engines/; they are third-party projects I do not create or maintain.

Third-party licenses

  • Sunfish is distributed under the GNU General Public License; see src/ch0/engines/sunfish/LICENSE.md.
  • Andoma is distributed under the MIT License; see src/ch0/engines/andoma/LICENSE.

TODO

  • Fix turn bookkeeping - Remove game.turn and rely on board.turn
  • Update move numbering / PGN formatting using board.turn before pushing moves
  • Sunfish: validate emitted UCI move is legal
  • Make Polyglot book usage optional
  • Show a subtle “(book)” indicator when a book move is used
  • Add undo (at least one ply)
  • Add status / check command that reports check-like info
  • Decide and implement draw policy: claimable vs automatic handling of draws
  • Add optional PGN autosave to a file (date/engine/color in file-name)
  • Add "illegal moves" count (which will be printed at the end)
  • Add Stockfish bundling or automatic UCI discovery

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

play_ch0-0.2.3.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

play_ch0-0.2.3-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file play_ch0-0.2.3.tar.gz.

File metadata

  • Download URL: play_ch0-0.2.3.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for play_ch0-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f89d4857fb817d6781d28772d8e6d578790e46bd9a815f5347019e0214aef4e7
MD5 e18653f68c7a6de524622fa7e9835c9b
BLAKE2b-256 36fe54c7f2024ab9d5a13a60771a1217441c79cbd2def7ba7fc22f2f0b565ecc

See more details on using hashes here.

File details

Details for the file play_ch0-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: play_ch0-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for play_ch0-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ff70113e9e35fb411f17361395e76f7d3ce8fd7093fe57ac12ca74b4f6a14b76
MD5 3cea8f301ea9547598454d16e7c32acc
BLAKE2b-256 af67cba23792f23b45d207c9212d19ce08358bfd24bf872b7a187e9bd1888392

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page