getAction
Obtain action from agent or actor given environment observations
Syntax
Description
Agent
returns the action derived from the policy of a reinforcement learning agent, given
environment observations. If agentAction
= getAction(agent
,obs
)agent
contains a recurrent neural
network, its state is updated.
[
also returns the updated agent as an output argument.agentAction
,agent
] = getAction(actor
,obs
)
Actor Representation
returns the action derived from the policy represented by the actor
actorAction
= getAction(actor
,obs
)actor
, given environment observations
obs
.
[
also returns the updated state of the actor when it uses a recurrent neural
network.actorAction
,nextState
] = getAction(actor
,obs
)
Examples
Input Arguments
Output Arguments
Tips
The more general function evaluate
behaves, for
actor objects, similarly to getAction
except for the following
differences.
For an
rlDiscreteCategoricalActor
actor object,evaluate
returns the probability of each possible actions, (instead of a sample action asgetAction
).For an
rlContinuousGaussianActor
actor object,evaluate
returns the mean and standard deviation of the Gaussian distribution, (instead of a sample action asgetAction
).
para