Skip to main content

Transform chess positions to various encodings

Project description

Chess Features

This Python package provides a convenient way to convert chess board representations from the Python Chess library into formats suitable for machine learning algorithms. It offers various representations that can be directly utilized as input for machine learning tasks.

Features

  • Convert Python Chess board representations into machine learning-friendly formats.
  • Supports several common representations used in machine learning tasks.
  • Easy-to-use interface for seamless integration into your projects.

Installation

You can install the package using pip:

pip install chess_features

Usage

Here's a basic example demonstrating how to use the package:

from chess import Board
from chess_features import ChessFeatures

# Create a Chess board using the Python Chess library
board = Board()

# Initialize the ChessFeatures
converter = ChessFeatures()

# Convert the board representation into a machine learning-friendly format
# Example: Convert to a feature vector
feature_vector = converter.to_stockfish_feature_vector(board)

# Example: Convert to a bitmap
bitmap = converter.to_bitmap(board)

Available Representations

  • Feature Vector: A flattened vector representation of the board.
  • Bitmap: A bitmap representation of the board.

Acknowledgements

ChatGPT

Apart from this readme no ChatGPT was used.

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

chess_features-0.3.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

chess_features-0.3.0-py2.py3-none-any.whl (21.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file chess_features-0.3.0.tar.gz.

File metadata

  • Download URL: chess_features-0.3.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for chess_features-0.3.0.tar.gz
Algorithm Hash digest
SHA256 261bfa5976c8167473951111559e0e2d520365c62717f7faa3e6515c78b86a78
MD5 dae6f0fd64c113d03243396b8eee02fd
BLAKE2b-256 353164f203009c25a2e0941abeed29faa7069c68eea2a575447dbf677515c446

See more details on using hashes here.

File details

Details for the file chess_features-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for chess_features-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fcb7e1ec3f7c442cfa645459d057247017b3531f260d505bf59b1ca203789885
MD5 bf45135858a8943e5508884927a287f7
BLAKE2b-256 e701e8242875cdd689144db17f8de3704e353546d058e19b36967a183b61bd01

See more details on using hashes here.

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