title: alpha/beta pruning, from which perspective should the evaluation be performed?
body: <p>I'm trying to develop a chess program. It will be regular bruteforce searching of a tree, the only thing different will be the evaluation. Initially I will use a standard evaluator as designed by Claude Shannon so that it is more easy to test if it works fine at the base. Move list generation and all other infra around it works fine.</p>
  
  <p>Now for the searching: I would like to use the alpha/beta pruning code example of <a href="http://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning#Pseudocode" rel="nofollow">wikipedia</a>.
  And that's what is a bit of a problem: it is ambiguous about one thing; from who's perspective should the evaluation be done? I've been googling for days (literally) but no example says this explicitly.
  So: should the evaluation be</p>
  
  <ul>
  <li>from the point of view of the "current mover" at that depth</li>
  <li>from the point of view of the "opponent of current move" at that depth</li>
  <li>from the point of view of the mover at the root of the tree, e.g. the person for who this tree-search is being done (the AI player)</li>
  <li>from the point of view of the opponent of the mover at the root of the tree</li>
  </ul>
  
  <p>?</p>
  
  <p>I experimentally tried rootSide, side, rootOpponent, well basically all options and then let them play against each other. The outcome of that was that "current mover at that depth" would be the one to use (it won most frequently) but testing that version against any other engine result in 100% loss.</p>
  
  <p>Of course wikipedia will be updated to be more clear about it! (please ignore the note on the side in the wikipedia history: that was from myself which might be incorrect so I removed it)</p>