Contrived position for perft

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

Moderators: hgm, Rebel, chrisw

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

Contrived position for perft

Post by Michael Sherwin »

Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?
[d]r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R3K2R b KQkq c3 0 1
Thanks
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Contrived position for perft

Post by lucasart »

Michael Sherwin wrote: Sun Apr 21, 2019 5:10 am Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?
[d]r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R3K2R b KQkq c3 0 1
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: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Contrived position for perft

Post by Michael Sherwin »

lucasart wrote: Sun Apr 21, 2019 7:12 am
Michael Sherwin wrote: Sun Apr 21, 2019 5:10 am Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?
[d]r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R3K2R b KQkq c3 0 1
Thanks
nice one. pins are an important source of bugs. you should add more pins.
Bed time, I will work on that tomorrow! :D
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Contrived position for perft

Post by JohnWoe »

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: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Contrived position for perft

Post by lucasart »

Michael Sherwin wrote: Sun Apr 21, 2019 8:29 am
lucasart wrote: Sun Apr 21, 2019 7:12 am
Michael Sherwin wrote: Sun Apr 21, 2019 5:10 am Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?
[d]r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R3K2R b KQkq c3 0 1
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: 180
Joined: Mon Sep 03, 2007 9:15 am

Re: Contrived position for perft

Post by Volker Annuss »

Michael Sherwin wrote: Sun Apr 21, 2019 5:10 am Does it cover all the possibilities? Has someone done a better one already? Any suggested changes?
[d]r3k2r/1bp2pP1/5n2/1P1Q4/1pPq4/5N2/1B1P2p1/R1R1K2R b KQkq c3 0 1
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: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Contrived position for perft

Post by elcabesa »

if my engine is not wrong those are the results:
1: 60
2: 2608
3: 113742
4: 4812099
5: 202902054
6: 8419356881
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Contrived position for perft

Post by elcabesa »

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)
[d]8/K7/8/8/2Q1Pp1k/8/8/8 b - e3 0 1
Maarten Claessens
Posts: 106
Joined: Mon May 12, 2014 10:08 am
Location: Near Nijmegen

Re: Contrived position for perft

Post by Maarten Claessens »

elcabesa wrote: Sun Apr 21, 2019 10: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: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Contrived position for perft

Post by lucasart »

Maarten Claessens wrote: Sun Apr 21, 2019 11:31 am
elcabesa wrote: Sun Apr 21, 2019 10: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.