Main Content

Load MATLAB Environments in Reinforcement Learning Designer

R2026b

When training an agent using the Reinforcement Learning Designer app, you can create a predefined environment object from within the app or import a custom environment object from the MATLAB® workspace.

To create a predefined environment object, on the Reinforcement Learning tab, in the Environment section, click New. Then, under MATLAB Environments, select one of the predefined environments.

Reinforcement Learning tab showing the selection of several predefined MATLAB environments from the New dropdown menu

To use a custom environment, you must first create the environment object at the MATLAB command line and then import the object into Reinforcement Learning Designer. For an introduction to creating a custom environment, see Reinforcement Learning Environments.

Once you create a custom environment using one of the available methods, import the environment into the Reinforcement Learning Designer. On the Reinforcement Learning tab, click Import. Then, under Select Environment, select the environment object.

Selecting one of the listed environments, which are available in the MATLAB workspace, from the Import dropdown menu

Once you have created or imported an environment object, the app adds the environment to the Environments pane.

The imported environment is highlighted in the Environments pane.

Once you have created an environment, you can create an agent for that environment. For more information on creating agents within Reinforcement Learning Designer, see Create Agents Using Reinforcement Learning Designer.

See Also

Functions

Objects

Apps

Topics