Contrived position for perft

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Michael Sherwin
Posts: 3041
Joined: Fri May 26, 2006 1:00 am
Location: WY, USA
Full name: Michael Sherwin

Contrived position for perft

Post by Michael Sherwin » Sun Apr 21, 2019 3:10 am

Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?

Thanks
I hate if statements. Pawns demand if statements. Therefore I hate pawns.

User avatar
lucasart
Posts: 3041
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Contrived position for perft

Post by lucasart » Sun Apr 21, 2019 5:12 am

Michael Sherwin wrote:
Sun Apr 21, 2019 3:10 am
Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?

Thanks
nice one. pins are an important source of bugs. you should add more pins.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Michael Sherwin
Posts: 3041
Joined: Fri May 26, 2006 1:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Contrived position for perft

Post by Michael Sherwin » Sun Apr 21, 2019 6:29 am

lucasart wrote:
Sun Apr 21, 2019 5:12 am
Michael Sherwin wrote:
Sun Apr 21, 2019 3:10 am
Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?

Thanks
nice one. pins are an important source of bugs. you should add more pins.
Bed time, I will work on that tomorrow! :D
I hate if statements. Pawns demand if statements. Therefore I hate pawns.

JohnWoe
Posts: 99
Joined: Sat Mar 02, 2013 10:31 pm

Re: Contrived position for perft

Post by JohnWoe » Sun Apr 21, 2019 7:32 am

Sapeli says:

./sapeli -position fen r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R3K2R b KQkq c3 0 1 -perft 6
depth 0 nodes 1 mnps 0.000 time 0.000
depth 1 nodes 60 mnps 0.000 time 0.000
depth 2 nodes 2608 mnps 0.000 time 0.000
depth 3 nodes 113742 mnps 14.218 time 0.008
depth 4 nodes 4812099 mnps 13.256 time 0.363
depth 5 nodes 202902054 mnps 13.964 time 14.530
###
nodes 207830564 mnps 14.304 time 14.530

User avatar
lucasart
Posts: 3041
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Contrived position for perft

Post by lucasart » Sun Apr 21, 2019 7:55 am

Michael Sherwin wrote:
Sun Apr 21, 2019 6:29 am
lucasart wrote:
Sun Apr 21, 2019 5:12 am
Michael Sherwin wrote:
Sun Apr 21, 2019 3:10 am
Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?

Thanks
nice one. pins are an important source of bugs. you should add more pins.
Bed time, I will work on that tomorrow! :D
How aboud this?
[D] r6r/1bp2pP1/R2qkn2/1P6/1pPQ4/1B3N2/1B1P2p1/4K2R b KQ c3 0
It adds pins of the 2 possible kinds:
* the normal pin, where from->to causes self-check through the vacated from square.
* the en-passant special case, where from->to causes self-check, through the square vacated by the captured enemy pawn.

There is actually a third kind of pin, but that only happens in Chess960. It's when you can't castle, because the castling rook is pinned.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Volker Annuss
Posts: 173
Joined: Mon Sep 03, 2007 7:15 am

Re: Contrived position for perft

Post by Volker Annuss » Sun Apr 21, 2019 8:02 am

Michael Sherwin wrote:
Sun Apr 21, 2019 3:10 am
Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?

After Rxa1 Rxa1 you have rook on A1 that has already moved so castling is impossible. But no rook has ever moved away from A1.

elcabesa
Posts: 815
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Contrived position for perft

Post by elcabesa » Sun Apr 21, 2019 8:31 am

if my engine is not wrong those are the results:
1: 60
2: 2608
3: 113742
4: 4812099
5: 202902054
6: 8419356881

elcabesa
Posts: 815
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Contrived position for perft

Post by elcabesa » Sun Apr 21, 2019 8:37 am

another possibile source of problem is the interaction of "pin" and en passant. I think this is rare but it can happen.
here an example where en passant capture is forbidden (fxe3)

Maarten Claessens
Posts: 103
Joined: Mon May 12, 2014 8:08 am
Location: Near Nijmegen

Re: Contrived position for perft

Post by Maarten Claessens » Sun Apr 21, 2019 9:31 am

elcabesa wrote:
Sun Apr 21, 2019 8:31 am
if my engine is not wrong those are the results:
1: 60
2: 2608
3: 113742
4: 4812099
5: 202902054
6: 8419356881
Sorry, but your engine is wrong. Perft 2 of the position "r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R1R1K2R b KQkq c3 0 1"is 2659.
Nothing is unstable (Lawrence Krauss)

User avatar
lucasart
Posts: 3041
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Contrived position for perft

Post by lucasart » Sun Apr 21, 2019 10:25 am

Maarten Claessens wrote:
Sun Apr 21, 2019 9:31 am
elcabesa wrote:
Sun Apr 21, 2019 8:31 am
if my engine is not wrong those are the results:
1: 60
2: 2608
3: 113742
4: 4812099
5: 202902054
6: 8419356881
Sorry, but your engine is wrong. Perft 2 of the position "r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R1R1K2R b KQkq c3 0 1"is 2659.
Well if you mistype the FEN and search a different position...
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Post Reply