chess-opening-explorer is a Flask-Python app that reads a pgn database of chess games to map the popularity of a provided opening against a set of ELOs.
Online chess traffic has increased nearly 40% month-over-month since the release of Netflix's The Queen's Gambit on Oct. 23, 2020. In Beth Harmon's final match, she opens with the series' namesake: The Queen's Gambit (1. d4 d5 2. c4). There have been numerous articles covering the recent rise in chess. This project was built to determine if the influx of new players from the popular series also led to a similar boost in the relative use of the opening.
By analyzing all games played on lichess.org over the past two months(~150 million), we can compare the popularity of an opening. A PGN (Portable Game Notation) is a plain text record of of both game metadata (date, player ELOs, winner, time control, etc) as well as the moves made in the game. Running the app against lichess.org's Oct and Nov databases against the opening 1. d4 d5 2. c4, we see the following:
Wow! A 40% relative increase from the pre-release October average to it's peak in mid November among players in the 800-1000 ELO range.
The large new player base has lead to an increase in the popularity of the King's Pawn Opening, one of the most common lines first learned by beginners
- Clone the repo.
- Download the full record of games for Oct, Nov from https://database.lichess.org/. Unzip the files to ./data
pip install -r requirements.txt
env\scripts\activate
python app.py
- Open http://127.0.0.1:5000/