public class SubgoalOption extends java.lang.Object implements Option
Policy
object,
the deterministic termination conditions with a StateConditionTest
and the initiation set with a
StateConditionTest
.Option.Helper
Modifier and Type | Field and Description |
---|---|
protected StateConditionTest |
initiationTest
The states in which the options can be initiated
|
protected java.lang.String |
name
The name of the option
|
protected Policy |
policy
The policy of the options
|
protected StateConditionTest |
terminationStates
The states in which the option terminates deterministically
|
Constructor and Description |
---|
SubgoalOption()
A default constructor for serialization purposes.
|
SubgoalOption(java.lang.String name,
Policy p,
StateConditionTest init,
StateConditionTest terminationStates)
Initializes.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
actionName()
Returns the action name for this grounded action.
|
EnvironmentOptionOutcome |
control(Environment env,
double discount) |
Action |
copy()
Returns a copy of this grounded action.
|
boolean |
enumerable()
Returns true if the initiation states and termination states of this option are iterable; false if either of them are not.
|
boolean |
equals(java.lang.Object o) |
StateConditionTest |
getInitiationTest()
Returns the object defining the initiation states.
|
java.lang.String |
getName() |
Policy |
getPolicy() |
StateConditionTest |
getTerminationStates() |
int |
hashCode() |
boolean |
inInitiationSet(State s)
Returns true if the input state is in the initiation set of the
Option |
boolean |
markov() |
Action |
policy(State s,
Episode history) |
java.util.List<ActionProb> |
policyDistribution(State s,
Episode history) |
double |
probabilityOfTermination(State s,
Episode history) |
void |
setInitiationTest(StateConditionTest initiationTest) |
void |
setName(java.lang.String name) |
void |
setPolicy(Policy policy) |
void |
setTerminationStates(StateConditionTest terminationStates) |
java.lang.String |
toString() |
protected java.lang.String name
protected Policy policy
protected StateConditionTest initiationTest
protected StateConditionTest terminationStates
public SubgoalOption()
SubgoalOption(String, Policy, StateConditionTest, StateConditionTest)
constructor.public SubgoalOption(java.lang.String name, Policy p, StateConditionTest init, StateConditionTest terminationStates)
name
- the name of the optionp
- the option's policyinit
- the initiation states of the optionterminationStates
- the deterministic termination states of the option.public StateConditionTest getInitiationTest()
public java.lang.String getName()
public void setName(java.lang.String name)
public Policy getPolicy()
public void setPolicy(Policy policy)
public void setInitiationTest(StateConditionTest initiationTest)
public StateConditionTest getTerminationStates()
public void setTerminationStates(StateConditionTest terminationStates)
public boolean enumerable()
public double probabilityOfTermination(State s, Episode history)
probabilityOfTermination
in interface Option
public boolean inInitiationSet(State s)
Option
Option
inInitiationSet
in interface Option
s
- the State
to test.public java.util.List<ActionProb> policyDistribution(State s, Episode history)
policyDistribution
in interface Option
public EnvironmentOptionOutcome control(Environment env, double discount)
public java.lang.String actionName()
Action
actionName
in interface Action
public Action copy()
Action
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object