net.pakl.rl
Class ValueFunctionPerceptron
java.lang.Object
net.pakl.rl.ValueFunctionPerceptron
- All Implemented Interfaces:
- java.io.Serializable, ValueFunction
- Direct Known Subclasses:
- ValueFunctionResidualAlgorithmPerceptron
public class ValueFunctionPerceptron
- extends java.lang.Object
- implements ValueFunction
- See Also:
- Serialized Form
|
Method Summary |
protected double |
dotProduct(double[] u,
double[] v)
|
double |
forNetwork(double value)
|
double |
fromNetwork(double value)
|
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. |
net.pakl.neuralnet.Perceptron |
getNetwork()
|
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). |
protected double[] |
intsToDoubles(int[] x)
|
void |
setAllowExpansionOfStateBounds(boolean trueOrFalse)
|
void |
setHiddenUnits(int newValue)
|
void |
setLearningRate(double newValue)
|
void |
setMaxMinValue(double newValue)
|
void |
setMomentum(double momentum)
|
void |
setName(java.lang.String name)
|
void |
setRandomSeed(long x)
|
void |
setResidualWeighting(double newValue)
|
void |
setValue(State state,
double newValue)
|
void |
setValueOfOutOfBoundsStates(double newValueOfOutOfBoundsStates)
|
void |
setValueOfTerminalStates(double newValue)
Many problems define a value of 0 for their terminal states, where the agent can remain. |
void |
setWorld(World w)
|
void |
storeWeightChangesIfNonIncremental()
|
protected double |
sum(double[] v)
|
protected double |
sum(double[][] v)
|
java.lang.String |
toText()
|
protected double[][] |
vadd(double[][] v1,
double[][] v2)
|
protected double[] |
vadd(double[] v1,
double[] v2)
|
protected double[] |
vmul(double scalar,
double[] vector)
|
protected double[][] |
vmul(double scalar,
double[][] vector)
|
protected double[][] |
vsub(double[][] v1,
double[][] v2)
|
protected double[] |
vsub(double[] v1,
double[] v2)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hiddenUnits
public int hiddenUnits
learningRate
public double learningRate
momentum
public double momentum
multiplyAndAdd
public double multiplyAndAdd
INCREMENTAL_UPDATE
public boolean INCREMENTAL_UPDATE
CROSS_PRODUCT
public boolean CROSS_PRODUCT
USE_REAL_VECTORS
public boolean USE_REAL_VECTORS
ValueFunctionPerceptron
public ValueFunctionPerceptron(World w)
ValueFunctionPerceptron
public ValueFunctionPerceptron()
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface ValueFunction
getName
public java.lang.String getName()
- Description copied from interface:
ValueFunction
- 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.
- Specified by:
getName in interface ValueFunction
setValueOfOutOfBoundsStates
public void setValueOfOutOfBoundsStates(double newValueOfOutOfBoundsStates)
setAllowExpansionOfStateBounds
public void setAllowExpansionOfStateBounds(boolean trueOrFalse)
setWorld
public void setWorld(World w)
- Specified by:
setWorld in interface ValueFunction
storeWeightChangesIfNonIncremental
public void storeWeightChangesIfNonIncremental()
getNetwork
public net.pakl.neuralnet.Perceptron getNetwork()
getValue
public double getValue(State state)
- Description copied from interface:
ValueFunction
- Retrieve the value associated with a state (which may be different for non-stored states depending on the actual class
implementing this value function).
- Specified by:
getValue in interface ValueFunction
sum
protected double sum(double[] v)
sum
protected double sum(double[][] v)
vsub
protected double[] vsub(double[] v1,
double[] v2)
vsub
protected double[][] vsub(double[][] v1,
double[][] v2)
vadd
protected double[] vadd(double[] v1,
double[] v2)
intsToDoubles
protected double[] intsToDoubles(int[] x)
vadd
protected double[][] vadd(double[][] v1,
double[][] v2)
vmul
protected double[] vmul(double scalar,
double[] vector)
vmul
protected double[][] vmul(double scalar,
double[][] vector)
dotProduct
protected double dotProduct(double[] u,
double[] v)
setValue
public void setValue(State state,
double newValue)
- Specified by:
setValue in interface ValueFunction
setResidualWeighting
public void setResidualWeighting(double newValue)
setHiddenUnits
public void setHiddenUnits(int newValue)
setLearningRate
public void setLearningRate(double newValue)
setMomentum
public void setMomentum(double momentum)
setMaxMinValue
public void setMaxMinValue(double newValue)
toText
public java.lang.String toText()
setValueOfTerminalStates
public void setValueOfTerminalStates(double newValue)
- Description copied from interface:
ValueFunction
- Many problems define a value of 0 for their terminal states, where the agent can remain.
- Specified by:
setValueOfTerminalStates in interface ValueFunction
forNetwork
public double forNetwork(double value)
fromNetwork
public double fromNetwork(double value)
setRandomSeed
public void setRandomSeed(long x)