Answers.Body: <p>Normally in minimax (or any form of depth-first search really), we do not store nodes in memory for the parts we have already searched. The tree is only implicit, it's not stored anywhere explicitly. We typically implement these algorithms in a recursive memory. As soon as we've finished searching a certain of the tree, none of the data for that subtree is retained in memory.</p>
  <p>If you wanted to be able to continue the search from where you left off, you'd have to change this and actually store everything you've searched explicitly in memory. This can very quickly cause us to actually run out of memory and crash.</p>
  <p>Intuitively, at first it certainly makes sense what you suggest in terms of computation time, i.e. it would avoid re-doing work we've already done (if it were practical in terms of memory usage). However, if you analyse exactly how much you would save, it turns out not to be much at all. Due to the exponential growth of the size of the search tree as depth increases, it is usually the case that the computation effort for the next level (<span class="math-container">$d + 1$</span>) is <strong>much bigger</strong> than the computation effort already done for <strong>all previous depth levels</strong> (<span class="math-container">$1, 2, 3, \dots, d$</span>) <strong>put together</strong>. So, while in theory we're wasting some time re-doing work we've already done, in practice it actually rarely hurts.</p>
  <p>In the specific context of minimax with alpha-beta pruning, we get an additional benefit when re-doing the work. We get to make use of the estimated scores from our previous iteration to re-order the branches at the root, and with alpha-beta prunings this can actually make our search <em>more</em> efficient!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-25T10:53:21.803Z
Answers.LastActivityDate: 2022-09-25T10:53:21.803Z
Answers.UserDisplayName: Dennis Soemers
Answers.Body: <p>I could be mistaken since I don't know the source of the image you have provided, but that image appears to be showing how the tree is built, not how it is searched.  Even so, when a balanced tree of the sort you have illustrated is searched, it will start with the root node, though in a search the maximum number of nodes traversed will be minimized and all operations (like min or max) will be performed in <span class="math-container">$O(h)$</span> where <span class="math-container">$h$</span> is the height of the tree.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-25T09:49:16.253Z
Answers.LastActivityDate: 2022-09-25T09:49:16.253Z
Answers.UserDisplayName: David Hoelzer
Body: <p>Consider the graph below for an understanding on how IDS work.</p>
  <p>Now my question is:</p>
  <p>why do IDS start at the root every iteration, why not start at the previously searched depth in the context of minmax?</p>
  <p>What is the intuition behind it?</p>
  <p><a href="https://i.sstatic.net/mg1WW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mg1WW.png" alt="enter image description here" /></a></p>
  
Tags: <minimax><game-theory><iddfs><adversarial-search>
Title: Why do iterative deepening search start from the root each iteration in the context of the minmax-algorithm?
UserDisplayName: steward
ThreadText: # Why do iterative deepening search start from the root each iteration in the context of the minmax-algorithm?
  
  (Asked by: username_0 on 2022-09-25)
  
  Consider the graph below for an understanding on how IDS work.
  
  Now my question is:
  
  why do IDS start at the root every iteration, why not start at the previously searched depth in the context of minmax?
  
  What is the intuition behind it?
  
  [![enter image description here](https://i.sstatic.net/mg1WW.png)](https://i.sstatic.net/mg1WW.png)
  
  **Tags:** minimax, game-theory, iddfs, adversarial-search
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-09-25. Score: 2
  
  Normally in minimax (or any form of depth-first search really), we do not store nodes in memory for the parts we have already searched. The tree is only implicit, it's not stored anywhere explicitly. We typically implement these algorithms in a recursive memory. As soon as we've finished searching a certain of the tree, none of the data for that subtree is retained in memory.
  
  If you wanted to be able to continue the search from where you left off, you'd have to change this and actually store everything you've searched explicitly in memory. This can very quickly cause us to actually run out of memory and crash.
  
  Intuitively, at first it certainly makes sense what you suggest in terms of computation time, i.e. it would avoid re-doing work we've already done (if it were practical in terms of memory usage). However, if you analyse exactly how much you would save, it turns out not to be much at all. Due to the exponential growth of the size of the search tree as depth increases, it is usually the case that the computation effort for the next level ($d + 1$) is **much bigger** than the computation effort already done for **all previous depth levels** ($1, 2, 3, \dots, d$) **put together**. So, while in theory we're wasting some time re-doing work we've already done, in practice it actually rarely hurts.
  
  In the specific context of minimax with alpha-beta pruning, we get an additional benefit when re-doing the work. We get to make use of the estimated scores from our previous iteration to re-order the branches at the root, and with alpha-beta prunings this can actually make our search *more* efficient!
  
  
  ---
  
  ### Answer by username_2 on 2022-09-25. Score: 0
  
  I could be mistaken since I don't know the source of the image you have provided, but that image appears to be showing how the tree is built, not how it is searched. Even so, when a balanced tree of the sort you have illustrated is searched, it will start with the root node, though in a search the maximum number of nodes traversed will be minimized and all operations (like min or max) will be performed in $O(h)$ where $h$ is the height of the tree.
  
  
  ---
  
  