SF branching factor

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

Moderator: Ras

Werewolf
Posts: 2019
Joined: Thu Sep 18, 2008 10:24 pm

Re: SF branching factor

Post by Werewolf »

Jouni wrote: Thu Dec 08, 2022 3:09 pm But how to explain this from pro deo forum!?

The test was run with the Stockfish bench mark command for Stockfish 15.

bench 1024 32 26 default depth nnue - Threadripper
bench 1024 8 26 default depth nnue - $1500 Laptop.


Theadripper Results.
NPS = 21,956,331

$1500 Laptop Results.
NPS = 13,699,948

The Threadripper is 1.6x faster in NPS. If your conclusion is the Threadripper is the faster computer running Stockfish. You would be dead wrong.

Solve time to complete the benchmark.

$1500 Laptop Total Solve Time Results.
Total Time (ms) 110,731

Threadripper Total Solve Time Results.
Total Time (ms) 199,936

The $1500 Laptop is 1.8x faster in completing the benchmark test.
Can we double-check this just to be sure?
What command was used exactly? Also let's try with SF 15.1 to get an up to date result.

I can tell you Threadripper is better than a laptop at solving tactical exercises and SF Cluster is better again.
If the issue is that as cores go up efficiency goes down...well of course...but if the claim is that overall performance can go down that's a disaster.
Werewolf
Posts: 2019
Joined: Thu Sep 18, 2008 10:24 pm

Re: SF branching factor

Post by Werewolf »

Jouni wrote: Thu Dec 08, 2022 3:09 pm But how to explain this from pro deo forum!?

The test was run with the Stockfish bench mark command for Stockfish 15.

bench 1024 32 26 default depth nnue - Threadripper
bench 1024 8 26 default depth nnue - $1500 Laptop.


Theadripper Results.
NPS = 21,956,331

$1500 Laptop Results.
NPS = 13,699,948

The Threadripper is 1.6x faster in NPS. If your conclusion is the Threadripper is the faster computer running Stockfish. You would be dead wrong.

Solve time to complete the benchmark.

$1500 Laptop Total Solve Time Results.
Total Time (ms) 110,731

Threadripper Total Solve Time Results.
Total Time (ms) 199,936

The $1500 Laptop is 1.8x faster in completing the benchmark test.
OK, I think this test is measuring time to depth, correct?
If so, it doesn't necessarily follow that because more threads take longer to reach depth 26, therefore the laptop is the "winner". Becuase depth 26 on the threadripper may mean a wider and better search.
Alex64
Posts: 10
Joined: Fri May 15, 2020 7:54 pm
Full name: Alex Toma

Re: SF branching factor

Post by Alex64 »

I think at the end of the day what it matters is the quality of the analysis.
For SF old versions (which run also on old computers) a rule of thumb was that reaching a depth = 30 would be approx. as a strong GM's move.
Since both hardware and engines evolved so much, I am not sure where we stand now on that rule.
Let's say in 20 seconds the $1500 laptop reaches the depth 26, while the threadripper is still at depth 24. The huge difference in power of calculation must count for something. I believe that the quality of the analysis of the threadripper in same amount of time should be significant superior to the laptop's one. Otherwise any upgrade of the computers in the chess world would be pointless. Or just put that laptop to play against the threadripper and both force move at same given time, see who wins.
Jouni
Posts: 3643
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: SF branching factor

Post by Jouni »

In my test SF average depth is 30 plies at 1m+1s level (4 cores). May be 26 plies bench is too low for threadripper?
Jouni
syzygy
Posts: 5713
Joined: Tue Feb 28, 2012 11:56 pm

Re: SF branching factor

Post by syzygy »

Jouni wrote: Thu Dec 08, 2022 3:09 pm But how to explain this from pro deo forum!?

The test was run with the Stockfish bench mark command for Stockfish 15.

bench 1024 32 26 default depth nnue - Threadripper
bench 1024 8 26 default depth nnue - $1500 Laptop.


Theadripper Results.
NPS = 21,956,331

$1500 Laptop Results.
NPS = 13,699,948
These numbers don't seem to make any sense. A 32-core threadripper should be much faster than an 8-core laptop.
The Threadripper is 1.6x faster in NPS. If your conclusion is the Threadripper is the faster computer running Stockfish. You would be dead wrong.
With 4x as many threads, you expect up to 4x as many nodes to reach the same depth if there is no gain from SMP.
Typically there will be a gain from SMP, but not anywhere close to cancel out the 4x.

The branching factor discussion is fully in line with this, since branching factor is "nodes to reach depth n+1 / nodes to reach depth n". If you need Nx as many to reach the same depth, then N/N = 1 and the branching factor remains the same. I suppose you do not fully grasp this yet.
Solve time to complete the benchmark.

$1500 Laptop Total Solve Time Results.
Total Time (ms) 110,731

Threadripper Total Solve Time Results.
Total Time (ms) 199,936

The $1500 Laptop is 1.8x faster in completing the benchmark test.
So the bench with 32 threads needs about 2.88x as many nodes, which is perfectly consistent with 4x minus the gain from smp.
Jouni
Posts: 3643
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: SF branching factor

Post by Jouni »

There is also:

Total Nodes searched for Threadripper.
Nodes Search 4,389,861,054

Total Nodes searched for $1500 Laptop.
Nodes Searched 1,517,009,043

Just like your theory!

BTW how do you explain almost zero benefit for 6 piece syzygy with SF15?
Jouni
syzygy
Posts: 5713
Joined: Tue Feb 28, 2012 11:56 pm

Re: SF branching factor

Post by syzygy »

Jouni wrote: Mon Dec 12, 2022 8:51 am There is also:

Total Nodes searched for Threadripper.
Nodes Search 4,389,861,054

Total Nodes searched for $1500 Laptop.
Nodes Searched 1,517,009,043

Just like your theory!
No, just basic math. You mentioned 1.6 and 1.8, and 1.6x1.8 = 2.88.

Requiring 2.88x as many nodes to reach the same depth when going from 8 to 32 search threads is not surprising. (And, as I have tried to explain, this does not mean that branching factor increases. As long as it is 2.88x at every depth, the branching factor remains the same. If the branching factor does increase, the multiplication factor will not be a constant 2.88 but will increase (or decrease) exponentially with depth.)

The question remains how the 32-core (or thread?) threadripper machine can be so slow. Something seems wrong there.
Jouni
Posts: 3643
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: SF branching factor

Post by Jouni »

I checked, that Ryzen was 2950X and laptop 5900HX. So I believe figures.
Jouni
smatovic
Posts: 3318
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: SF branching factor

Post by smatovic »

Interesting thread, from ~1.4 EBF pre-NNUE to ~1.25 EBF SF-NNUE, good to know, I thought there was still a branching factor of ~2 present, now all these SMP Elo gain issues, the unsound Lazy SMP approach, and the statement "getting closer to an oracle engine" make sense to me, thx.

--
Srdja
Vinvin
Posts: 5296
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: SF branching factor

Post by Vinvin »

Jouni wrote: Thu Dec 08, 2022 3:09 pm But how to explain this from pro deo forum!?

The test was run with the Stockfish bench mark command for Stockfish 15.

bench 1024 32 26 default depth nnue - Threadripper
bench 1024 8 26 default depth nnue - $1500 Laptop.


Theadripper Results.
NPS = 21,956,331

$1500 Laptop Results.
NPS = 13,699,948

The Threadripper is 1.6x faster in NPS. If your conclusion is the Threadripper is the faster computer running Stockfish. You would be dead wrong.

Solve time to complete the benchmark.

$1500 Laptop Total Solve Time Results.
Total Time (ms) 110,731

Threadripper Total Solve Time Results.
Total Time (ms) 199,936

The $1500 Laptop is 1.8x faster in completing the benchmark test.
I've already seen the phenomenon : The depth is about the same with more thread. So my supposition is : the other threads analyse other variations, so that make the system stronger.