Skip to main content

Computational chess performance analysis — ML-powered insights from personal PGN archives

Project description

chessvision-py

A Python library for computational chess performance analysis. Takes your PGN game files and runs machine learning on them to tell you what kind of mistakes you make and how to improve.

What it does

  • Parses PGN files from chess.com, lichess, or OTB tournaments
  • Evaluates every position with Stockfish (cached, resumable)
  • Clusters your errors into 5 distinct archetypes
  • Embeds your playing style into a vector space trained on 29.3M elite games
  • Forecasts ELO trajectory using a model trained on 67,115 elite players
  • Generates a personalized weekly training plan

Installation

pip install chessvision-py

Requires Stockfish:

brew install stockfish   # Mac
apt install stockfish    # Linux

Quick start

import chessvision as cv

cv.download_models()

report = cv.analyze("my_games.pgn", player_name="YourUsername")

Or step by step:

games, moves = cv.parse_pgn("my_games.pgn")
moves  = cv.evaluate_games(moves)
moves  = cv.engineer_features(games, moves)
errors = cv.run_archetype_analysis(moves)
report = cv.analyze_player(moves, games, errors, "YourUsername")

Pre-trained models

Models are hosted on Hugging Face at rakkshet/chessvision-models and download automatically on first use:

cv.download_models()

License

GPL-3.0

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

chessvision_py-0.1.0.tar.gz (40.4 kB view details)

Uploaded Source

File details

Details for the file chessvision_py-0.1.0.tar.gz.

File metadata

  • Download URL: chessvision_py-0.1.0.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for chessvision_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2697112d81cc72fd645f28f8cd320a36cdc4dc824b868c3d43d80b35207286cd
MD5 e6110a7e7dff3c9a17c6969ae5e317d5
BLAKE2b-256 07d5632e5755c008ec282ec4316a2194a767c7aac2435e77989a1bcc31041eac

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