Skip to main content

chessEngines

This project is a wrapper for chess engines supporting the UCI protocol. It allows you to create a connection to a compiled chess engine and communicate with it. By default, the following engines are distributed with this project:

  • Stockfish
  • Leela Chess Zero

These distributions can be found under /Engines. The distributions are original and no changes have been made.

Usage

In the following we will connect to the default distribution of Stockfish and find the best move in a set position:

from chess_engines import engines


# called each time stockfish finds a potential 'best move'
def on_move_found(move):
  print(move)
  

# load Stockfish
sf = engines.Stockfish()
# set starting position
sf.play_moves_san('1. e4 e5 2. Nf3 Nc6 3. Bc4')
# find the best move within 2 seconds
best_move = sf.best_move_san(max_secs=2, callback=on_move_found)

print(f'Best move: {best_move}')

Release files for chessEngines 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for chessEngines 1.1.1
File Interpreter ABI Platform
chessEngines-1.1.1-py3-none-any.whl Python 3 none any Details

Release files / chessEngines-1.1.1-py3-none-any.whl

Download URL chessEngines-1.1.1-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3c37bb2bb1f9f14f353be21fe232ad2b5c070a037545b5fa943a92384a26336
BLAKE2b-256 checksum
How to use checksums
8b919b4acb95ef77c27699d6ad41d4f29d7996581fc6aa2741f6e60ad6982dbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page