Skip to main content

High-performance chess library with board sizes from 6x6 to 16x16

Project description

spooky_chess 🎃👻

Rust and Python library for the game of Chess.

Features

Performance

Measured with a Threadripper 9980x, and 6400 MT/s CL36 DDR5. Python 3.14.

> cd tests/comparison && cargo run --release && cd -
50000 random game playouts
  spooky_chess (Rust Bindings):
    moves:   4936906
    time:    2.14s
    moves/s: 2311096.73
> uv run python -m pytest -k test_compare_random_game_playout -s --run-slow
50000 random game playouts
  spooky_chess (Python Bindings):
    moves:   4936141
    time:    6.66s
    moves/s: 740666.24
  python-chess:
    moves:   4935315
    time:    113.33s
    moves/s: 43548.00
  Speedup: 17.01x

Validity

Fuzz-tested against python-chess, with 5 million random playouts.

Install

Rust

cargo add spooky_chess

Python

uv add spooky-chess

Includes type hints.

Examples

These examples load a PGN, and ask Stockfish for the best move at every playable position.

Rust:

cargo run --example analyse_pgn

Python:

uv run python examples/analyse_pgn.py

Develop

Tests

  • fish run_tests.fish
    • fish run_python_tests.fish
    • fish run_rust_tests.fish

Lints

  • fish run_lints.fish

Performance

  • fish run_benchmark.fish
  • fish run_profile.fish

See Also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spooky_chess-0.10.0.tar.gz (93.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spooky_chess-0.10.0-cp314-cp314-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

spooky_chess-0.10.0-cp314-cp314-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

spooky_chess-0.10.0-cp313-cp313-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

spooky_chess-0.10.0-cp313-cp313-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

spooky_chess-0.10.0-cp312-cp312-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

spooky_chess-0.10.0-cp312-cp312-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

spooky_chess-0.10.0-cp311-cp311-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

spooky_chess-0.10.0-cp311-cp311-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file spooky_chess-0.10.0.tar.gz.

File metadata

  • Download URL: spooky_chess-0.10.0.tar.gz
  • Upload date:
  • Size: 93.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spooky_chess-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d60dd89973ff139b8c45713e1467b5109dbd1189ee2364f5837a1e9fee7dc826
MD5 ec15921c632bbbb997522f2ed9c9c7bf
BLAKE2b-256 b3dbc5d26162715f2afe795399bfd280b0c845a62e8685232b34ee029f930268

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0.tar.gz:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e7dceeae20a67f63b773e4fc601ecff716b3e2334238f0a27f4d9f5bcb3688ea
MD5 78eca38ec644d39a757d37f50580b4a1
BLAKE2b-256 328ed1b4fa5b1ef11331ef81254b7fb0802b35a46269f803466816087fa63880

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b030b4de17fe11148c29a1f81ade32e07acc23399f5b4318929545082e4f42f
MD5 ed0867316482046747f00da0b37a5dfd
BLAKE2b-256 e612fa3781516874b8c51c488351d094957235fa306111a0d1ead898b2d19f54

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc6f29b88ef47a81ff2dc0b1b758eac37fd065d785446986b1be121a21a4581e
MD5 5ddf6c0d608ea1aae84c47f97fc17186
BLAKE2b-256 1fddddd306418149fad36598fc9f9e29e212b06ae045043a75630a78c88dd1a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3631df7d7190ff7af890ecc7c114a6d9feea8e0118e79ac13efd12ba1184d33
MD5 8ee52f4ebd045134eea56bb1e385409d
BLAKE2b-256 dfb6634983798611408f67720ec34300a3ad3754429144650be65396275cdbb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11c5dce4d487c73bbd72e5bba6f9aafaa60fec1c6b03ce381160f0ce558736c3
MD5 e09036707fbd4c489b31089c968c9a9c
BLAKE2b-256 e9fad490440f006598aa2e286bee17d5db49b72edd7e4ec3e576b8689a4df375

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 087d46848a6b8c5939ff545a6e1d051220e13f258e1a58405a6548211ef21580
MD5 2852abb7803dc0e9152b8ffbb8f4be4a
BLAKE2b-256 90badbde01c5cbe18c1959c8b3ac1b7b08c5f25ec6f5182eb7238a5b154b873e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bcd422c7f8fa2968cbbe2e9fd86e7d45ccc3df89ef5b806b80cfa5a3a971339f
MD5 fb9c5e2afc59ee0e0c2e84d16bf7d327
BLAKE2b-256 3793f0589653513f5db4fdd00f78e435ccc37b656b84462c3bbcff9d7dcb2471

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spooky_chess-0.10.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spooky_chess-0.10.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e3d1e8f461fdc4bc09b1736fce83b5c98a9d125038c49091bdcaf0da79baf67
MD5 a611c65ba1b4442fd9b1b25abda0a8ff
BLAKE2b-256 d8bf9d261cdb89536a008392a1bfcc5ddf40017f2f692e06139e5baba5194d23

See more details on using hashes here.

Provenance

The following attestation bundles were made for spooky_chess-0.10.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on snowdrop4/spooky-chess

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page