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 outputs
an action. You associate the block with a MAT-file that contains the information needed to
fully characterize the policy, and which can be generated by generatePolicyFunction
or generatePolicyBlock
.
Examples
Ports
Input
Output
Parameters
Tips
When using Embedded Coder® to generate parallel code, enabling the Generate parallel for loops optimization parameter improves 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
Objects
rlMaxQPolicy
|rlEpsilonGreedyPolicy
|rlAdditiveNoisePolicy
|rlDeterministicActorPolicy
|rlStochasticActorPolicy