So, assuming we have now two reference implementations that agree on the same numbers, there remain the open questions:
1.) Underpromotions: yes/no?
2.) "cperft" or a different name for the command, such that it would not be confused with a checking-moves perft that could be done in similar spirit?
Last edited by R. Tomasi on Sat Dec 18, 2021 5:15 pm, edited 1 time in total.
Here's my results for perft 4 and 5 if you want to verify it later. Sadly doing it like this is way too slow (barely 10m nodes/s), so anything more is out of reach for me.
Honestly though, i fail to see the usefulness of this. QSearch generators for most engines are way too different to be able to have some general testing method. For example, what about check evasions? My generator does generate all quiet moves, if in check. Everyone has a slightly different approach. Testing only captures with this "cperft" seems rather pointless.
Mergi wrote: ↑Sat Dec 18, 2021 5:38 pm
Here's my results for perft 4 and 5 if you want to verify it later. Sadly doing it like this is way too slow (barely 10m nodes/s), so anything more is out of reach for me.
Honestly though, i fail to see the usefulness of this. QSearch generators for most engines are way too different to be able to have some general testing method. For example, what about check evasions? My generator does generate all quiet moves, if in check. Everyone has a slightly different approach. Testing only captures with this "cperft" seems rather pointless.
FWIW our numbers agree. I'll let others decide usefulness or not. Having a table with these numbers would have helped me quite a bit when writing my movegen.
Mergi wrote: ↑Sat Dec 18, 2021 5:38 pmFor example, what about check evasions?
Since that should also be part of main search, regular perft covers that aspect. That's also why I don't really see the need for a checkperft. Without checkperft, we could stay with cperft for the capture / QS test.
Mergi wrote: ↑Sat Dec 18, 2021 5:38 pmFor example, what about check evasions?
Since that should also be part of main search, regular perft covers that aspect. That's also why I don't really see the need for a checkperft. Without checkperft, we could stay with cperft for the capture / QS test.
But what you want to do with cperft is also done for the most part in regular perft as well. Captures are already displayed on the chess wiki for most positions. The only differene is that in cperft you add to it non-capture queen promotions, which you cannot infer from the wiki (non-capture promotions are not distinguishable in the tables there).
If you want to test only your very specific qsearch generator, all you have to do is first explore that position with your normal movegen, enumerate all the captures, promotions and non-capture promotions, and then explore the same position with the specialized movegen and compare the numbers.
It only way this would kind of make sense to me is if you didn't stop in ply + 1, but instead explored all the captures and promotions fully.