title: Optimizing minimax algorithm
body: <p>I've made games of TicTacToe and <a href="https://en.wikipedia.org/wiki/Nine_Men%27s_Morris" rel="nofollow">Nine Men's Morris</a> in JavaFX and implemented AI for each. For Nine Men's Morris, I haven't yet implemented removing mills, so it is more like complex TicTacToe for now. I've used minimax algorithm with alpha-beta pruning, and while AI is doing quite decent moves, calculating move for Nine Men's Morris is painfully slow. If I let AI play the whole game, it takes a couple of minutes.</p>
  
  <p>For evaluation function I've been using function that evaluates each line on board, where line value is:</p>
  
  <p>100 for 3-in-a-line,</p>
  
  <p>10 for 2-in-a-line,</p>
  
  <p>1 for 1-in-a-line,</p>
  
  <p>negative (-100, -10, -1) for opponent cells,</p>
  
  <p>0 otherwise.</p>
  
  <p>Minimax algorithm is more or less the same one, but for Nine Men's Morris, there are 16 lines to be evaluated, opposed to 8 lines in TicTacToe, yet AI is much slower for Nine Men's Morris. </p>
  
  <p>How can I further improve performance of my AI? </p>
  
  <p>I've been doing research on this matter, and I've found the idea to use neural networks to <a href="http://nn.cs.utexas.edu/downloads/papers/moriarty.focus.pdf" rel="nofollow">focus minimax search</a> or <a href="http://cs.brynmawr.edu/Theses/Thompson.pdf" rel="nofollow">replace evaluation function with neural network</a>. Could these solutions improve performance of my AI? </p>