Git Product home page Git Product logo

python-chess-analysis's Introduction

python-chess-analysis

The objective of this program is to generate an in depth game analysis

In addition to engine centipawn evaluations this program also provides metrics related to:

  1. Material: Delta between sum of piece values for white and black
  2. Development: Delta between the number of pieces (not pawns) no longer on their starting squares
  3. Mobility: Delta between the number of total legal moves
  4. Control: Delta between the number of squares controlled by both sides. This is associated with SPACE.
  5. Tension (pressure): Delta between the number of attacking pieces for both sides
  6. King safety: A weighted king tropism using the simple Chebyshev distance as the max of the distance of the ranks or the files weighted based on piece values

The program identifies innaccuracies, mistakes and blunders based on the engine evaluation cp deltas and also indicates which side played a higher quality game overall based on the relative number of inaccuracies, mistakes, and blunders.

This early code assumes the PGN contains one game

NOTE: This code relies on the python-chess library. You need to install the python-chess package.

In the first block of the notebook your will find a number of variables that you can tinker with

Be sure to modify the path to your project folder, the path to your engine, your engine file name, and the pgn file name. Also be sure to modify TOTALTIME that is your desired analysis time in minutes. The program will convert this into an analysis time per move in milliseconds.

python-chess-analysis's People

Contributors

cja000 avatar mptedesco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.