All Projects → CYHSM → Chess Surprise Analysis

CYHSM / Chess Surprise Analysis

Licence: mit
Find surprising moves in chess games

Projects that are alternatives of or similar to Chess Surprise Analysis

Tensorflow Ml Nlp
텐서플로우와 머신러닝으로 시작하는 자연어처리(로지스틱회귀부터 트랜스포머 챗봇까지)
Stars: ✭ 176 (-1.12%)
Mutual labels:  jupyter-notebook
Notebook
📒 notebook
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Domainadaptivereid
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Advance Bayesian Modelling With Pymc3
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Ocaml Jupyter
An OCaml kernel for Jupyter (IPython) notebook
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Tensorflow2 Docs Zh
TF2.0 / TensorFlow 2.0 / TensorFlow2.0 官方文档中文版
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Egg
EGG: Emergence of lanGuage in Games
Stars: ✭ 175 (-1.69%)
Mutual labels:  jupyter-notebook
Lstm anomaly thesis
Anomaly detection for temporal data using LSTMs
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Unet In Tensorflow
U-Net implementation in Tensorflow
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Autofeat
Linear Prediction Model with Automated Feature Engineering and Selection Capabilities
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Super resolution with cnns and gans
Image Super-Resolution Using SRCNN, DRRN, SRGAN, CGAN in Pytorch
Stars: ✭ 176 (-1.12%)
Mutual labels:  jupyter-notebook
Ethereum demo
This is the code for "Ethereum Explained" by Siraj Raval on Youtube
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Kdd 2019 Hands On
DGL tutorial in KDD 2019
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Tamburetei
Fazendo de tamburete as cadeiras de [email protected]
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Lede Algorithms
Algorithms course materials for the Lede program at Columbia Journalism School
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Ppnp
PPNP & APPNP models from "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019)
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Julia Tutorial
高速でJuliaを学ぶ入門チュートリアル
Stars: ✭ 176 (-1.12%)
Mutual labels:  jupyter-notebook
Python data science and machine learning bootcamp
Jupyter notebook for Udemy course: Python data science and machine learning bootcamp
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook
Catdcgan
A DCGAN that generate Cat pictures 🐱‍💻
Stars: ✭ 177 (-0.56%)
Mutual labels:  jupyter-notebook
Deeplearninglifesciences
Example code from the book "Deep Learning for the Life Sciences"
Stars: ✭ 178 (+0%)
Mutual labels:  jupyter-notebook

Build Status license py35 status

Update on Lichess bullet marathon

Unrelated to surprising moves, but related to chess evaluations: Magnus Carlsen vs. Alireza Firouzja

Update on Alpha Zero

All reanalysis of the Alpha Zero vs. Stockfish games can now be found here

The -What The Hell- Moment

When looking at specific chess games from grandmasters there sometimes comes a point in the game where a lot of people wonder about a horrible looking move (mostly a sacrifice of a high valued piece) and why it was played this way.

Analysing these games with an engine (usually) reveals the genius behind these moves and the advantage this move offers, but from the engine's perspective this move was not surprising at all.

This repository implements a Surprise Analysis of Chess Games. The key concept is to compare the evaluations of a chess engine in low depths with the evaluation at high depths, with the idea that a low depth engine may represent a naive observer of the game. It uses the open-source engine Stockfish in combination with the python-chess library.

Example Usage

# Load Game from PGN
path_to_pgn = 'wei_yi_bruzon_batista_2015.pgn'
chess_game = csa.load_game_from_pgn(path_to_pgn)
# Evaluate Game
cp, nodes = csa.evaluate_game(chess_game, bln_reset_engine=True,
                              halfmove_numbers=None, depths=range(1, 35),
                              verbose=1, async_callback=True)
# Save cp
csa.save_evaluation(cp, nodes, depths, True,
                    True, 'wei_yi_bruzon_batista_2015')
# Plot heatmap
csa.plot_cp(cp, fn='wei_yi_bruzon_batista_2015.svg', save=True)

# Find surprising moves
ss_df, infos = csa.analyse_evaluations(cp, low=12, high=22)

Example 1

I evaluated Garry Kasparov's immortal game against Veselin Topalov until depth 32. In this game Kasparov was trailing a bit and in the following position Kasparov decided to go play Rxd4.

Here is a heatmap showing the centipawn evaluation until depth 32. The y-axis has increasing depth values from bottom to top and the x-axis contains the halfmove numbers from left to right. Colors represent the truncated evaluation in centipawns. Surprising moves are characterised as having a different evaluation for low depths in relation to high depths (see blue parts down and red top, around move 48).

Example 2

The game of Wei Yi playing against Bruzon Batista in 2015. See red parts on top after move 41.

Limitations

  • Using a synchronous calculating approach for each depth will lead to continuous evaluations but with a worse run-time. It can also lead to a high variance in the evaluations at depths < 10.

  • Using an asynchronous approach where missing evaluations are filled with the values before and after makes the evaluation much faster. Also missing evaluations are unlikely at depths > 10.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].