All Packages Class Hierarchy This Package Previous Next Index
Class sim.funApp.ValuePolicy
java.lang.Object
|
+----sim.funApp.FunApp
|
+----sim.funApp.ValuePolicy
- public class ValuePolicy
- extends FunApp
This funApp is used in conjunction with the Graph3D display object to observe the
policy and value function associated with a learning algorithm and MDP.
This does not implement findGradient or findHessian.
This code is (c) 1996,1997 Mance Harmon
<harmonme@aa.wpafb.af.mil>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
- Version:
- 1.13 27 June 98
- Author:
- Mance Harmon
-
ValuePolicy()
-
-
clone()
- Make an exact duplicate of this class.
-
cloneVars(FunApp)
- After making a copy of self during a clone(), call cloneVars() to
copy variables into the copy, then return super.cloneVars(copy).
-
evaluate()
- calculate the output for the given input
-
getParameters(int)
- Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
-
initialize(int)
- Initialize, either partially or completely.
-
nWeights(int, int)
- Return # weights needed for nIn inputs (including the first //this routine is never called, should throw null pointer exception
one which is always 1.0), and nOut outputs.
-
setIO(Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix)
- Define the Matrix objects that will be used by evaluate(), findGradients(),
and findHessian().
-
setWatchManager(WatchManager, String)
- Register all variables with this WatchManager.
ValuePolicy
public ValuePolicy()
getParameters
public Object[][] getParameters(int lang)
- Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
- Overrides:
- getParameters in class FunApp
- See Also:
- getParameters
setIO
public void setIO(Matrix inVect,
Matrix outVect,
Matrix weights,
Matrix dEdIn,
Matrix dEdOut,
Matrix dEdWeights,
Matrix dEdIndIn,
Matrix dEdOutdOut,
Matrix dEdWeightsdWeights) throws MatrixException
- Define the Matrix objects that will be used by evaluate(), findGradients(),
and findHessian(). First 6 should be column vectors (n by 1 matrices).
The last 3 parameters can be null if the Hessian is never to be calculated.
If a function approximator overrides this, it should first call
super.setIO() for important housekeeping.
- Throws: MatrixException
- if inputs are vectors with nonmatching sizes
- Overrides:
- setIO in class FunApp
evaluate
public void evaluate()
- calculate the output for the given input
- Overrides:
- evaluate in class FunApp
nWeights
public int nWeights(int nIn,
int nOut)
- Return # weights needed for nIn inputs (including the first //this routine is never called, should throw null pointer exception
one which is always 1.0), and nOut outputs.
- Overrides:
- nWeights in class FunApp
setWatchManager
public void setWatchManager(WatchManager wm,
String name)
- Register all variables with this WatchManager.
This will be called after all parsing is done.
setWatchManager should be overridden and forced to
call the same method on all the other objects in the experiment.
- Overrides:
- setWatchManager in class FunApp
clone
public Object clone()
- Make an exact duplicate of this class. For objects it contains, it
only duplicates the pointers, not the objects they point to. For a
new FunApp called MyFunApp, the code in this method should be the
single line: return cloneVars(new MyFunApp());
- Overrides:
- clone in class FunApp
cloneVars
public Object cloneVars(FunApp copy)
- After making a copy of self during a clone(), call cloneVars() to
copy variables into the copy, then return super.cloneVars(copy).
The variables copied are just those set in parse() and
setWatchManager(). The caller will be required to call
setIO to set up the rest of the variables.
- Overrides:
- cloneVars in class FunApp
initialize
public void initialize(int level)
- Initialize, either partially or completely.
- Overrides:
- initialize in class FunApp
- See Also:
- initialize
All Packages Class Hierarchy This Package Previous Next Index