Skip to content

DaveP80/python-reckless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 PATH as reckless, or
  • set the RECKLESS_PATH environment 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

About

This is a wrapper for the chess engine Reckless

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages