|
|
Introduction
The perft function can be used to test the move generator. If exactly the number of moves is generated as is done by other engines, from several different test positions, it is quite likely the implementation is correct.
To have similar and general functionality for the search and evaluation algorithms, we decided to dump data into PGN files using recursive annotated variations (RAV), which are just game variations between parentheses. This makes it possible to manually inspect all positions that Gray Matter examined (some positions might be pruned). External tools can be used (or developed) to compare for different chess engines. These tools could, for example, find the greatest differences in evaluations, so the programmer could concentrate on these first. The evaluation of a position is written as a comment (between {}) after the last played move, and for the initial position -described by the fen string- in the evaluation tag in the header. After each move, the evaluation is specified as v="<eval>", such that we can easily add some other key/values if we want to later.
PGN format for a game tree with node evaluation
[Event "Test"]
[Date "<timestamp>"]
[White "Jonne Zutt"]
[Black "Gray Matter svn r1400"]
[Result "*"]
[fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[dump_depth "3"]
[evaluation "+0.40"]
1.e4 {v="+0.40"} e5 {v="+0.40"} 2.Nf3 {v="+0.40"} Nc6 {v="+0.40"} 3.d4 {v="+0.40"}
( 3.Nc3 {v="+0.40"} Nf6 {v="+0.40"} 4.Bb5 {v="+0.40"}
( 4.d4 {v="+0.40"} exd4 {v="+0.40"} 5.Nxd4 {v="+0.40"} Nxd4 {v="+0.40"} 6.Qxd4 {v="+0.40"} )
( 4.Bc4 {v="+0.40"} Bc5 {v="+0.40"} 5.d3 {v="+0.40"} d6 {v="+0.40"} )
4...a6 {v="+0.40"} 5.Bxc6 {v="+0.40"} dxc6 {v="+0.40"} )
3...exd4 {v="+0.40"} 4.Nxd4 {v="+0.40"} Nf6 {v="+0.40"} *
Old unused idea to use XML format
<?xml version="1.0" encoding="UTF-8"?>
<searchdump timestamp="06 Apr 2008, 16:30"
fen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
depth="3">
<engine name="Gray Matter"
version="svn r1400"/>
<position eval="+0.40">
<node move="e4" eval="+0.40">
<node move="e5" eval="+0.40">
<leaf move="Pf3" eval="+0.40"/>
<leaf move="a3" eval="+0.01"/>
</node>
<node move="a6" eval="+0.45">
<leaf move="d4" eval="+0.45"/>
<leaf move="a3" eval="+0.10"/>
</node>
</node>
<node move="a4" eval="-0.10">
<node move="e5" eval="-0.10">
<leaf move="a5" eval="-0.30"/>
<leaf move="e4" eval="-0.10"/>
</node>
</node>
</position>
alternative:
<position eval="+0.40" nrmoves="11" nrpruned="9">
<node move="e4">
<position eval="+0.40" nrmoves="11">
</position>
</node>
<node move="a4">
</node>
</position>
</searchdump>
Sign in to add a comment
