Strange Perft And Divide

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Arash

Strange Perft And Divide

Post by Arash »

Hi all,

At this position :
[D]rnbq2nr/ppppkppp/4p3/3P4/1B6/8/PPP1PPPP/R1NQKBNR b KQ - 0 1

My engine "ARChess" calculates:
Perft 2 = 122
And Divide 2 :
e7f6 - 32
e7e8 - 32
c7c5 - 29
d7d6 - 29


But Crafty 2.14 calculates:
Perft 2 = 123
And after executing each possible move it calculates Perft 1 as:

e7f6 --> 32
e7e8 --> 32
c7c5 --> 29
d7d6 --> 29

which sums to 122



I also tested with ROCE and MEDIOCRE
which they calculate Divide 2 as:

e7e8 32
e7f6 32
c7c5 30 <----
d7d6 29

But after executing the c7c5 move they calculate Divide 1 and Perft 1 as 29


What is your Perft for the given position?

Best Regards,
Arash Panahi Rad
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: Strange Perft And Divide

Post by Robert Pope »

It's 123. After c7c5, there is an en passant capture possible.

I tested c7c5 on Crafty 20.14 and got the correct 30 moves, so I'm not sure where you are going wrong with Crafty. Are you actually making the move c7c5, or are you pasting the resulting fen into the programs?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Strange Perft And Divide

Post by sje »

Code: Select all

&#91;&#93; sfen rnbq2nr/ppppkppp/4p3/3P4/1B6/8/PPP1PPPP/R1NQKBNR b KQ - 0 1 
&#91;&#93; scf tren
&#91;&#93; emp 2
Ke8 32
Kf6 32
c5 30
d6 29
Pathway count to depth two&#58; 123
&#91;&#93; 
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Strange Perft And Divide

Post by bob »

are you using FEN to set up the position after each of those moves? If so, are you certain you are entering the EP target square correctly?
Arash

Re: Strange Perft And Divide

Post by Arash »

Hi,
Thanks for replies,

I found the problem:
I pasted the fen string and because I had a bug in my new check evasion function, then I got a wrong fen with bad en passant square.

Best Regards,
Arash Panahi Rad