A lightweight Python wrapper for the Reckless UCI chess engine
Project description
python-reckless
A lightweight, dependency-free Python wrapper for the Reckless UCI chess engine.
python-reckless does not bundle the engine. Reckless is a standalone
compiled executable; this package launches it as a subprocess and speaks the
UCI protocol to it. You supply the binary.
Installing the engine
Download a prebuilt binary for your platform from the Reckless releases page, then make it discoverable in one of these ways:
- Put it on your
PATHasreckless, or - set the
RECKLESS_PATHenvironment variable to its full path, or - pass the path directly:
Reckless(path="/path/to/reckless").
Installing this package
pip install python-reckless
The import name is reckless (the distribution name is python-reckless).
Usage
from reckless import Reckless
with Reckless() as engine:
engine.new_game()
engine.set_position(moves=["e2e4", "e7e5"])
best = engine.best_move(depth=12)
print("Reckless suggests:", best)
You can also search by time instead of depth:
move = engine.best_move(movetime=1000) # think for 1 second
Development
Make changes on a feature branch and put up to date engine.py files and other helper files in the src directory.
Note
For a fully featured UCI client (analysis info, evaluations, multipv, async),
consider the mature python-chess library,
whose chess.engine.SimpleEngine.popen_uci() works with Reckless out of the
box. This package is intentionally tiny and focused.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_reckless-0.1.6.tar.gz.
File metadata
- Download URL: python_reckless-0.1.6.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dce3fcacab61c233c7f85eb5142ae6644b1235fea2977448eb1b338f8eeda7be
|
|
| MD5 |
e8100e3b78dff999559216a6eb2abd95
|
|
| BLAKE2b-256 |
be4b3cff1e819600bb48abe2e3e989f9b74f4e5acf384a7e24fc62e87f6e52e4
|
File details
Details for the file python_reckless-0.1.6-py3-none-any.whl.
File metadata
- Download URL: python_reckless-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53c5b19d7fcc33c03f617fd670557cdd7f2ea89867100cf3166e0f8c8765d300
|
|
| MD5 |
3ef7d425319481620fab713b1c4823c3
|
|
| BLAKE2b-256 |
123f84f98125017f8e6e660d5dbba6a6c8c974ccf9f6792b67d29a759a837d79
|