Writing the fastest move generator. Up to 4BNodes/s

Discussion of chess software programming and technical issues.

Moderator: Ras

chessbit
Posts: 32
Joined: Fri Dec 29, 2023 4:47 pm
Location: Belgium
Full name: thomas albert

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by chessbit »

After improving a bit, I ran some more numbers with multithreading and TT (2^28 entries):

Code: Select all

perft -d 9
Depth:          9
Nodes:          2439530234167
Time:           9942 ms
Average:        245355 Mn/s
perft -d 10
Depth:          10
Nodes:          69352859712417
Time:           146758 ms
Average:        472564 Mn/s
perft -d 11
Depth:          11
Nodes:          2097651003696806
Time:           2512451 ms
Average:        834902 Mn/s
I would be interested to know how the times compare with others?

I'm also curious how depth 14/15 were computed... I'm guessing a lot of resources were available that would not be feasible on a single machine? I know perft 15 was done with a GPU implementation, but even then it probably took several devices?
petero2
Posts: 729
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by petero2 »

chessbit wrote: Wed Sep 24, 2025 5:25 pm I'm also curious how depth 14/15 were computed... I'm guessing a lot of resources were available that would not be feasible on a single machine?
For perft 14, see viewtopic.php?p=508645#p508645 and viewtopic.php?p=508700#p508700

The computation used 3 quad-core computers and 2 8TB hard disk drives.

The computation was later verified as described here https://www.talkchess.com/viewtopic.php ... 11#p685611 and here https://www.talkchess.com/viewtopic.php ... 11#p682711
chessbit wrote: Wed Sep 24, 2025 5:25 pm I know perft 15 was done with a GPU implementation, but even then it probably took several devices?
The perft 15 computation is described here: https://www.talkchess.com/forum/viewtop ... 52#p729152
chessbit
Posts: 32
Joined: Fri Dec 29, 2023 4:47 pm
Location: Belgium
Full name: thomas albert

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by chessbit »

petero2 wrote: Wed Sep 24, 2025 7:46 pm
chessbit wrote: Wed Sep 24, 2025 5:25 pm I'm also curious how depth 14/15 were computed... I'm guessing a lot of resources were available that would not be feasible on a single machine?
For perft 14, see viewtopic.php?p=508645#p508645 and viewtopic.php?p=508700#p508700

The computation used 3 quad-core computers and 2 8TB hard disk drives.

The computation was later verified as described here https://www.talkchess.com/viewtopic.php ... 11#p685611 and here https://www.talkchess.com/viewtopic.php ... 11#p682711
chessbit wrote: Wed Sep 24, 2025 5:25 pm I know perft 15 was done with a GPU implementation, but even then it probably took several devices?
The perft 15 computation is described here: https://www.talkchess.com/forum/viewtop ... 52#p729152
Interesting, thanks. It took a lot more time to compute than I thought someone would care to do. What's up with the 8TB HDDs? How do you use this to your advantage to compute perft?
Also, how do my numbers compare to yours for the engine you used?
syzygy
Posts: 5722
Joined: Tue Feb 28, 2012 11:56 pm

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by syzygy »

chessbit wrote: Thu Sep 25, 2025 5:04 pmWhat's up with the 8TB HDDs? How do you use this to your advantage to compute perft?
As hashtable...
petero2
Posts: 729
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by petero2 »

chessbit wrote: Thu Sep 25, 2025 5:04 pm Also, how do my numbers compare to yours for the engine you used?
My program needs 18.630 seconds to compute perft 9 from the starting position on a 7950X3D 16-core CPU. The "gperftd" program mentioned in one of the links was around twice as fast on the old hardware available to me back then.
petero2
Posts: 729
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by petero2 »

chessbit wrote: Thu Sep 25, 2025 5:04 pm What's up with the 8TB HDDs? How do you use this to your advantage to compute perft?
The first part of the computation determined all positions that can be reached from the starting position by playing 11 half-moves, together with a count of how many move sequences lead to each position. The size of this data set is around 35TB uncompressed, so it has to be stored on disk.

To understand the algorithm used to compute this data set, I suggest studying the Wikipedia article on external sorting.
chessbit
Posts: 32
Joined: Fri Dec 29, 2023 4:47 pm
Location: Belgium
Full name: thomas albert

Re: Writing the fastest move generator. Up to 4BNodes/s

Post by chessbit »

petero2 wrote: Mon Sep 29, 2025 8:40 pm
chessbit wrote: Thu Sep 25, 2025 5:04 pm What's up with the 8TB HDDs? How do you use this to your advantage to compute perft?
The first part of the computation determined all positions that can be reached from the starting position by playing 11 half-moves, together with a count of how many move sequences lead to each position. The size of this data set is around 35TB uncompressed, so it has to be stored on disk.

To understand the algorithm used to compute this data set, I suggest studying the Wikipedia article on external sorting.
Thank you, will have a look!