rlHybridStochasticActor
R2026bHybrid stochastic actor with a hybrid action space for reinforcement learning agents
Since R2024b
Description
This object implements a function approximator to be used as a stochastic actor
within a reinforcement learning agent with a hybrid action space (partly discrete and partly
continuous). A hybrid stochastic actor takes an environment observation as input and returns
as output a random action containing a discrete and a continuous part. The discrete part is
sampled from a categorical (also known as Multinoulli) probability distribution, and the
continuous part is sampled from a parameterized Gaussian probability distribution. After you
create an rlHybridStochasticActor object, use it to create an rlSACAgent agent with a
hybrid action space. For more information on creating actors and critics, see Create Actors, Critics, and Policy Objects.
Creation
Description
creates a hybrid stochastic actor with a hybrid action space using the deep neural network
actor = rlHybridStochasticActor(net,observationInfo,actionInfo,Name=Value)net as approximation model.
You must use the name-value pair arguments
DiscreteActionOutputNames,
ContinuousActionMeanOutputNames, and
ContinuousActionStandardDeviationOutputNames to specify the names
of the network output layers that return the probability of each possible discrete
action, and the mean and standard deviation of each component of the continuous action,
respectively. The actor uses the output of these three layers to represent the probability
distributions from which the discrete and continuous components of the action are sampled.
Note
actor does not enforce constraints set by the continuous
action specification. When using this actor in a different agent than SAC, you must
enforce action space constraints within the environment.
You can also specify the ObservationInputNames argument (to
explicitly associate the layers of your network with specific environment channels) and
the UseDevice property using optional name-value pair arguments. For
example, to use a GPU for prediction, specify UseDevice="gpu".
Input Arguments
Name-Value Arguments
Properties
Object Functions
rlSACAgent | Soft actor-critic (SAC) 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
Extended Capabilities
Version History
Introduced in R2024b
