Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Move simpleFindMin(Position posn, double alpha, double beta){
  2. if (posn.maxPlayerWon()) {
  3. reutrn artificial "move" with value = inf;
  4. }
  5. else if (posn.minPlayerWon()){
  6. return artificial "move" with value +inf;
  7. }
  8. Move bestSoFar = artificial "move" with value +inf;
  9. for (each M = a legal move for miniomizing player from posn){
  10. Position next = posn.makeMove(M);
  11. if (next.setValue() < +bestSOFAr.value()) ;
  12. if (beta <= alpha) break;
  13. }
  14. }
  15. return bestSoFAr;
  16.  
  17.  
  18.  
  19. }
  20.  
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement