# What is 'Depth' in Lichess game analysis?

I have started analyzing my games in Lichess. I'm wondering what does Depth mean in the Stockfish analysis?

It means how many half moves ahead stockfish looked from the current position. It doesn't mean it looked at all the moves possible to that extent thought, it trims what it analises, otherwise it would be unable to reach such depths, this means a mate in 10 for example may only be found when stockfish searches in greater depths. In general, greater depths mean better analysis and moves suggested by stockfish. The only limiting factor is time and processing power.

Depth counter shows the latest status of the algorithm in the search tree. Depth 10 means the algorithm checked all moves in 10 node distance. Each node is a position (each half move changes the position, so depth of 10 translates to 5 moves).

As you wait longer and longer it will get deeper thus will provide better evaluation.

• Dear downvoter, I would like to hear your reasoning. Commented Jan 13, 2019 at 16:01
• People have freedom to upvote and downvote whatever they want, don't be rude. Anyway your answer is wrong. If that were the case it'd take years to reach a reasonable depth. Commented Jun 23, 2020 at 6:27
• There is nothing rude or wrong here. Commented Jun 23, 2020 at 6:29
• @ferit You were not being rude. I downvoted because it is incorrect. Modern engines use selectivity (chessprogramming.org/Selectivity) extensively, and will only search a fraction of the nodes a distance 10 from the root (and a few lines much further). Commented Jan 13, 2021 at 14:58
• No, its not. I never said that engines brute force all possible moves. Checking implies discarding where the algorithm sees fit. Commented Jan 13, 2021 at 15:09

Wrong answer: "Depth 10 means the algorithm checked all moves in 10 node distance."

Right answer: "It doesn't mean it looked at all the moves possible to that extent thought, it trims what it analises, otherwise it would be unable to reach such depths, this means a mate in 10 for example may only be found when stockfish searches in greater depths."

Stockfish isn't a pure brute force engine. It uses alpha-beta pruning.

• Depth 10 however, will eventually check all moves at depth 10. It simply uses heuristics to check the moves that are most likely to be good first, but if you let it run forever it will eventually exhaust all moves to depth 10. Stockfish is a brute force algorithm, but it's a hill climbing algorithm that will give you good answers quickly before refining them to be better Commented Jan 13, 2021 at 14:27
• Additionally, alpha-beta pruning is a poor description of what stockfish does. Alpha-beta pruning keeps the search exhaustive, it just is able to prove that some trees are no better than other trees. But this wouldn't explain why stockfish produces better results as you let it run longer Commented Jan 13, 2021 at 14:30
• @Cruncher is is perhaps a semantic difference, but Stockfish will never check all depth 10 nodes at depth 10. If you let it run forever, it will eventually search all the depth 10 nodes required by alpha/beta pruning, but this will happen much further down the line---engine depth 40 or something. Commented Jan 13, 2021 at 15:03