|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalgs.model.problems.tictactoe.model.Player
algs.model.problems.tictactoe.model.IntelligentAgent
public class IntelligentAgent
Represents an Intelligent Tic Tac Toe playing agent that relies on the provided algorithm to select a move.
Since it relies on using a search algorithm to locate best move given what opponent is capable of doing, then it must know who the opponent is.
| Field Summary |
|---|
| Fields inherited from class algs.model.problems.tictactoe.model.Player |
|---|
logic, mark, OMARK, score, XMARK |
| Constructor Summary | |
|---|---|
IntelligentAgent(char mark,
IEvaluation algorithm)
Construct an agent that selects the next move using the provided logic in the algorithm. |
|
| Method Summary | |
|---|---|
IGameMove |
decideMove(IGameState gameState)
Make an intelligent move given the board state, game logic, and player making the move. |
void |
opponent(IPlayer opponent)
Set the opponent for this agent, which is needed because the search for the best move is going to need the opposing player. |
| Methods inherited from class algs.model.problems.tictactoe.model.Player |
|---|
eval, getMark, getOpponentMark, hashCode, logic, logic, score, score, toString, validMoves |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntelligentAgent(char mark,
IEvaluation algorithm)
Note that whoever constructs this player must later set the opponent.
mark - mark to be used by player.algorithm - Algorithm to use when selecting the move.| Method Detail |
|---|
public void opponent(IPlayer opponent)
opponent - public IGameMove decideMove(IGameState gameState)
decideMove in class Player
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||