title: Implementing iterative deepening
body: <p>To improve performance of Minimax algorithm with Alpha-Beta pruning, I've implemented Iterative deepening:</p>
  
  <pre><code> public Integer iterativeDeepening(int maxDepth, boolean isFirstPlayer) {
  
      Integer bestCell = -1;
  
      for (Integer depth = 1; depth &lt;= maxDepth; depth++) {
          bestCell = alphabeta.minimax(depth, false, Integer.MIN_VALUE, Integer.MAX_VALUE)[1];
      }
  
      return bestCell;
  }
  </code></pre>
  
  <p>where method <code>iterativeDeepening</code> simply returns id of best move.</p>
  
  <p>Firstly, I am not sure if this is correct way to implement Iterative Deepening.</p>
  
  <p>Secondly, I noticed that AI started making wrong moves. Is it possible for Iterative Deepening to affect decision making?</p>
  
  <p>While working with Transposition tables and Iterative Deepening, I measure significant improvements to algorithm speed, but I don't really want to sacrifice AI quality for speed.</p>