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.2.tar.gz (29.1 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.2-py2.py3-none-any.whl (21.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for chess_features-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6b5110ba3c5dedd937483f0be40b84fc3499bfad2d824f4162ba05b413c7669a
MD5 1e840b6b65177558ecdc581a3be16815
BLAKE2b-256 2fa36a65de509e3164e33c13066950ab22b447261e402b987bc5952b8806357b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chess_features-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6cf9b34087cf073a169f54ba045f8bba51d1e4dcd0c6549d52c8c0a16dad6a72
MD5 40eb98eeacb765b2cf18eee6ddff7a2e
BLAKE2b-256 ab16e597b0142c4f28f0332fef7778697f616717a7e296ad4d90d35a3fd9434d

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