|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pakl.rl.ValueFunctionHashMap
public class ValueFunctionHashMap
A ValueFunction maps states, which are positions
in a World, to values, and may be replaced
with a neural network. When the value function
is optimal then the optimal policy can be extracted
from it.
| Constructor Summary | |
|---|---|
ValueFunctionHashMap()
|
|
ValueFunctionHashMap(World sourceWorld)
While the initial ValueFunction is arbitrary, it must be based on a World's states. |
|
ValueFunctionHashMap(World sourceWorld,
boolean SAFE_MODE)
|
|
| Method Summary | |
|---|---|
void |
addTimer(double time)
|
void |
clear()
|
java.util.Set<State> |
getKeySet()
|
java.util.Iterator |
getKeySetIterator()
|
java.lang.String |
getName()
It is important for value functions to have names for the patchwork approach, so that states can identify to which value function patch they belong by the PolicyExtractor. |
int |
getSize()
|
double |
getTimer()
|
double |
getValue(State state)
The value of a state is defined as the sum of the terinforcements received when starting in that state and following some fixed policy to a terminal state; the optimal policy would map states to actions that maximizes the sum of reinforcements received when starting in an arbitrary state and performing actions until the terminal state is reached |
void |
init(World sourceWorld)
|
void |
loadFrom(java.lang.String filename)
|
void |
resetTimer()
|
void |
saveTo(java.lang.String filename)
|
void |
setAllowExpansionOfStateBounds(boolean trueOrFalse)
|
void |
setName(java.lang.String name)
|
void |
setSafeMode(boolean b)
|
void |
setValue(State state,
double newValue)
|
void |
setValueOfNonStoredStates(double x)
|
void |
setValueOfOutOfBoundsStates(double newValueOfOutOfBoundsStates)
|
void |
setValueOfTerminalStates(double newValueOfTerminalStates)
Many problems define a value of 0 for their terminal states, where the agent can remain. |
void |
setWorld(World w)
|
int |
size()
|
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 ValueFunctionHashMap(World sourceWorld)
public ValueFunctionHashMap(World sourceWorld,
boolean SAFE_MODE)
public ValueFunctionHashMap()
| Method Detail |
|---|
public void setValueOfNonStoredStates(double x)
public void setName(java.lang.String name)
setName in interface ValueFunctionpublic java.lang.String getName()
ValueFunctionPolicyExtractor.
getName in interface ValueFunctionpublic void setSafeMode(boolean b)
public int getSize()
public void setWorld(World w)
setWorld in interface ValueFunctionpublic void init(World sourceWorld)
public void setValueOfOutOfBoundsStates(double newValueOfOutOfBoundsStates)
public void setAllowExpansionOfStateBounds(boolean trueOrFalse)
public java.util.Iterator getKeySetIterator()
public java.util.Set<State> getKeySet()
public void clear()
public int size()
public double getValue(State state)
getValue in interface ValueFunctionpublic double getTimer()
public void resetTimer()
public void addTimer(double time)
public void setValue(State state,
double newValue)
setValue in interface ValueFunction
public void saveTo(java.lang.String filename)
throws java.lang.Exception
java.lang.Exception
public void loadFrom(java.lang.String filename)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toText()
public void setValueOfTerminalStates(double newValueOfTerminalStates)
ValueFunction
setValueOfTerminalStates in interface ValueFunction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||