reinforcement learning agent -凯发k8网页登录
reinforcement learning agent
since r2019a
libraries:
reinforcement learning toolbox
description
use the rl agent block to simulate and train a reinforcement learning agent
in simulink®. you associate the block with an agent stored in the matlab® workspace or a data dictionary, such as an rlacagent
or
object.
you connect the block so that it receives an observation and a computed reward. for instance,
consider the following block diagram of the rlsimplependulummodel
model.
the observation input port of the rl agent block receives a signal that is derived from the instantaneous angle and angular velocity of the pendulum. the reward port receives a reward calculated from the same two values and the applied action. you configure the observations and reward computations that are appropriate to your system.
the block uses the agent to generate an action based on the observation and reward you
provide. connect the action output port to the appropriate input for your
system. for instance, in the rlsimplependulummodel
, the
action output port is a torque applied to the pendulum system. for more
information about this model, see train dqn agent to swing up and balance pendulum.
to train a reinforcement learning agent in simulink, you generate an environment from the simulink model. you then create and configure the agent for training against that
environment. for more information, see . when you call train
using the
environment, train
simulates the model and updates the agent associated
with the block.
ports
input
output
parameters
version history
introduced in r2019a