rlContinuousDeterministicActor
Deterministic actor with a continuous action space for reinforcement learning agents
Since R2022a
Description
This object implements a function approximator to be used as a deterministic actor
within a reinforcement learning agent with a continuous action space. A continuous
deterministic actor takes an environment observation as input and returns as output an action
that is a parametrized deterministic function of the observation, thereby implementing a
parametrized deterministic policy. After you create an
rlContinuousDeterministicActor
object, use it to create a suitable agent,
such as rlDDPGAgent
. For more
information on creating actors and critics, see Create Policies and Value Functions.
Creation
Syntax
Description
creates a continuous deterministic actor object using the deep neural network
actor
= rlContinuousDeterministicActor(net
,observationInfo
,actionInfo
)net
as underlying approximation model. For this actor,
actionInfo
must specify a continuous action space. The network
input layers are automatically associated with the environment observation channels
according to the dimension specifications in observationInfo
. The
network must have a single output layer with the same data type and dimensions as the
action specified in actionInfo
. This function sets the
ObservationInfo
and ActionInfo
properties of
actor
to the observationInfo
and
actionInfo
input arguments, respectively.
creates a continuous deterministic actor object using a custom basis function as
underlying approximation model. The first input argument is a two-element cell array
whose first element is the handle actor
= rlContinuousDeterministicActor({basisFcn
,W0
},observationInfo
,actionInfo
)basisFcn
to a custom basis
function and whose second element is the initial weight vector W0
.
This function sets the ObservationInfo
and
ActionInfo
properties of actor
to the
observationInfo
and actionInfo
input
arguments, respectively.
specifies names of the observation input layers (for network-based approximators) or
sets the actor
= rlContinuousDeterministicActor(___,Name=Value
)UseDevice
property using one or more name-value arguments.
Specifying the input layer names allows you explicitly associate the layers of your
network approximator with specific environment channels. For all types of approximators,
you can specify the device where computations for actor
are
executed, for example UseDevice="gpu"
.
Input Arguments
Properties
Object Functions
rlDDPGAgent | Deep deterministic policy gradient (DDPG) reinforcement learning agent |
rlTD3Agent | Twin-delayed deep deterministic (TD3) policy gradient reinforcement learning agent |
getAction | Obtain action from agent, actor, or policy object given environment observations |
evaluate | Evaluate function approximator object given observation (or observation-action) input data |
gradient | (Not recommended) Evaluate gradient of function approximator object given observation and action input data |
accelerate | (Not recommended) Option to accelerate computation of gradient for approximator object based on neural network |
getLearnableParameters | Obtain learnable parameter values from agent, function approximator, or policy object |
setLearnableParameters | Set learnable parameter values of agent, function approximator, or policy object |
setModel | Set approximation model in function approximator object |
getModel | Get approximation model from function approximator object |
Examples
Version History
Introduced in R2022a