Hi, I've been testing my chess engine's move generation by using perft. I have a problem with my move generation in the results that I'm getting, my engine is printing out numbers such as:
Depth: 5
Total Nodes: 4,865,609
Captures: 84,071
E.P: 258
Depth 6
Total Nodes: 119,060,324
Captures: 2,890,831
E.P: 5,506
If you look at the correct values (http://chessprogramming.wikispaces.com/Perft+Results), then you will see that in both cases, my engine got the total number of nodes correct. But, except in the case of the en passant number on depth 5, it is over counting the number of captures and en passant. This leads me to believe that my overall move generation function is working correctly, except that some moves are being flagged as captures or en passant when they shouldn't be. Up until now I've been using stockfish at the command line to give me a perft count. But stockfish only gives me a total number of nodes, and not captures/e.p. Can anyone recommend a good engine to use that gives perft counts with info about #of captures, etc.?
Perft and Captures
-
- Posts: 616
- Joined: Thu May 19, 2011 1:35 am
Re: Perft and Captures
I do not know of any perft programs that provide this data.
I glanced over the code of:
frcperft-1.0
hgmperft
iperft
oliperft
q2perft
qperft
and I could see places where promotion, e.p. etc. are checked but not separately counted. You could probably add in code to do that.
I glanced over the code of:
frcperft-1.0
hgmperft
iperft
oliperft
q2perft
qperft
and I could see places where promotion, e.p. etc. are checked but not separately counted. You could probably add in code to do that.
Re: Perft and Captures
Maybe this could help a little bit: http://10x8.net/chess/PerfT.html
Re: Perft and Captures
The capture counts in those 'standard' perft results only count the captures of leaf nodes, including en passant captures.
-
- Posts: 1242
- Joined: Thu Jun 10, 2010 2:13 am
- Real Name: Bob Hyatt (Robert M. Hyatt)
- Location: University of Alabama at Birmingham
- Contact:
Re: Perft and Captures
If you sum them it should give you the right answer.zie-iuk wrote:The capture counts in those 'standard' perft results only count the captures of leaf nodes, including en passant captures.
IE captures for perft1 + captures for perft2 should include all the ply1 and ply2 captures, and not duplicate any.