|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.game.AbstractEvaluator
org.vizzini.game.DefaultEvaluator
org.vizzini.game.boardgame.WeightedEvaluator
public class WeightedEvaluator
Provides an evaluator which uses position-based weights and token values to arrive at a grid board evaluation.
| Constructor Summary | |
|---|---|
WeightedEvaluator()
|
|
| Method Summary | |
|---|---|
void |
configure(Properties properties,
int index)
Configure this evaluator. |
protected int |
evaluateTokens(IEnvironment environment,
IAgent agent)
Evaluate the tokens in the given environment from the perspective of the given agent. |
protected int |
getWeight(IntegerPosition position,
int fileCount,
int rankCount)
Return the weight for the given grid position. |
int[] |
getWeights()
Return the weights. |
void |
setWeights(int[] weights)
Set the weights. |
String |
toString()
Return a string representation of this object. |
| Methods inherited from class org.vizzini.game.AbstractEvaluator |
|---|
evaluate, multiplier |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WeightedEvaluator()
| Method Detail |
|---|
public void configure(Properties properties,
int index)
configure in interface IEvaluatorconfigure in class DefaultEvaluatorproperties - Properties.index - Agent index.public int[] getWeights()
public void setWeights(int[] weights)
public String toString()
toString in class Object
protected int evaluateTokens(IEnvironment environment,
IAgent agent)
evaluateTokens in class DefaultEvaluatorenvironment - The environment to evaluate.agent - The agent of interest.
protected int getWeight(IntegerPosition position,
int fileCount,
int rankCount)
position - Position.fileCount - File count.rankCount - Rank count.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |