|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmarkov.basic.Policy<S,A>
S
- The states classA
- Tha Action classpublic final class Policy<S extends State,A extends Action>
Policy is a set of "Decision Rules". It contains the Decision Rule for every stage t. When the problem has infinite horizon, only one decision rule is stored.
Constructor Summary | |
---|---|
Policy(DecisionRule d)
Creates a stationary policy with the given decition rule |
|
Policy(int stages)
Creates a set with the given horizon. |
Method Summary | |
---|---|
A |
getAction(S i,
int t)
Gets the action to be taken in state i at this stage t |
DecisionRule<S,A> |
getDecisionRule()
|
DecisionRule<S,A> |
getDecisionRule(int t)
Returns the decision rule for statge t |
int |
getHorizon()
Return the time horizon for this Ploicy. |
void |
print()
Prints the policy to the standard output |
void |
print(java.io.PrintWriter pw)
Prints the policy to the given PrintWriter. |
void |
setDecisionRule(DecisionRule<S,A> pol)
Sets a unique decision rule for the policy, for infinite horizon problems. |
void |
setDecisionRule(DecisionRule<S,A> dr,
int t)
Sets a decision rule for stage t in the policy |
java.lang.String |
toString()
Gives the sting representation of this Policy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Policy(int stages)
stages
- The number of stagespublic Policy(DecisionRule d)
d
- The ruleMethod Detail |
---|
public int getHorizon()
public void setDecisionRule(DecisionRule<S,A> dr, int t)
dr
- decision rulet
- stagepublic void setDecisionRule(DecisionRule<S,A> pol)
pol
- public DecisionRule<S,A> getDecisionRule()
public DecisionRule<S,A> getDecisionRule(int t)
t
- stage.
public A getAction(S i, int t)
i
- The statet
- The stage (time) at which action is to be taken.
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
public void print(java.io.PrintWriter pw)
pw
- print writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |