S
- States Class.A
- Actions class.public class ValueIterationSolver<S extends State,A extends Action> extends AbstractDiscountedSolver<S,A>
Constructor and Description |
---|
ValueIterationSolver(CTMDP<S,A> problem,
double interestRate)
Default Constructor for continuous time problems.
|
ValueIterationSolver(DTMDP<S,A> problem,
double interestRate)
Default Constructor for Discrte time problems.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
description()
This method return a complete verbal describtion of this element.
|
ValueFunction<S> |
getBias() |
double |
getEpsilon() |
double |
getGain() |
long |
getIterations() |
long |
getProcessTime() |
boolean |
isAverage() |
java.lang.String |
label()
The sub classes must return the Solver name.
|
void |
printSolution()
Prints the solution in the default PrintWriter (System.out)
|
void |
printSolution(java.io.PrintWriter pw)
Prints the solution on a given PrintWriter.
|
void |
setEpsilon(double epsilon)
Value Iteration is a solver method this is theoretically
convergent only after infinite iterations.
|
void |
setPrintBias(boolean val) |
void |
setPrintGain(boolean val) |
Solution<S,A> |
solve()
Solves the problem.
|
void |
useErrorBounds(boolean val)
The ErrorBounds modification to the ValueIteration method is a
change that is garanteed to have a performance at least as good
as the methos without the modifications.
|
void |
useGaussSeidel(boolean val)
The GaussSeidel modification of the ValueIteration method is a
change that is garanteed to have a performance at least as good
as the methos without the modifications.
|
boolean |
usesErrorBounds() |
boolean |
usesGaussSeidel() |
getInterestRate, setInterestRate
getProblem
getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, setPrintProcessTime, setPrintValueFunction, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public ValueIterationSolver(DTMDP<S,A> problem, double interestRate)
problem
- the structure of the problem of type DTMDPinterestRate
- represents how much less is the reward
received in the next period instead of receiving it in
the present period.public ValueIterationSolver(CTMDP<S,A> problem, double interestRate)
problem
- the structure of the problem of type CTMDPinterestRate
- represents how much less is the reward
received in the next period instead of receiving it in
the present period.public void setEpsilon(double epsilon)
epsilon
- maximum difference between iterations.public void useGaussSeidel(boolean val)
val
- sets whether or not the GaussSeidel modification
will be used.useErrorBounds(boolean)
public final double getEpsilon()
public final boolean isAverage()
public final boolean usesErrorBounds()
public final boolean usesGaussSeidel()
public void useErrorBounds(boolean val)
val
- sets whether or not to use the ErrorBounds
modification.public final long getProcessTime()
public final long getIterations()
getIterations
in class AbstractInfiniteSolver<S extends State,A extends Action>
public java.lang.String label()
Solver
label
in interface JMarkovElement
label
in class Solver<S extends State,A extends Action>
Solver.toString()
public java.lang.String description()
JMarkovElement
description
in interface JMarkovElement
description
in class Solver<S extends State,A extends Action>
JMarkovElement.label()
public final double getGain()
public final ValueFunction<S> getBias()
public void setPrintBias(boolean val)
public void setPrintGain(boolean val)
public void printSolution(java.io.PrintWriter pw)
printSolution
in class AbstractInfiniteSolver<S extends State,A extends Action>
pw
- PrintWriter