PgnScanner
Last version:
0.80
(+ accbook.dll v1.2)

 

  • accbook.dll enables your engine to read PgnScanner books

  • Please see "help" command for more information.

  • Please report any bug, question or comment here

 

Download 

Last updates

  • fixed and improved DBL command (doubles detection)
  • added "reverse" parameter to the CUT command in order to cut a line starting from the end
  • added the SUB command in order to substract games from a PGN file
  • fixed scan "BestPerf" parameter that was only reading elo field calculated by the RunElo option

 

 

Presentation

PgnScanner is a console mode tool that can process PGN files. It can read chess games and interpret the content of the included textual comments in order to extract some useful informations. If the used format is not too specific, the data of time, depth and evaluation generated by chess engines can be recognized. PgnScanner can also make some recognitions and detections on each position of the analyzed game. When a game is matching one of the selection's criteria, it can be saved in a EPD or PGN file. PgnScanner can also calculate the players elo ratings and rebuild tournaments grid in text or html format (except swiss tournament).
accbook.dll is a Windows dynamic library that allows your engine to read pgnscanner's books by adding less than 10 lines in your program. PgnScanner and accbook.dll are provided as free without guarantee of any kind.

 

 

Main features

  • processing of PGN games file's fields

  • selection of games according to PGN-fields

  • PGN files merging

  • powerful book generation and managment for your own engine

  • book auto-analyzing with an external UCI engine

  • position search according to criteria

  • scan and detection of games or positions matching some specified criteria

  • elo auto-calculation

  • tournament rebuilding

  • possibility to access a generated book directly from your chess engine with the provided dll "accbook.dll"

  • pgnscanner is "batchable" which means that several internal commands can be passed as arguments and launched in a row

  • cuts and split lines and sublines

 

Detection's criteria

PgnScanner is based on the PgnScanner.ini file in order to apply some games detection's criteria. So you can activate or not these criteria or modify the type of ouput (EPD or PGN) using this file.
A criterion is present in the form of:
 

criterionName : act=1 ,epd=1 ,pgn=0 ,shb=0 ,val=300 ,mnv=-50 ,mxv=200 ,moc=1 ,name=Drop of value

act = 1 : means that the criteria is activated (0 if not).
epd = 1 : means that  the position will be stored in the epdfound.epd file if detected (0 if not)

pgn = 1 : means that the game will be stored in the pgnfound.pgn file if detected (0 if not)

val = n : set the value 'n' for the criteria

shb = 1 : show the board if detected (0 if not)

mnv = n1 : minimal window value for some criteria

mxv = n2 : maximum window value for certain criteria

moc = x : maximum occurency for the current game

name = string : criterion's name

 

Please, see the pgnscanner.ini file for up to date informations about the criteria

 
ValDrop

Position having an evaluation included in the interval [ mnv, mxv ] and which suddenly falls of at least "Val" points after the following move. The evaluation must be valid and the time used higher than 0. The opponent's evaluation must confirm the fall. Other requirements are also needed...

ValJump

Position which goes up suddenly of "val" points into the interval [mnv, mxv] . Other conditions must also be met...

Diamond

Position with a pawns pattern such as for example: b2-a3-c3-b4 (enough rare)

Pawn1x3

Position with a pawns pattern such as for example: b2-b3-b4

Pawn1x4

Position with a pawns pattern such as for example: b2-b3-b4-b5 (ever met...)

Pawn2x2

Position with a pawns pattern such as for example: b2-c2-b3-c3

PawnStorm

Position with at least 3 passed pawns storming in the enemy side

CrazyKing

Position where a king is venturing dangerously towards the center or the enemy camp whereas it remains much pieces

ExceedingPc

Position where a side has an unusual number of pieces such as for example: 2 queens, 3 bishops, 3 rooks...

AbnormalTerm

Game apparently lost on time according to PgnScanner's criteria

DepthDrop

Sudden fall of at least 4 plies in the search according to one of the engines. Other requirements are also needed

LowDepth

Really low depth (< = 5 levels) reached by one of the engines. The search time must be higher than zero. Other requirements are also needed

Confusion

Interesting positions where PgnScanner has detected a high degree of confusion. White and Black's pieces are then relatively dispersed and are often in the enemy side what gives complex positions with high levels of attack.

MatEvalBug

Bug of evaluation of the announced checkmate. For example "55.Ng3 {+M3 } Ke8 {+M3 }" indicates that one of the engines was probably mistaken in sign, even if it is theoretically possible to adopt a notation's system where the sign depends on the color and either on the engine.
The bugs of depths are also noticed. For example "55.Bg2 {+M4 } Nh4 {-M3 } 56.Ra8 {+M9 }" indicates an error because one of the engines announces checkmate in 4 moves and later checkmate in 9 moves which is illogical.

VeryShortGame

Detection of very short games

VeryLongGame

Detection of really long games

SuspOpening

Games where the two engines leave the opening with an evaluation out of the interval ]mnv;mxv[ during at least 4 full moves. These openings must be considered as doubtful and can be verified by an expert engine in order to improve an opening's book

BestPerf

Games where the weakest player (diff. elo < val) succeded in wining or drawing (val + 100)

TooFewMoves

Games with too few moves recorded. Possible engine's crash.

OppCastles

Games with opposite castles

MvWeakCastle

Pawn's move weakening the castle

 

 

Commands

 

Please type 'help' in command line to get informations about the last implemented commands.

 

anabk ... analyze the current book and evaluate (external engine) or save specified positions

board ... show the current board

bye ..... close PgnScanner

cmem .... increase comment's buffers for each move

cut ..... cut all games after a given ply

dbl ..... detect the absolute or 'positional' doubles

dcmbk ... erase all the auto-calculated comments of the loaded book

ddepd ... delete the double (and more) positions of an EPD-file

debug ... show a game of the open pgn-file after a given ply

delete .. delete some games from a pgn-file

instxt .. insert a string in a pgn-tag of all games of the loaded pgn-file

elo ..... calculate the ratings of all players of the loaded pgn-file

fepd .... find games which match specified positions of an epd-file

ftrn .... reconstruct all tournament grids of a pgn-file (except swiss-tournament)

givelo .. calculate an elo and set the elo-fields of every pgn game

lang .... set the used language, especially for this help book

merge ... merge all pgn-files included in a directory.

newbk ... massively create an internal book

open .... open a pgn-file

openbk .. open a PgnScanner's book

r/recall list the last 6 entered different commands, even after a restart

reptxt .. replace a tag-value by another one

salut ... close pgnscanner

scan .... run the global detection process according to active criteria of the pgnscanner.ini

select .. select some games from a pgn-file according to pgn-tag (elo,result..)

setcap .. upcase or lowcase a tag-value or only the first character of each word

setcmt .. set comment's type used when games are saved or printed. Can remove comments

show .... show a game from the loaded pgn-file

showbk .. navigate into the generated book

split ... split all the sub-lines of a PGN and store them into a new file as full games.

sub ..... remove the games contained in a specified file from the current loaded pgn-file

syn ..... create a synthesis of the tournament(s) saved in the open pgn-file

tag ..... show all known standard pgn-tag

verbose . set verbose mode to get more informations

 

 

Examples

 

Extracting all the games played by crusher from the file megatournoi.pgn:

open megatournoi.pgn

select white crusher or black crusher

 

Extracting all the games lost by big looser 0.0 from the file megatournoi.pgn

open megatournoi.pgn

select white "big looser 0.0" and result 0-1

select black "big looser 0.0" and result 1-0

 

Scanning a PGN file and selecting position/games according to criteria activated in the file pgnscanner.ini

open megatournoi.pgn

scan -log

 

Merging all the PGN files included in a directory

merge c:\repertoire

 

Launching several internal commands in a row

c:\pgnscan.exe open mygames.pgn ftrn -out=tournaments.html

 

 

Bugs report

 

Do not hesitate to contact me if you find bugs and abnormal behaviors or if you need extra informations. Any interesting idea of evolution is also welcome and can be possibly implemented in the next release

bal[ AT ]transversale.fr

You can also help to correct the poor english translation of these pages or of the help.man file  ;-).