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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: chess_features-0.4.0.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.4.0.tar.gz
Algorithm Hash digest
SHA256 6ff14fa70ed2a13225226c942c76bc2b5d8e51c4cf0757cac599711b1e31cec7
MD5 c1589dc3037f51c0c1d43ebe8bd6fabc
BLAKE2b-256 0679a3dbf7af1213f499ccd4cae2d0bb5ce48d1bcea249079edc98b83647b5b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chess_features-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8a860b4f81b2d05b7e5791dd9d349c1664aacede94be1f381a49b77ff2d83807
MD5 f1095af982b872afb8e1ac23369d1344
BLAKE2b-256 a5cf13ba15d9027c55c34976fe087454c0b0b92c8e81a178cdfcb468918f9b02

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