This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

MATLAB Environments

Model reinforcement learning environment dynamics using MATLAB®

In a reinforcement learning scenario, the environment models the dynamics with which the agent interacts. The environment:

  1. Receives actions from the agent

  2. Outputs observations resulting from the dynamic behavior of the environment model

  3. Generates a reward measuring how well the action contributes to achieving the task

You can create predefined and custom environments in MATLAB. For more information, see Create MATLAB Environments for Reinforcement Learning.

Functions

expand all

rlPredefinedEnvCreate a predefined reinforcement learning environment
rlFunctionEnvSpecify custom reinforcement learning environment dynamics using functions
rlCreateEnvTemplateCreate custom reinforcement learning environment template
rlMDPEnvCreate Markov decision process environment for reinforcement learning
createMDPCreate Markov decision process model
createGridWorldCreate a two-dimensional grid world for reinforcement learning
validateEnvironmentValidate custom reinforcement learning environment
rlFiniteSetSpecCreate discrete action or observation data specifications for reinforcement learning environments
rlNumericSpecCreate continuous action or observation data specifications for reinforcement learning environments
getActionInfoObtain action data specifications from reinforcement learning environment or agent
getObservationInfoObtain observation data specifications from reinforcement learning environment or agent

Topics

Create MATLAB Environments for Reinforcement Learning

Model environment dynamics using a MATLAB object that interacts with the agent, generating rewards and observations in response to agent actions.

Define Reward Signals

Create a reward signal that measures how successful the agent is at achieving its goal.

Load Predefined Control System Environments

You can train agents in predefined MATLAB control system environments for which the actions, observations, rewards, and dynamics are already defined.

Load Predefined Grid World Environments

You can train agents in predefined MATLAB grid world environments for which the actions, observations, and rewards are already defined.

Create Custom Grid World Environments

You can create custom MATLAB grid world environments by defining your own size, rewards and obstacles.

Create MATLAB Environment using Custom Functions

Create a reinforcement learning environment by supplying custom dynamic functions.

Create Custom MATLAB Environment from Template

You can define a custom reinforcement learning environment by creating and modifying a template environment object.