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
- This package utilizes the Python Chess library.
- The information for Stockfish features are taken from Stockfish Evaluation Guide.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chess_features-0.3.1.tar.gz.
File metadata
- Download URL: chess_features-0.3.1.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db931b9496e8547750e7ccd57ef86fae273bdbac9566225c15aa233e7df12830
|
|
| MD5 |
7ee40864613217cd23dfa7c2fc78ff28
|
|
| BLAKE2b-256 |
5e3cb77a23e33edff40df2b519b42822c45cda792e91c51b5902f9e50b9158c1
|
File details
Details for the file chess_features-0.3.1-py2.py3-none-any.whl.
File metadata
- Download URL: chess_features-0.3.1-py2.py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8437857cd94cb991f9357a6138d91608e6d0e5a6bb223e49d232f122ccd9e24
|
|
| MD5 |
e8202e067fc760676e0aacccf7396dcc
|
|
| BLAKE2b-256 |
af222c2bcf3fb95bab7050555e3d3fc7436e98af7d588d1bd4902ca5c17a3506
|