public class ConstantScoreFunction extends AbstractScoreFunction
| Constructor and Description |
|---|
ConstantScoreFunction(java.lang.String name,
double score)
Create a ConstantScoreFunction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialise(WorldModel<? extends Entity> world,
Config config)
Initialise this score function.
|
double |
score(WorldModel<? extends Entity> world,
Timestep timestep)
Calculate the score for a timestep.
|
java.lang.String |
toString() |
getName, setNamepublic ConstantScoreFunction(java.lang.String name,
double score)
name - The name of this function.score - The constant score.public java.lang.String toString()
toString in class AbstractScoreFunctionpublic void initialise(WorldModel<? extends Entity> world, Config config)
ScoreFunctioninitialise in interface ScoreFunctioninitialise in class AbstractScoreFunctionworld - The state of the world at the start of the simulation.config - The system configuration.public double score(WorldModel<? extends Entity> world, Timestep timestep)
ScoreFunctionworld - The state of the world at the end of the timestep.timestep - The record of perception, commands and changes for the timestep.