Skip to content

Commit 540b838

Browse files
committed
Documentation improved.
1 parent 9a1c0f2 commit 540b838

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

aima-core/src/main/java/aima/core/search/adversarial/IterativeDeepeningAlphaBetaSearch.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ public class IterativeDeepeningAlphaBetaSearch<STATE, ACTION, PLAYER> implements
2929
protected double utilMax;
3030
protected double utilMin;
3131
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.
3435
private Timer timer;
3536
private boolean logEnabled;
3637

@@ -42,10 +43,12 @@ public class IterativeDeepeningAlphaBetaSearch<STATE, ACTION, PLAYER> implements
4243
* @param game
4344
* The game.
4445
* @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
4648
* situations with a safe winner.
4749
* @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
4952
* situations with a safe winner.
5053
* @param time
5154
* Maximal computation time in seconds.
@@ -61,11 +64,13 @@ public static <STATE, ACTION, PLAYER> IterativeDeepeningAlphaBetaSearch<STATE, A
6164
* @param game
6265
* The game.
6366
* @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.
6670
* @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.
6974
* @param time
7075
* Maximal computation time in seconds.
7176
*/
@@ -82,9 +87,10 @@ public void setLogEnabled(boolean b) {
8287
}
8388

8489
/**
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.
8894
*/
8995
@Override
9096
public ACTION makeDecision(STATE state) {
@@ -121,7 +127,6 @@ && isSignificantlyBetter(newResults.utilValues.get(0), newResults.utilValues.get
121127
break; // exit from iterative deepening loop
122128
}
123129
}
124-
125130
} while (!timer.timeOutOccured() && heuristicEvaluationUsed);
126131
return results.get(0);
127132
}

0 commit comments

Comments
 (0)