rlMaxQPolicy
Policy object to generate discrete max-Q actions for custom training loops and application deployment
Since R2022a
Description
This object implements a max-Q policy, which returns the action that maximizes a
discrete action-space Q-value function, given an input observation. You can create an
rlMaxQPolicy
object from an rlQValueFunction
or
rlVectorQValueFunction
object, or extract it from an rlQAgent
, rlDQNAgent
or rlSARSAAgent
. You can
then train the policy object using a custom training loop or deploy it for your application
using generatePolicyBlock
or generatePolicyFunction
. This policy is always deterministic and does not perform
any exploration. For more information on policies and value functions, see Create Policies and Value Functions.
Creation
Description
creates the max-Q policy object policy
= rlMaxQPolicy(qValueFunction
)policy
from the discrete action-space
Q-value function qValueFunction
. It also sets the
QValueFunction
property of policy
to the
input argument qValueFunction
.
Properties
Object Functions
generatePolicyBlock | Generate Simulink block that evaluates policy of an agent or policy object |
generatePolicyFunction | Generate MATLAB function that evaluates policy of an agent or policy object |
getAction | Obtain action from agent, actor, or policy object given environment observations |
getLearnableParameters | Obtain learnable parameter values from agent, function approximator, or policy object |
reset | Reset environment, agent, experience buffer, or policy object |
setLearnableParameters | Set learnable parameter values of agent, function approximator, or policy object |
Examples
Version History
Introduced in R2022a
See Also
Functions
getGreedyPolicy
|getExplorationPolicy
|generatePolicyBlock
|generatePolicyFunction
|getAction
|getLearnableParameters
|setLearnableParameters
Objects
rlEpsilonGreedyPolicy
|rlDeterministicActorPolicy
|rlAdditiveNoisePolicy
|rlStochasticActorPolicy
|rlHybridStochasticActorPolicy
|rlQValueFunction
|rlVectorQValueFunction
|rlSARSAAgent
|rlQAgent
|rlDQNAgent