public class SinglePFTF extends java.lang.Object implements TerminalFunction
Constructor and Description |
---|
SinglePFTF(PropositionalFunction pf)
Initializes the propositional function that will cause the state to be terminal when any Grounded version of
pf is true.
|
SinglePFTF(PropositionalFunction pf,
boolean terminateOnTrue)
Initializes the propositional function that will cause the state to be terminal when any Grounded version of
pf is true or alternatively false.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTerminal(State s) |
void |
setTerminateOnTrue(boolean terminateOnTrue)
Sets whether to be terminal state it is required for there to be a true grounded version of this class' propositional function
or whether it is required for there to be a false grounded version.
|
public SinglePFTF(PropositionalFunction pf)
pf
- the propositional function that must have a true grounded version for the state to be terminal.public SinglePFTF(PropositionalFunction pf, boolean terminateOnTrue)
pf
- the propositional function that must have a true grounded version for the state to be terminal.terminateOnTrue
- when true requires a grounded version of pf to be true for the state to be terminal. When false requires a grounded version to be false to be terminal.public void setTerminateOnTrue(boolean terminateOnTrue)
terminateOnTrue
- if true then there must be a true grounded prop; if false then there must be a false grounded prop.public boolean isTerminal(State s)
isTerminal
in interface TerminalFunction