Visualizing and learning from games on chess.com

Overview

Better Your Chess

What for?

This project aims to help you learn from all the chess games you've played online, starting with a simple way to download an organized collection of your games!

On Chess.com, you can view your winrate by color, your best win, and analyze a game per day for free. Building on top of the Stockfish engine and python-chess, this package aims to give the user: winrates by opening, automatic tactic generation from your library, and common deviations from book moves.

Current features:

  • winrate by opening
  • rating distribution

In progress:

  • automatic tactics generation from your library

Future features:

  • show opening positions where you often deviate from book moves
  • loss frequencies (checkmate, resignation, timed out)
  • suggest grandmasters with similar repertoires

Components

  1. notebooks/intro_to_python-chess.ipynb - intro to working with PGNs via python-chess and polyglot opening books.

  2. scripts/pgn_downloader.py - download Chess.com games for a user, organized in year/month directories.

    python scripts/pgn_downloader.py username
    
  3. chess_analytics/game_reader.py - implements a GameReader, class to work with PGNs.

  4. chess_analytics/game_library.py - build a library of games from a directory, represented as a dataframe with 1 row per game.

    from chess_analytics.game_library import GameLibrary
    library = GameLibrary("data/user_games/user/")
    library.df.head()
    

    Sample of dataframe

  5. scripts/plotting.py - visualize a library: opponent rating distribution, winrate by opening, and more.

  1. scripts/generate_tactics.py - Automatically generate tactics from a library. This currently supports mate-in-Ns, producing a JSON and PNGs of the positions. 10 examples are in data/output/tactics/.

White to move & mate in two

Sources

Owner
Luc d'Hauthuille
Luc d'Hauthuille
This a secret santa game organizer that assigns secret santa randomly to each participant and then sends an automated mail to each santa with details of his/her secret santa child.

Before executing the script, make sure to turn on 'Less Secure App access' option from your gmail ID that will be used to send out the mails to all participants of the game. To do so, get going with

DEV_FINWIZ 10 Dec 06, 2022
This is a simple Tic-Tac-Toe game.

Tic-Tac-Toe Nosso famoso e tradicional Jogo da Velha, mas agora em Python. Development setup Para rodar o programa, basta instalar python em sua maqui

João Assalim 1 Oct 10, 2022
Turtle Road Crossing Game in Turtle(python module)

Turtle Road Crossing Game in Turtle(python module) In this project we have built a road crossin game in python with Object-Oriebted Programming. This

Jhenil Parihar 3 Jun 15, 2022
Editing tool (read/write) .sc files (*_tes.sc , *.sc, *_dl.sc ) from Supercell games (Brawl Stars, Clash Royale, Clash of Clans and others).

SupercellSWF Version 0.1.0.2 About Editing tool (read/write) .sc files (*_tes.sc , *.sc, *_dl.sc ) from Supercell games (Brawl Stars, Clash Royale, Cl

Fred31 11 Jun 23, 2022
Inject custom C++ code into GameMaker Studio 2 YYC builds

YYC Boost Inject custom C++ code into GameMaker Studio 2 YYC builds! WARNING: This tool is currently in an early stage of development and it is not gu

Patrik Kraif 7 Dec 30, 2022
Hagia is a 2D game engine and toolset for Python.

HAGIA What is Hagia? Hagia is a 2D game engine and toolset for Python. Hagia has

star 3 Jun 01, 2022
2DMC is an abrrieviation for 2 Dimensional Minecraft.

2DMC 2DMC is an abrrieviation for 2 Dimensional Minecraft. This idea is originally created and implemented by Griffpatch on Scratch. This is a persona

DaNub 5 Nov 06, 2022
Tic tac toe game developed by naman in python

TIC TAC TOE GAME DEVELOPED BY NAMAN IN PYTHON . IT USES MINMAX ALGORITHM TO COMPETE IN DIFFICULTY MODE

Naman Anand 4 Jun 24, 2022
A playable version of Chess – classic two-player, various AI levels, and the crazyhouse variant! Written in Python 3

A playable version of Chess – classic two-player, various AI levels, and the crazyhouse variant! Written in Python 3. Requires the installation of PIL/Pillow and Requests

1 Dec 24, 2021
Sukoku-solver Python About Sudoku is one of the most popular puzzle games of all time

Sukoku-solver Python About Sudoku is one of the most popular puzzle games of all time. As a logic puzzle, Sudoku is also an excellent brain game. Bein

Harshith VH 1 Nov 20, 2021
Navicella cavallo, gioco 2D stile space shooter

Navicella Cavallo Il miglior gioco in circolazione Navicella cavallo è un gioco 2D basato sullo stile dei giochi space shooter Come installare Navicel

Matteo 6 Jul 03, 2022
This is Minesweeper coded in Python. It has almost all features from the main game

Minesweeper This is Minesweeper coded in Python. It has almost all features from the main game Use right click to open tile, right click on an open ti

3 Jul 12, 2022
This is a good project to train your logic game with python language

JO-KEN-PÔ!!! | Description | basic. I make this game only to train. This is a good project to train your logic game with python language. This game is

Elianderson Silva 1 Jan 24, 2022
A Neural Network based chess engine and GUI made with Python and Tensorflow/Keras.

Haxaw-Chess Haxaw: Haxaw is the Neural Network based chess engine made with Python and Tensorflow/Keras. Also uses the python-chess library. (WIP: Imp

Sarthak Bharadwaj 8 Dec 10, 2022
Guess Your Card - A Multiplayer Python Game

Guess Your Card - A Multiplayer Python Game This is a guessing card game having two levels - Developed in Python and can be played between two to four

Hammad Ahmed ~ 1 Oct 20, 2021
Minecraft clone using Python Ursina game engine!

Minecraft clone using Python Ursina game engine!

Taehee Lee 35 Jan 03, 2023
A very bad wordle solver to help me solve the daily wordle

Wordle Solver A very bad wordle solver to help me solve the daily wordle on https://www.powerlanguage.co.uk/wordle/ TODO list take into account letter

Logan Anderson 4 Feb 03, 2022
Automates cubemap generation for Source Engine games.

AutoCube Automates cubemap generation for Source Engine games during compile-time. Download: see the release page Installation Using with CompilePal A

5 Feb 18, 2022
j-chess implementation in python

j-chess-client-python This repository aims to be a starting point for implementing a chess ai for the j-chess-server in python. To start, you can copy

Jonas 1 Dec 25, 2021
Aftermath is an anti token grabber written in Python3.

🎈 Aftermath 🎈 Aftermath is an anti token grabber written in Python3. This tool with a GUI setup is checking the Downloads folder to search for token

Billy 39 Dec 16, 2022