public static class QFunction.QFunctionHelper
extends java.lang.Object
Constructor and Description |
---|
QFunction.QFunctionHelper() |
Modifier and Type | Method and Description |
---|---|
static double |
getOptimalValue(QFunction qSource,
State s)
Returns the optimal state value function for a state given a
QFunction . |
static double |
getOptimalValue(QFunction qSource,
State s,
TerminalFunction tf)
Returns the optimal state value for a state given a
QFunction . |
static double |
getPolicyValue(QFunction qSource,
State s,
Policy p)
Returns the state value under a given policy for a state and
QFunction . |
static double |
getPolicyValue(QFunction qSource,
State s,
Policy p,
TerminalFunction tf)
Returns the state value under a given policy for a state and
QFunction . |
public static double getOptimalValue(QFunction qSource, State s)
QFunction
.
The optimal value is the max Q-value. If no actions are permissible in the input state, then zero is returned.public static double getOptimalValue(QFunction qSource, State s, TerminalFunction tf)
QFunction
.
The optimal value is the max Q-value. If no actions are permissible in the input state or the input state is a terminal state, then zero is returned.public static double getPolicyValue(QFunction qSource, State s, Policy p)
QFunction
.
The value is the expected Q-value under the input policy action distribution. If no actions are permissible in the input state, then zero is returned.public static double getPolicyValue(QFunction qSource, State s, Policy p, TerminalFunction tf)
QFunction
.
The value is the expected Q-value under the input policy action distribution. If no actions are permissible in the input state, then zero is returned.qSource
- the QFunction
capable of producing Q-values.s
- the query State
for which the value should be returned.p
- the policy defining the action distribution.tf
- a terminal function.