title: How to use negamax algorithm
body: <p>I was wondering how I can use the negamax algorithm. I am trying to write an agent for the game mancala in C#. The algorithm gives you a single number when given a game node.</p>
  
  <p>Suppose my AI player wants to make a move. The negamax function returns a single number. So it tells me what the score of the best move from that point is. How can I use this <em>one</em> number?</p>
  
  <p>if it's player A's turn I tried making his possible moves and checking the negamax for each one. However if I make the move first and then check the negamax, then when the negamax is running (let's assume we're still only 1 level deep) it will evaluate the move, and then the next move will have to be player B's.</p>
  
  <p>I'm getting really confused about this. When I see negamax pseudocode (such as on the wikipedia page) it says to try that player's moves. If I do that it will return the highest score <em>without telling me which move got that score</em>.</p>
  
  <p>How is negamax supposed to be used?</p>