Value function iteration
function
dolo.algos.value_iteration.
evaluate_policy
(
model
, mdr
, tol=1e-08
, maxit=2000
, grid={}
, verbose=True
, dr0=None
, hook=None
, integration_orders=None
, details=False
, interp_method='cubic'
)
Compute value function corresponding to policy dr
Parameters
model
— "dtcscc" model. Must contain a 'value' function.mdr
— decision rule to evaluate
Returns
decision rule: value function (a function of the space similar to a decision rule object)
function
dolo.algos.value_iteration.
value_iteration
(
model
, verbose=False
, details=True
, tol=1e-06
, maxit=500
, maxit_howard=20
)
Solve for the value function and associated Markov decision rule by iterating over the value function.
Parameters
model
(Model) — model to be solveddr
— decision rule to evaluate
Returns (ValueIterationResult)
mdr : Markov decision rule The solved decision rule/policy function mdrv: decision rule The solved value function
dataclass
dolo.algos.results.
ValueIterationResult
(
dr
, drv
, iterations
, dprocess
, x_converged
, x_tol
, x_err
, v_converged
, v_tol
, v_err
, log
, trace
)
Bases
dolo.algos.results.AlgoResult
ValueIterationResult(dr: object, drv: object, iterations: int, dprocess: object, x_converged: object, x_tol: float, x_err: float, v_converged: bool, v_tol: float, v_err: float, log: object, trace: object)