PyTuroChamp
Python implementations of early chess engines including TUROCHAMP
Install / Use
/learn @mdoege/PyTuroChampREADME
The PyTuroChamp, Plankalkül, SOMA, Bernstein, and El Ajedrecista Python chess engines
Python implementations of Alan Turing's TUROCHAMP (1950), John Maynard Smith's SOMA (1961), The Bernstein Chess Program (1957), Leonardo Torres y Quevedo's El Ajedrecista (1912), and some related engines
Prerequisites
- PyPy 3 is best, but regular Python 3 or 2 also works
- python-chess (Note that since v0.24, python-chess is for Python 3 only.)
Quick start
Install python-chess and then either run one of the chess engines with the UCI/XBoard interface (mainly for chess GUIs), e.g.:
$ pypy3 ptc_xboard.py soma
The parameter to ptc_xboard.py, in this case "soma", selects the engine to use; if you leave it out, PTC is selected.
| Parameter | Engine | Notes | | --- | --- | --- | | adapt | Simple Adaptive Engine | Needs an UCI engine with MultiPV (Stockfish by default) | | bare | Bare-bones engine | Has piece-square tables for positional play; is the strongest engine here (with all engines on default settings) except adapt | | bern | The Bernstein chess program | Selects plausible moves to prune search tree | | newt | Newt | Includes an opening book and other experimental features | | plan | Plankalkül | Is set to a search depth of four plies rather than a single ply by default to bring playing strength more in line with the other engines | | ptc | TUROCHAMP (Default) | The Turing/Champernowne engine after which this repo is named | | rmove | Random Mover | All other engines should win or draw against this | | shannon | Shannon chess engine | Pretty much an engine that maximizes mobility | | soma | The Smith One-Move Analyzer | Swap-off instead of tree search-based engine | | torres | El Ajedrecista by Torres y Quevedo | Plays only as White like the real machine! (Random moves as Black.) |
Or run an engine with the console interface (Unicode output; enter your moves as e.g. "e2e4"; use black on white text in the terminal for correct piece colors):
$ pypy3 pyturochamp.py
See the chess GUI page for details on how to set up the chess engines in e.g. Cute Chess or Arena.
Documentation
Full documentation at mdoege.github.io/PyTuroChamp/
Related projects
- nimTUROCHAMP: Nim port of pyturochamp.py; also includes an HTML/JS version for web browsers
- TUROjs: PyTuroChamp as a Flask web app with server-side Python engines
License
- Public Domain
- The opening book is licensed under the GPL.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
96.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
344.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
