rlFunctionEnv
Create custom reinforcement learning environment using your reset and step functions
Description
Use rlFunctionEnv
to create a custom reinforcement learning
environment by supplying your own reset and step MATLAB® functions. This object is useful when you want to create an environment
different from the built-in ones available with rlPredefinedEnv
. To
verify the operation of your environment, rlFunctionEnv
automatically calls
validateEnvironment
after creating the
environment.
Creation
Description
creates a reinforcement learning environment using the provided observation and action
specifications, env
= rlFunctionEnv(observationInfo
,actionInfo
,stepFcn
,resetFcn
)observationInfo
and actionInfo
,
respectively. The stepFcn
and resetFcn
arguments
are the names of your step and reset MATLAB functions, respectively, and they are used to set the StepFcn
and ResetFcn
properties of env
.
Input Arguments
Properties
Object Functions
getActionInfo | Obtain action data specifications from reinforcement learning environment, agent, or experience buffer |
getObservationInfo | Obtain observation data specifications from reinforcement learning environment, agent, or experience buffer |
train | Train reinforcement learning agents within a specified environment |
sim | Simulate trained reinforcement learning agents within specified environment |
validateEnvironment | Validate custom reinforcement learning environment |
Examples
Version History
Introduced in R2019aSee Also
Functions
rlPredefinedEnv
|rlCreateEnvTemplate
|validateEnvironment
|rlSimulinkEnv
|getObservationInfo
|getActionInfo