Stockfish: Speed versus Plies

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

Moderator: Ras

Hamster
Posts: 30
Joined: Sat May 25, 2013 6:38 pm
Location: Wien

Stockfish: Speed versus Plies

Post by Hamster »

On PlayChess this was displayed in the chat:
Image
https://imgur.com/a/DsJo9sz

The engines are very similar, both development versions of Stockfish.
How come that Stockfish 231121 has more kN/s but the depth is considerably less (in a middle game position)?
Sopel
Posts: 397
Joined: Tue Oct 08, 2019 11:39 pm
Full name: Tomasz Sobczyk

Re: Stockfish: Speed versus Plies

Post by Sopel »

depth is an implementation detail and provides no information for the user
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.

Maybe you copied your stockfish commits from someone else too?
I will look into that.
jtwright
Posts: 48
Joined: Wed Sep 22, 2021 9:20 pm
Full name: Jeremy Wright

Re: Stockfish: Speed versus Plies

Post by jtwright »

It's tricky. As an engine begins to do more and more sophisticated pruning and reduction rules (Stockfish possibly being the ultimate example of this), depth becomes an increasingly difficult number to get meaning from. Techniques like Internal Iterative Reductions especially can make the precise meaning of the number unclear. It's not completely meaningless of course, but it's not strictly better to have more depth.

Also, because of that, even for the same engine, it can take 10x or more nodes / depth in some positions than others. It depends on things like how many moves are available, the amount of pieces on the board, how good the move ordering heuristics are doing in this position, number of extensions being triggered, etc. Most modern, mature engines tend to aggressively prune and reduce non-tactical lines and also try to sort of "guess" what the outcome of a line will be for the alpha-beta pruning before reaching the leaves (e.g. reverse futility pruning). Usually the specific character of these prunings relies on certain numerical thresholds, e.g. if I'm more than 2 pawns above beta at a shallow depth, prune. Small changes in these numbers can result in big changes in what gets pruned

Also, typically the midgame is where high depths become hardest to achieve, since there are so many tactical lines available at any given time, so it's probably where this effect becomes quite noticeable
jhellis3
Posts: 548
Joined: Sat Aug 17, 2013 12:36 am

Re: Stockfish: Speed versus Plies

Post by jhellis3 »

TT hits / branching factor.

In a middle game position there can be many possible branches to take, so one can search a bunch of nodes over not much depth.

The more pieces that come off the board, transpositions become more likely. Thus there simply isn't as much to search and the engine covers more iterations in fewer nodes.