generatePolicyFunction
Generate MATLAB function that evaluates policy of an agent or policy object
Syntax
Description
This function generates a MATLAB® policy evaluation function which you can use to:
Generate code for deployment purposes using MATLAB Coder™ or GPU Coder™. For more information, see Deploy Trained Reinforcement Learning Policies.
Simulate the trained agent in Simulink® using a MATLAB Function (Simulink) block.
This function also creates a data file which stores policy information. The evaluation function loads this data file to properly initialize itself the first time it is called.
For more information on policies and value functions, see Create Policies and Value Functions.
generatePolicyFunction(
creates a
function that evaluates the learned policy of the specified policy object using the
default function name, policy name, and data file name.policy
)
generatePolicyFunction(___,
specifies the function name, policy name, and data file name using one or more name-value
pair arguments.Name=Value
)
Examples
Input Arguments
Version History
Introduced in R2019aSee Also
Functions
Objects
rlMaxQPolicy
|rlEpsilonGreedyPolicy
|rlAdditiveNoisePolicy
|rlDeterministicActorPolicy
|rlStochasticActorPolicy
|dlnetwork