|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eyelanguage.rl.reading.ParallelToSerialVFAdapter
public class ParallelToSerialVFAdapter
Wraps a normal value function but converts parallel states into serial states before relaying state value requests to the value function. This is an instance of the "decorator" pattern.
| Field Summary | |
|---|---|
double |
SERIAL_ATTEND_INTERVAL
|
| Constructor Summary | |
|---|---|
ParallelToSerialVFAdapter(ValueFunction vf)
|
|
| Method Summary | |
|---|---|
ReadingStateRelative |
convertParallelToSerial(ReadingStateParallelRelative s)
Exploits the copyFrom() method of ReadingStates such that a newly created serial state (ReadingStateRelative) will automagically extract the information it needs from a parallel state -- the only other thing is that time spent attending has to be rounded to the granularity of which the agent was trained (e.g. |
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. |
double |
getValue(State state)
Retrieve the value associated with a state (which may be different for non-stored states depending on the actual class implementing this value function). |
void |
setName(java.lang.String name)
|
void |
setValue(State state,
double newValue)
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double SERIAL_ATTEND_INTERVAL
| Constructor Detail |
|---|
public ParallelToSerialVFAdapter(ValueFunction vf)
| Method Detail |
|---|
public void setWorld(World w)
setWorld in interface ValueFunctionpublic double getValue(State state)
ValueFunction
getValue in interface ValueFunctionpublic ReadingStateRelative convertParallelToSerial(ReadingStateParallelRelative s)
public java.lang.String getName()
ValueFunctionPolicyExtractor.
getName in interface ValueFunctionpublic void setName(java.lang.String name)
setName in interface ValueFunction
public void setValue(State state,
double newValue)
setValue in interface ValueFunctionpublic void setValueOfTerminalStates(double newValueOfTerminalStates)
ValueFunction
setValueOfTerminalStates in interface ValueFunctionpublic void setValueOfOutOfBoundsStates(double newValueOfOutOfBoundsStates)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||