Chess - Play & Learn


FREE - In Google Play

FREE - in Win Phone Store


ChessAnalysis - reaching beta state of development

Mar 13, 2010, 8:46 AM 10

As I mentioned earlier in a forum topic I'm working on a chess analyse program, which can be used for several purposes like automatically analyse games for best computer moves or blunders. Now here are the first screen shots and a small feature description of the new program:
ChessAnalyse 1.0 - Start of analysis - retouched

As an example, I analysed a pgn file downloaded from chess.com (names of the players are retouched), containing one game. Of course it is possible to analyse pgn files containing more than one game, too.

There are some parameters you can set up:
The name of the file to analyse has to be specified. Somebody suggested to extend the program for analysing complete folders containing more than one pgn files. - may be this will be implemented in a future version.
As a second necessary parameter the path and program name for the uci chess engine program has to be specified. I tested with Firebird 1.0 beta. In principle any uci chess engine program could be used (for example schredder12uci, toga, etc.). At last the path and name for the output csv file has to be given. The remaining parameters can be left on their default values:
In the example above, only moves of a certain player (playing white in this game) have been analysed. The program automatically detects, whether the player to be analysed plays black or white in the games and analyses only the relevant moves. Furthermore you can chose to analyse only move numbers greater than a certain full-move-number or/and less than a certain full-move-number. This is especially useful, if you don't want to analyse opening moves. In the example above, only moves with move numbers greater than or equal to 10 are analysed. With the lines # - parameter you can let the chess engine analyse the 3 (default) or more best moves for each position (provided the uci engine supports multi pv mode). This is especially useful, if you want to compare the moves of a game with computer moves (cheating analysis, etc.). With the seconds per move parameter you can setup the time, the chess engine will calculate each position (default is 30 sec). The "analyse actual moves" parameter give you an extra analysis for moves which are not among the best three (or more) moves already analysed for each position. This is necessary for blunder detection or if you would like a simple performance check of your game. The "blunder threshold" parameter lets you specify the minimal difference in position evaluation (in pawn units), when a move should be considered a blunder move. For example you can set this parameter to 0.5 - every move which worsens the position for at least 0.5 points is considered a blunder.

During the analysis phase the result for each analysed position is written to the program window, containing the following informations (separated by colons):
number of game; name of player; color (w=white or b=black); full-move-number;  best move; score of best move; second best move; score of second best move; ...; actual move; score of actual move; hit #
The last information of each line is a number between 1 and lines# + 1. For example, if lines# is set to default value of 3,  1=actual move is equal to best computer move, 2=actual move is equal to second best computer move,..., 4=actual move is some different move.

After some time (mainly determined by the number of moves to analyse and the parameter "seconds per move") the engine is stopped and the output file is written:
ChessAnalyse1.0 - end of analyse - retouched

On the screen the hit rate in percent is displayed.

Now, finally, let's take a look at the output csv file:
ChessAnalyse1.0 - output csv - retouched

The output file essentially contains the same information as the screen output. Additionally the FEN position is added in the last column. If you open the csv file with excel, you can easily do some things like visualize the score evaluation process, or do some cheating or blunder analysis:
ChessAnalyse1.0 - diagram of csv output

Online Now