Perft and Captures

Code, algorithms, languages, construction...
Post Reply
CDaley11
Posts: 42
Joined: Thu Jan 10, 2013 6:23 am
Real Name: Christian Daley

Perft and Captures

Post by CDaley11 » Thu Jan 24, 2013 2:20 am

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.?

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Perft and Captures

Post by User923005 » Thu Jan 24, 2013 6:04 am

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.

Octopus

Re: Perft and Captures

Post by Octopus » Thu Jan 24, 2013 9:33 am

Maybe this could help a little bit: http://10x8.net/chess/PerfT.html

zie-iuk
Posts: 1
Joined: Tue Aug 06, 2013 6:15 am

Re: Perft and Captures

Post by zie-iuk » Tue Aug 06, 2013 6:22 am

The capture counts in those 'standard' perft results only count the captures of leaf nodes, including en passant captures.

hyatt
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

Post by hyatt » Tue Aug 06, 2013 5:02 pm

zie-iuk wrote:The capture counts in those 'standard' perft results only count the captures of leaf nodes, including en passant captures.
If you sum them it should give you the right answer.

IE captures for perft1 + captures for perft2 should include all the ply1 and ply2 captures, and not duplicate any.

Post Reply