Skip to main content

Chess Engine

Documentation Status Formatting

A chess engine written in Python with no dependencies. All contributions welcome.

Note

This project is in active development and you may encounter bugs, especially in the game loop and/or implementation of game rules.

Contribution Guide

The contribution guide can be found on the documentation page

Features

  • Internal bitboard representation
  • Alpha-beta pruned search
  • Move generation API
  • Opening book

TODOs

  • Move ordering for faster forward search
  • Non-trivial board state evaluation using better heuristics

Usage

Install using pip -

# macOS / Linux (could work on Windows)
python3 -m pip install -U chessengine

# Windows (the primary way)
py -3 -m pip install -U chessengine

Start a game with the computer -

chessengine play

or

python -m chessengine play

If you want to play against another player -

chessengine play -p

or

python -m chessengine play -p

Developer Notes

This project uses the black linter for determining code style.

# Install black via pip.
python -m pip install black==22.10.0

# Format
black .

If you've forked this repository, consider enabling GitHub Actions to leverage the automatic pull request creation provided for resolving code formatting errors!

Metadata

Release files for chessengine 0.3.4

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

Source distribution (sdist)

Source distribution for chessengine 0.3.4
File Size Uploaded Provenance Actions
chessengine-0.3.4.tar.gz 6.1 MB Without provenance Details for chessengine-0.3.4.tar.gz

Built distribution (wheel)

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

Total release size: 9.3 MB

Release files / chessengine-0.3.4.tar.gz

Download URL chessengine-0.3.4.tar.gz
Size 6.1 MB
Tags Source
SHA-256 checksum
How to use checksums
efe21948ed08b5bdf9196d6d7ef6f6505dbce38b9fcdfcb20988d4ce0d7ee038
BLAKE2b-256 checksum
How to use checksums
ec0e2213aac27dc5b6fec0ddca45c8941eae53eb4713faca7f0139c016647edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / chessengine-0.3.4-py3-none-any.whl

Download URL chessengine-0.3.4-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c10993e9236d536b5554e363e4874520ee6f7e31c5587ec5521701bdbc60022b
BLAKE2b-256 checksum
How to use checksums
7c1f3f90ac9836251142a16b723e9e99ea2657f5b1a7956e0c0c3a19d440ae5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for chessengine 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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