org.vizzini.game
Class AbstractEvaluator

java.lang.Object
  extended by org.vizzini.game.AbstractEvaluator
All Implemented Interfaces:
Serializable, IEvaluator
Direct Known Subclasses:
AbstractNeuralNetworkEvaluator, DefaultChessEvaluator, DefaultEvaluator, GPFunctionEvaluator

public abstract class AbstractEvaluator
extends Object
implements IEvaluator

Provides base functionality for evaluators in the game framework. An evaluator instance encapsulates the evaluation algorithm used to determine the fitness of a given environment. The evaluator is used by computer agents to help select their next action.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Constructor Summary
AbstractEvaluator()
           
 
Method Summary
 void configure(Properties properties, int index)
          Configure this evaluator.
 int evaluate(IEnvironment environment, IAdjudicator adjudicator, IAgent agent)
          Return an evaluation of the given environment from the perspective of the given agent.
protected abstract  int evaluateTokens(IEnvironment environment, IAgent agent)
          Evaluate the tokens in the given environment from the perspective of the given agent.
protected  int multiplier(IToken token, IAgent agent)
          Return the multiplier for a token from the given agent's perspective.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEvaluator

public AbstractEvaluator()
Method Detail

configure

public void configure(Properties properties,
                      int index)
               throws InstantiationException,
                      IllegalAccessException
Configure this evaluator.

Specified by:
configure in interface IEvaluator
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

evaluate

public int evaluate(IEnvironment environment,
                    IAdjudicator adjudicator,
                    IAgent agent)
Return an evaluation of the given environment from the perspective of the given agent.

Specified by:
evaluate in interface IEvaluator
Parameters:
environment - The environment to evaluate.
adjudicator - Adjudicator.
agent - The agent of interest.
Since:
v0.1

evaluateTokens

protected abstract int evaluateTokens(IEnvironment environment,
                                      IAgent agent)
Evaluate the tokens in the given environment from the perspective of the given agent.

Parameters:
environment - The environment to evaluate.
agent - The agent of interest.
Since:
v0.1

multiplier

protected int multiplier(IToken token,
                         IAgent agent)
Return the multiplier for a token from the given agent's perspective.

Parameters:
token - The token.
agent - The agent.
Since:
v0.2


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02