pcattori / evolve-your-chess

Improve your chess by eliminating your "Most Common Blunder"!
0 stars 0 forks source link

evolve-your-chess (EYC)

Improve your chess via batch analysis and Darwinian selection!

In other words, let EYC find your "Most Common Blunder" (MCB).

:zap: Batteries included: Comes bundled with Stockfish 8

Table of Contents

Created by gh-md-toc

Install

$ git clone https://github.com/pcattori/evolve-your-chess
$ cd evolve-your-chess
$ pip install -e . # link to the library

Running Example

Make sure you have followed the installation instructions, then:

$ pip install -r example/requirements.txt
$ python example/evolve.py <your-chess.com-username> [... paths/to/pgns]

Example:

evolve-example

Fetch utilities

Install

Follow the base installation instructions, but replace pip install -e . with:

$ pip install -e .[fetch]

chess.com PGN fetcher

:zap: Batteries included: Comes bundled with chromedriver so that selenium can download PGNs for you.

Requires: ChromeDriver expects you to have Chrome installed in the default location for your platform.

$ eyc-chess-dot-com-pgns

Downloads PGNs from your chess.com archives.

Options

-f or --filter-url to provide a chess.com advanced search URL. See Advanced search for more details.

-o or --output to specify download directory. Defaults to ~/Downloads.

-p or --pages to specify the number of chess.com archive pages to download. Defaults to 20.

-d or --driver to specify a different selenium driver. Defaults to built-in chromedriver. warning drivers other than chromedriver are not officially supported

Advanced search

You can leverage chess.com's advanced search capabilities to specify which games to download.

  1. Navigate to your chess.com archives.
  2. Click "Advanced" in the Archive search panel. simple-search
  3. Set your search filters in the Archive advanced search panel advanced-search
  4. Click "Search"
  5. Copy the URL that appears in your browser

Pass that URL (surrounded by quotes) to the fetcher via the -f or --filter-url flag.

Make sure your search actually returned some results on chess.com first before trying it with eyc-chess-dot-com-pgns!

ECO JSON fetcher

$ eyc-eco

will print newline-delimited ECO records to your stdout.