checkperft was about generating checks only, not check-evasions. But honestly, I'm fine staying with cperft for the capture/QS test. I don't see support for something like a checkperft gaining much traction...
We need to scrap Perft()
Moderator: Ras
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
Well, the problem with that is: assume you get numbers differing from the reference. How do you go about debugging that then? The difference might happen like 10ply down from the leaf...
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: We need to scrap Perft()
Could somebody post a table with the new cperft() ?
Now we said non recrsive leaf nodes - or fully recursive leaf nodes?
I would be happier to see them fully recursive since that is more in engine style.
But only pending captures and pending promotions.
Code: Select all
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [0] = ?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [1] = ?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [2] = ?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [3] = ?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [4] = ?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [5] = ?
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [0] = ?
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [1] = ?
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [2] = ?
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [3] = ?
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [4] = ?
I would be happier to see them fully recursive since that is more in engine style.
But only pending captures and pending promotions.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: We need to scrap Perft()
That would be bad because it would lead to QS explosion - and unlike perft where you have strict control over the recursion depth, recursive QS would explode in many positions due to plunder raids. That's why in real engine QS, you need to combat this problem e.g. by a recapture-on-same-square mode from a certain QS depth on.dangi12012 wrote: ↑Sun Dec 19, 2021 9:07 pmI would be happier to see them fully recursive since that is more in engine style.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
See my posts. I posted results for the starting pos and for kiwi-pete. It was done with only one ply-depth capture and excluding any underpromotions.dangi12012 wrote: ↑Sun Dec 19, 2021 9:07 pm Could somebody post a table with the new cperft() ?
Now we said non recrsive leaf nodes - or fully recursive leaf nodes?Code: Select all
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [0] = ? rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [1] = ? rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [2] = ? rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [3] = ? rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [4] = ? rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 [5] = ? r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [0] = ? r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [1] = ? r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [2] = ? r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [3] = ? r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - [4] = ?
I would be happier to see them fully recursive since that is more in engine style.
But only pending captures and pending promotions.
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: We need to scrap Perft()
I get different results for Kiwipete (r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1):
cperft 0: 8
cperft 1: 351
cperft 2: 17102
cperft 3: 753124
cperft 4: 35043030
My suspicion is that leaf underpromotions that also happen to be captures are counted in Mergi's implementation, but they shouldn't be counted:
If I modify my move gen to also include underpromotions that are captures, then I get 758998 for cperft 3, but as you said above, no underpromotions at all in the leaf nodes.Mergi wrote: ↑Sat Dec 18, 2021 5:24 pmCode: Select all
if (board.CapturedPiece() || GetMoveType(m) == PROMOTE_QUEEN) { ++total_nodes; }
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
Underpromotions shouldn't be counted in my implementation - I actually double checked to be sure about that, but of course it's possible that I still f*cked up. Unfortunately I am not home currently and can't access my code from here - I'll have to wait till after the x-mas holidays to check again.Ras wrote: ↑Wed Dec 22, 2021 4:19 pmI get different results for Kiwipete (r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1):
cperft 0: 8
cperft 1: 351
cperft 2: 17102
cperft 3: 753124
cperft 4: 35043030
My suspicion is that leaf underpromotions that also happen to be captures are counted in Mergi's implementation, but they shouldn't be counted:If I modify my move gen to also include underpromotions that are captures, then I get 758998 for cperft 3, but as you said above, no underpromotions at all in the leaf nodes.Mergi wrote: ↑Sat Dec 18, 2021 5:24 pmCode: Select all
if (board.CapturedPiece() || GetMoveType(m) == PROMOTE_QUEEN) { ++total_nodes; }
-
- Posts: 127
- Joined: Sat Aug 21, 2021 9:55 pm
- Full name: Jen
Re: We need to scrap Perft()
Ras wrote: ↑Wed Dec 22, 2021 4:19 pm My suspicion is that leaf underpromotions that also happen to be captures are counted in Mergi's implementation, but they shouldn't be counted:Mergi wrote: ↑Sat Dec 18, 2021 5:24 pmCode: Select all
if (board.CapturedPiece() || GetMoveType(m) == PROMOTE_QUEEN) { ++total_nodes; }

You are absolutely right.