public class ConnectFourAIPlayer extends IterativeDeepeningAlphaBetaSearch<ConnectFourState,java.lang.Integer,java.lang.String>
currDepthLimit, game, METRICS_MAX_DEPTH, METRICS_NODES_EXPANDED, utilMax, utilMin| Constructor and Description |
|---|
ConnectFourAIPlayer(Game<ConnectFourState,java.lang.Integer,java.lang.String> game,
int time) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
eval(ConnectFourState state,
java.lang.String player)
Modifies the super implementation by making safe winner values even more
attractive if depth is small.
|
protected boolean |
hasSafeWinner(double resultUtility)
Primitive operation which is used to stop iterative deepening search in
situations where a safe winner has been identified.
|
protected boolean |
isSignificantlyBetter(double newUtility,
double utility)
Primitive operation which is used to stop iterative deepening search in
situations where a clear best action exists.
|
java.util.List<java.lang.Integer> |
orderActions(ConnectFourState state,
java.util.List<java.lang.Integer> actions,
java.lang.String player,
int depth)
Orders actions with respect to the number of potential win positions
which profit from the action.
|
createFor, getMetrics, incrementDepthLimit, makeDecision, maxValue, minValue, setLogEnabledpublic ConnectFourAIPlayer(Game<ConnectFourState,java.lang.Integer,java.lang.String> game, int time)
protected boolean isSignificantlyBetter(double newUtility,
double utility)
IterativeDeepeningAlphaBetaSearchisSignificantlyBetter in class IterativeDeepeningAlphaBetaSearch<ConnectFourState,java.lang.Integer,java.lang.String>protected boolean hasSafeWinner(double resultUtility)
IterativeDeepeningAlphaBetaSearchhasSafeWinner in class IterativeDeepeningAlphaBetaSearch<ConnectFourState,java.lang.Integer,java.lang.String>protected double eval(ConnectFourState state, java.lang.String player)
eval in class IterativeDeepeningAlphaBetaSearch<ConnectFourState,java.lang.Integer,java.lang.String>public java.util.List<java.lang.Integer> orderActions(ConnectFourState state, java.util.List<java.lang.Integer> actions, java.lang.String player, int depth)
orderActions in class IterativeDeepeningAlphaBetaSearch<ConnectFourState,java.lang.Integer,java.lang.String>