class GameAgent: A game agent that,
given a GameState, selects a move
getAction(state)
class UtilityDirectedGameAgent(searcher):
A
game agent that chooses the action with highest utility,
according to some GameTreeSearcher instance searcher
Exhaustively
searches the game tree, returning the best action and its corresponding
value.
class GameTreeSearcher:
getBestActionAndValue(state)
class FixedDepthHeuricticGameAgent(searcher, heuristicFn, depth):
A
game agent that chooses the action with highest utility,
according to some GameTreeSearcher instance searcher, after restricting the search to at most depth ply
(moves), where the utilities of states at this depth are estimated using a
heuristic evaluation function heuristicFn.
The evaluation function should
take in a GameState state, and return its value for state.currentPlayer(); you should assume that state
will always correspond to a two-player, zero-sum game.
The other part of your job will be implementing heuristic functions for Nim and Othello, and testing the relative effectiveness of various combinations of search strategies and heuristic evaluation functions.