Can someone explain to me what analysis 'depth' actually means?

Sort:
Brewhaus

Chess.com says this about depth: "This number describes how many moves ahead the engine is looking in order to make its decision on what the best move is."

This is exactly what I always thought depth was. But looking at analysis seems to indicate otherwise. Take these examples of analysis of the same position at different depths:

Depth of 14
Analysis at depth 14

Depth of 27
Analysis at depth 27

Depth of 81
Analysis at depth 81

As you can see from the last image, there is a forced mate in at most 7 moves. So why does a depth of 14 or 27 not find that? If it's looking at all moves 14 deep how could it not find mate in 7? I don't get it.

Help???

llama47
Brewhaus wrote:

If it's looking at all moves 14 deep how could it not find mate in 7?

You're right. Which means it's not looking at all possible variations 7 moves deep.

Maybe the earliest engines used a brute force method like this, but a large factor in the strength of a modern engine is how efficiently it ignores lines it deems bad, and focuses on lines it deems good.

For example, the upgraded Deep Blue, which defeated Kaspaorv in the 90s, looked at 200 million positions per second, and was maybe around 2700-2800 strength. Stockfish is about 800 points stronger and looks at fewer positions per second. This is possible because the search function is more efficient.

Now, there are modes where you can turn this off, and just have an engine brute force search, and that can help engines solve positions that typically give them trouble... but chess.com is just some basic browser stockfish. To use fancy features like that you'd need to download your own interface, and then download the engine (this isn't hard to do).

--

So why does it eventually find mate in 7? I don't know the intricacies of how engines work, but apparently lines marked as bad will eventually be revisited.

So what does the depth number really mean? IIRC it's something like the main line's depth minus something like 20 ply, which is done to avoid the horizon effect.

Brewhaus
llama47 wrote:
Brewhaus wrote:

If it's looking at all moves 14 deep how could it not find mate in 7?

You're right. Which means it's not looking at all possible variations 7 moves deep.

Maybe the earliest engines used a brute force method like this, but a large factor in the strength of a modern engine is how efficiently it ignores lines it deems bad, and focuses on lines it deems good.

For example, the upgraded Deep Blue, which defeated Kaspaorv in the 90s, looked at 200 million positions per second, and was maybe around 2700-2800 strength. Stockfish is about 800 points stronger and looks at fewer positions per second. This is possible because the search function is more efficient.

Now, there are modes where you can turn this off, and just have an engine brute force search, and that can help engines solve positions that typically give them trouble... but chess.com is just some basic browser stockfish. To use fancy features like that you'd need to download your own interface, and then download the engine (this isn't hard to do).

--

So why does it eventually find mate in 7? I don't know the intricacies of how engines work, but apparently lines marked as bad will eventually be revisited.

So what does the depth number really mean? IIRC it's something like the main line's depth minus something like 20 ply, which is done to avoid the horizon effect.

But that doesn't make sense either, it's black to move so the last image is saying that mate in 7 is the best that black can hope for if white plays perfectly, right? So if it was just ignoring paths it thought were bad until the end shouldn't the depth 14 and 27 contain only M1, M2, M3, M4, M5, and M6's? I guess if it chose the worst paths at every step you could end up with something like shown?

llama47
Brewhaus wrote:

But that doesn't make sense either, it's black to move so the last image is saying that mate in 7 is the best that black can hope for if white plays perfectly, right? So if it was just ignoring paths it thought were bad until the end shouldn't the depth 14 and 27 contain only M1, M2, M3, M4, M5, and M6's? I guess if it chose the worst paths at every step you could end up with something like shown?

Yeah, for example let's say sacrificing a rook leads to mate in 7. The engine might look for 1 or 2 moves, see that it's down a rook, and decide that line is bad and not look at it again until later.

The way lines branch make the number of moves enormous. If on average there are about 30 legal moves, then to see only 5 moves ahead generates a tree graph with about 10^15 nodes. A 1 GHz processor can do 1 billion operations per second. If 1 operation is 1 node, then it would take about 1 million seconds to search through all 10^15 nodes... which is about 11 days... that's to see only 5 moves deep.

Brewhaus

Got it, thanks.

litteking717

idk

StickerFish1

Well, this obviously shows chess engine is using some functions / intelligent thinking NOT just calculating every possible step. If it was the latter then I feel it's like cheating, because this means like the engine is playing its own virtual world and testing everything then play the move that works. I don't consider the latter as an intelligent!

Ouroborus64

What does average training depth mean in Chessable? For example in a course description, it mentions 4 variations, average training depth 11.0.