net.sourceforge.cilib.games.agent.state.evaluation
Class EndGameStateEvaluator
java.lang.Object
net.sourceforge.cilib.games.agent.state.evaluation.EndGameStateEvaluator
- All Implemented Interfaces:
- StateEvaluator
public class EndGameStateEvaluator
- extends Object
- implements StateEvaluator
- Author:
- leo
This is a StateEvaluator that simply scores the state that results in a win for the decision player with a value of 1, and everything else with a value of -1.
This evaluator can only evaluate game states where the game is completed.
Method Summary |
double |
evaluateState(Game<GameState> state,
int decisionPlayerID)
Evaluate a given GameState for a given player ID. |
DomainRegistry |
getEvaluatorDomain()
If the evaluator can be optimized then the evaluator data should be in a specific domain, this function should return that domain |
void |
initializeEvaluator(Type evaluatorData)
Some state evaluators can be optimised, and therefore the evaluator should be initialized with evaluator specific data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EndGameStateEvaluator
public EndGameStateEvaluator()
EndGameStateEvaluator
public EndGameStateEvaluator(EndGameStateEvaluator other)
evaluateState
public double evaluateState(Game<GameState> state,
int decisionPlayerID)
- Evaluate a given GameState for a given player ID.
- Specified by:
evaluateState
in interface StateEvaluator
- Parameters:
state
- the Game object that is at a specific state that needs to be evaluateddecisionPlayerID
- The player that has to make a decision
- Returns:
- the rating of the state.
getEvaluatorDomain
public DomainRegistry getEvaluatorDomain()
- If the evaluator can be optimized then the evaluator data should be in a specific domain, this function should return that domain
- Specified by:
getEvaluatorDomain
in interface StateEvaluator
- Returns:
- The domain of the evaluator
initializeEvaluator
public void initializeEvaluator(Type evaluatorData)
- Some state evaluators can be optimised, and therefore the evaluator should be initialized with evaluator specific data.
- Specified by:
initializeEvaluator
in interface StateEvaluator
- Parameters:
evaluatorData
- the data that determines how the evaluator should funciton
Copyright © 2009 CIRG. All Rights Reserved.