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.5.0.tar.gz (29.5 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.5.0-py2.py3-none-any.whl (22.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for chess_features-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b2eb0abfb69d7ed4ff18899f5faee31e46271b0c4c65d615972e94be78c5170f
MD5 92852ee1bf6a936979963008e5898fc5
BLAKE2b-256 e1104a25c522a0a52036380278c831e49cfaea8396053f6d4393d9d301a1bd98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chess_features-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f355443f2e95bc6c11c70150a0f987514a33d4d6af3927dbe6e7ee3318f52c2e
MD5 272d36622f59d771f0b891113d8a23d2
BLAKE2b-256 35646f64aed762e1e640ac55116c70b4309937a9e2d34a12959344ac4c534a02

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