Main Content

Simulink Environments

Model reinforcement learning environment dynamics using Simulink® models

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 using Simulink models. For more information, see Create Simulink Reinforcement Learning Environments.

Functions

expand all

rlPredefinedEnvCreate a predefined reinforcement learning environment
rlSimulinkEnvCreate reinforcement learning environment using dynamic model implemented in Simulink
createIntegratedEnvCreate Simulink model for reinforcement learning, using reference model as environment
validateEnvironmentValidate custom reinforcement learning environment
SimulinkEnvWithAgentReinforcement learning environment with a dynamic model implemented in Simulink
generateRewardFunctionGenerate a reward function from control specifications to train a reinforcement learning agent
exteriorPenaltyExterior penalty value for a point with respect to a bounded region
hyperbolicPenaltyHyperbolic penalty value for a point with respect to a bounded region
barrierPenaltyLogarithmic barrier penalty value for a point with respect to a bounded region
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, agent, or experience buffer
getObservationInfoObtain observation data specifications from reinforcement learning environment, agent, or experience buffer
bus2RLSpecCreate reinforcement learning data specifications for elements of a Simulink bus
resetReset environment, agent, experience buffer, or policy object
setupSet up reinforcement learning environment or initialize data logger object
cleanupClean up reinforcement learning environment or data logger object

Blocks

RL AgentReinforcement learning agent

Topics