Policy
Libraries:
Reinforcement Learning Toolbox
Description
Use the Policy block to simulate a reinforcement learning policy in
Simulink® and to generate code (using Simulink
Coder™) for deployment purposes. This block takes an observation as input and returns
an action as output. You associate the block with a MAT file that contains the information
needed to fully characterize the policy. The MAT file can be generated by the generatePolicyFunction
or generatePolicyBlock
function.
Examples
Ports
Input
Output
Parameters
Tips
When using Embedded Coder® to generate parallel code, enable the Generate parallel for
loops optimization parameter to improve the performance when the data being
processed is large in size. However, if the network and the data is small, the overhead of
initializing the threads for parallelization significantly reduces the performance. In this
case, disable Generate parallel for loops. See Generate parallel for-loops (Embedded Coder) and coder.MexCodeConfig
(MATLAB Coder) for more information.
Extended Capabilities
Version History
Introduced in R2022b
See Also
Functions
bus2RLSpec
|createIntegratedEnv
|generatePolicyFunction
|generatePolicyBlock
|policyParameters
|updatePolicyParameters
Objects
rlMaxQPolicy
|rlEpsilonGreedyPolicy
|rlAdditiveNoisePolicy
|rlDeterministicActorPolicy
|rlStochasticActorPolicy