Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Move simpleFindMin(Position posn, double alpha, double beta){
- if (posn.maxPlayerWon()) {
- reutrn artificial "move" with value = inf;
- }
- else if (posn.minPlayerWon()){
- return artificial "move" with value +inf;
- }
- Move bestSoFar = artificial "move" with value +inf;
- for (each M = a legal move for miniomizing player from posn){
- Position next = posn.makeMove(M);
- if (next.setValue() < +bestSOFAr.value()) ;
- if (beta <= alpha) break;
- }
- }
- return bestSoFAr;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement