|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.basic.Policy<S,A>
public 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 Markov policy wit the given decition rule |
|
Policy(int stages)
Creates a set with the given horizon. |
Method Summary | |
---|---|
DecisionRule<S,A> |
decisionRule(int t)
Returns the decision rule for this t |
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)
|
int |
getHorizon()
|
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> pol,
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)
public Policy(DecisionRule d)
Method Detail |
---|
public int getHorizon()
public void setDecisionRule(DecisionRule<S,A> pol, int t)
public void setDecisionRule(DecisionRule<S,A> pol)
pol
- public DecisionRule<S,A> getDecisionRule()
public DecisionRule<S,A> getDecisionRule(int t)
t
- stage
public DecisionRule<S,A> decisionRule(int t)
public A getAction(S i, int t)
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 |