first I see, that your Perft results are not at all bad.
No, I say legal move generators make it go faster because you do not have to make the moves on the last ply, ...
Let me mention, how my Perft might differ from yours:
a) (+) not expanding leaf nodes at the bottom of the tree
b) (-) instead of a) the legality of all moves is guaranted (at comparable costs)
c) (-) use of some slower 64 bit counters, (7 counters in total)
d) (-) the moves know, whether they are captures, check threats (-), matings (--), etc ...
e) (-) supplying the moves with a combination of MVV/LVA and positional preevaluation to make the movelist sortable, simultaneously handling detected predefined killer or optimal moves
f) (-) building up a complex statistic on that information from d)
g) (-) using unchanged DoMove and Remove functions which are updating material balance, hash address (32 bit) and verification key (32 bit), e.p. and castling rights, reordering two double linked piece lists, etc. ...
h) (-) a higher abstraction level (handling of 8x8 and 10x8 boards, Fischer castlings / FRC)
i) (-) principially handling two more piece types (archbishop and chancellor at several program places)
j) (-) using C++ language only, no parts rewritten in assembler
If I would be interested in a kind of Perft "cheating", there would be a lot of points, where I could "optimize". But I use Perft simply as an instrument of verification, and for that it is really usable. Especially splitting up the results into a statistic has helped me a lot in localizating some silly errors within my move generator. It would help others a lot, if they would also create and publish such statistics on some well known starting positions. I can recommend warmly the following one:
- Code: Select all
FEN: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25
+-*--b--c--d--*--f--g--*-+ Perft Testseries
8 |[r]::: :::[k]::: [r]|
7 |[p] [p][p][q][p][b] | (without caching)
6 |[b][n] :::[p][n][p]:::|
5 |::: :::<P><N> ::: | Test #: 01
4 | [p] :::<P>::: :::|
3 |::: <N> :::<Q>:::[p]| Break Time 75 Sec.
2 |<P><P><P><B><B><P><P><P>|
1 |<R> ::: <K> :::<R>|
=>+-*--b--c--d--*--f--g--*-+
Ply Nodes all (x) (e.p.) all (+) (#) Promot. Castl. Sec.
-------------------------------------------------------------------------------
1 48 8 0 0 0 0 2 0
2 2039 351 1 3 0 0 91 0
3 97862 17102 45 993 1 0 3162 0
4 4085603 757163 1929 25523 43 15172 128013 0
5 193690690 35043416 73365 3309887 30171 8392 4993637 10
6 8031647685 1558445089 3577504 92238050 360003 56627920 184513607 420
-------------------------------------------------------------------------------
Regards, Reinhard