public class CumulativeScoreFunction extends CompositeScoreFunction
children
Constructor and Description |
---|
CumulativeScoreFunction(java.lang.String name)
Create a CumulativeScoreFunction with no children.
|
CumulativeScoreFunction(java.lang.String name,
java.util.Collection<ScoreFunction> children)
Create a CumulativeScoreFunction with a collection of children.
|
CumulativeScoreFunction(java.lang.String name,
ScoreFunction... children)
Create a CumulativeScoreFunction with a collection of children.
|
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.
|
addChildFunction, addChildFunctions, addChildFunctions, getChildFunctions, removeChildFunction, removeChildFunctions, removeChildFunctions
getName, setName, toString
public CumulativeScoreFunction(java.lang.String name)
name
- The name of this function.public CumulativeScoreFunction(java.lang.String name, java.util.Collection<ScoreFunction> children)
name
- The name of this function.children
- The child score functions.public CumulativeScoreFunction(java.lang.String name, ScoreFunction... children)
name
- The name of this function.children
- The child score functions.public void initialise(WorldModel<? extends Entity> world, Config config)
ScoreFunction
initialise
in interface ScoreFunction
initialise
in class CompositeScoreFunction
world
- The state of the world at the start of the simulation.config
- The system configuration.public double score(WorldModel<? extends Entity> world, Timestep timestep)
ScoreFunction
world
- The state of the world at the end of the timestep.timestep
- The record of perception, commands and changes for the timestep.