@@ -29,8 +29,9 @@ public class IterativeDeepeningAlphaBetaSearch<STATE, ACTION, PLAYER> implements
29
29
protected double utilMax ;
30
30
protected double utilMin ;
31
31
protected int currDepthLimit ;
32
- private boolean heuristicEvaluationUsed ; // indicates that non-terminal nodes
33
- // have been evaluated.
32
+ private boolean heuristicEvaluationUsed ; // indicates that non-terminal
33
+ // nodes
34
+ // have been evaluated.
34
35
private Timer timer ;
35
36
private boolean logEnabled ;
36
37
@@ -42,10 +43,12 @@ public class IterativeDeepeningAlphaBetaSearch<STATE, ACTION, PLAYER> implements
42
43
* @param game
43
44
* The game.
44
45
* @param utilMin
45
- * Supports evaluation of non-terminal states and early termination in
46
+ * Utility value of worst state for this player. Supports
47
+ * evaluation of non-terminal states and early termination in
46
48
* situations with a safe winner.
47
49
* @param utilMax
48
- * Supports evaluation of non-terminal states and early termination in
50
+ * Utility value of best state for this player. Supports
51
+ * evaluation of non-terminal states and early termination in
49
52
* situations with a safe winner.
50
53
* @param time
51
54
* Maximal computation time in seconds.
@@ -61,11 +64,13 @@ public static <STATE, ACTION, PLAYER> IterativeDeepeningAlphaBetaSearch<STATE, A
61
64
* @param game
62
65
* The game.
63
66
* @param utilMin
64
- * Supports early termination in situations with a safe winner.
65
- * If not known negative infinity will do.
67
+ * Utility value of worst state for this player. Supports
68
+ * evaluation of non-terminal states and early termination in
69
+ * situations with a safe winner.
66
70
* @param utilMax
67
- * Supports early termination in situations with a safe winner.
68
- * If not known positive infinity will do.
71
+ * Utility value of best state for this player. Supports
72
+ * evaluation of non-terminal states and early termination in
73
+ * situations with a safe winner.
69
74
* @param time
70
75
* Maximal computation time in seconds.
71
76
*/
@@ -82,9 +87,10 @@ public void setLogEnabled(boolean b) {
82
87
}
83
88
84
89
/**
85
- * Template method controlling the search. It is based on iterative deepening and tries to make
86
- * to a good decision in limited time. Credit goes to Behi Monsio who had the idea of ordering
87
- * actions by utility in subsequent depth-limited search runs.
90
+ * Template method controlling the search. It is based on iterative
91
+ * deepening and tries to make to a good decision in limited time. Credit
92
+ * goes to Behi Monsio who had the idea of ordering actions by utility in
93
+ * subsequent depth-limited search runs.
88
94
*/
89
95
@ Override
90
96
public ACTION makeDecision (STATE state ) {
@@ -121,7 +127,6 @@ && isSignificantlyBetter(newResults.utilValues.get(0), newResults.utilValues.get
121
127
break ; // exit from iterative deepening loop
122
128
}
123
129
}
124
-
125
130
} while (!timer .timeOutOccured () && heuristicEvaluationUsed );
126
131
return results .get (0 );
127
132
}
0 commit comments