|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pakl.rl.ReinforcementFunction
public class ReinforcementFunction
This class contains all of the required functionality for a reward function and should be applicable to all worlds. But, it must be initialized by something that knows what the appropriate reinforcement is for the world such as by a function in a Toolbox.
| Constructor Summary | |
|---|---|
ReinforcementFunction()
|
|
| Method Summary | |
|---|---|
double |
getDefaultReinforcement()
|
double |
getReward(State state,
Action action)
Return the reward given an action from a particular state. |
double |
getReward(State state,
Action action,
State newState)
Sometimes a reward is also based on the resulting state. |
void |
setDefaultReinforcement(double newDefault)
This function allows you to set the default reinforcement for any action from a state where reinforcement has not been specified. |
void |
setReward(State state,
Action action,
double newReward)
|
java.lang.String |
toText()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReinforcementFunction()
| Method Detail |
|---|
public void setDefaultReinforcement(double newDefault)
public double getDefaultReinforcement()
public java.lang.String toText()
public double getReward(State state,
Action action)
public double getReward(State state,
Action action,
State newState)
public void setReward(State state,
Action action,
double newReward)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||