Answers.Body: <p>Regarding maximum depth: Yes, Stockfish simply stops searching when reaching it.</p>
  <p>Regarding &quot;dismissing a possibility&quot;, selectivity of search decreases as nominal depth increases, i.e., the engine does less aggressive forward pruning  and therefore is less likely to miss good moves that superficially look bad. This ensures that the engine will eventually find the best move given sufficient time/depth, although &quot;sufficient&quot; might be beyond maximum depth in some positions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-01T22:28:55.177Z
Answers.Text: Yes Forward Pruning is the thing for the best engines, also the best kept secret by all engine developers as for how it works exactly, among the known and published forward pruning techniques are the Nullmove and the Killer heuristics.
Answers.UserDisplayName: MikeTrans
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-01T17:27:56.110Z
Answers.LastActivityDate: 2024-07-01T17:27:56.110Z
Answers.UserDisplayName: Fabian Fichter
Answers.Body: <p>Maximum depth has nothing to do with the Horizon Effect. HE means the engine oversees a forced line because it only calculates x moves ahead, and in the move x+1 there is a forced win or draw or a move that leads to a major disadvantage that it hasn't discovered. This hardly happens with the best engines because of Endgame Tablebases, persistant Hashtables and a smart selectivity and quiescence search. Do a research to know what all these terms mean, I'm not going to expand on them here and keep in mind that the number of the search depth you see in the display does not reflect the actual engine processing.
  As for your question, once reached maximum depth the engine stops and keeps the best line in cache, that should not be of a surprise, e.g. if the Endgame Tablebases lead to an evaluation of +M34 (mate in 34 plies), then the engine will continue to improve this score looking for fewer moves to perform the mate but it will eventually end the generic calculation and only use specific endgame routines, this is not directly visible in the search display, but if there was no calculation ending code the engine would simply crash which isn't the case with Stockfish, the makers did their coding job well.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-01T12:35:43.087Z
Answers.LastActivityDate: 2024-07-01T18:47:38.010Z
Answers.LastEditDate: 2024-07-01T18:47:38.010Z
Answers.UserDisplayName: MikeTrans
Body: <p>I was wondering, if we give a lot of time to stockfish, and he goes maximum depth,
  will he upgrade the number of ply before dismissing a possibility, or will he wait and do nothing?</p>
  
Tags: <engines><stockfish>
Title: Question about stockfish and horizon effect
ThreadText: # Question about stockfish and horizon effect
  
  (Asked by: username_0 on 2024-06-29)
  
  I was wondering, if we give a lot of time to stockfish, and he goes maximum depth,
  will he upgrade the number of ply before dismissing a possibility, or will he wait and do nothing?
  
  **Tags:** engines, stockfish
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-07-01. Score: 2
  
  Regarding maximum depth: Yes, Stockfish simply stops searching when reaching it.
  
  Regarding "dismissing a possibility", selectivity of search decreases as nominal depth increases, i.e., the engine does less aggressive forward pruning and therefore is less likely to miss good moves that superficially look bad. This ensures that the engine will eventually find the best move given sufficient time/depth, although "sufficient" might be beyond maximum depth in some positions.
  
  > **Comments:**
  > **username_2**: Yes Forward Pruning is the thing for the best engines, also the best kept secret by all engine developers as for how it works exactly, among the known and published forward pruning techniques are the Nullmove and the Killer heuristics.  
  
  ---
  
  ### Answer by username_2 on 2024-07-01. Score: 1
  
  Maximum depth has nothing to do with the Horizon Effect. HE means the engine oversees a forced line because it only calculates x moves ahead, and in the move x+1 there is a forced win or draw or a move that leads to a major disadvantage that it hasn't discovered. This hardly happens with the best engines because of Endgame Tablebases, persistant Hashtables and a smart selectivity and quiescence search. Do a research to know what all these terms mean, I'm not going to expand on them here and keep in mind that the number of the search depth you see in the display does not reflect the actual engine processing.
  As for your question, once reached maximum depth the engine stops and keeps the best line in cache, that should not be of a surprise, e.g. if the Endgame Tablebases lead to an evaluation of +M34 (mate in 34 plies), then the engine will continue to improve this score looking for fewer moves to perform the mate but it will eventually end the generic calculation and only use specific endgame routines, this is not directly visible in the search display, but if there was no calculation ending code the engine would simply crash which isn't the case with Stockfish, the makers did their coding job well.
  
  
  ---
  
  