mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 14:03:04 +02:00
- Add comprehensive tests for all packages (3572 tests, 100% branch coverage) - Split oversized test files to stay under 500-line limit - Add per-file ruff ignores for test-appropriate suppressions - Fix _cache_decks.py to properly convert JSON lists to tuples - Add session-scoped conftest fixture for logging handler cleanup (Python 3.14) - Update ruff pre-commit hook to v0.15.2 - Add codespell ignore words for test data - Add generated output files to .gitignore |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _move_analysis.py | ||
| analyze_chess_game.py | ||
| README.md | ||
| requirements.txt | ||
| run.sh | ||
Chess move analysis with Stockfish
This utility parses a PGN (or a log that contains a PGN section) and evaluates each move with a local Stockfish engine, printing a per-move quality rating.
Install
Install python dependencies:
pip install -r PYTHON/stockfish_analysis/requirements.txt
Ensure Stockfish is installed and available in your PATH (or provide the path via --engine). On Linux, you can typically install with your package manager or download a binary.
Run
From the repo root:
python3 PYTHON/analyze_chess_game.py lichess_bot_game_8GSdY3Ci.log
Options:
--engine /path/to/stockfishto specify a custom engine path--time 0.2seconds per evaluation (default)--depth 12fixed depth instead of time
The script prints a table with, for each ply:
- side to move, SAN move, eval before/after from mover's POV, delta, classification, and Stockfish best move suggestion.