Create custom reinforcement learning environment template



rlCreateEnvTemplate(className) creates and opens a MATLAB® script that contains a template class representing a reinforcement learning environment. The template class contains an implementation of a simple cart-pole balancing environment. To define your custom environment, modify this template class. For more information, see Create Custom MATLAB Environment from Template.


Create Custom Environment Template File

Create and open a template file for a reinforcement learning environment. Name the class myEnvironment.


This function opens a MATLAB script that contains the class. Modify this template class, and save the file as myEnvironment.m.

Input Arguments

collapse all

Name of environment class, specified as a string or character vector. This name defines the name of the class and the name of the MATLAB script.

Introduced in R2019a