public class UnaryOperatorScoreFunction extends DelegatingScoreFunction
Modifier and Type | Class and Description |
---|---|
static class |
UnaryOperatorScoreFunction.Operator
Enum constants for the possible operations this class supports.
|
child
Constructor and Description |
---|
UnaryOperatorScoreFunction(java.lang.String name,
UnaryOperatorScoreFunction.Operator op,
ScoreFunction child)
Create a UnaryOperatorScoreFunction.
|
Modifier and Type | Method and Description |
---|---|
double |
score(WorldModel<? extends Entity> world,
Timestep timestep)
Calculate the score for a timestep.
|
getChildFunction, initialise
getName, setName, toString
public UnaryOperatorScoreFunction(java.lang.String name, UnaryOperatorScoreFunction.Operator op, ScoreFunction child)
name
- The name of this function.op
- The operation to perform.child
- The child function to invert.public double score(WorldModel<? extends Entity> world, Timestep timestep)
ScoreFunction
score
in interface ScoreFunction
score
in class DelegatingScoreFunction
world
- The state of the world at the end of the timestep.timestep
- The record of perception, commands and changes for the timestep.