computePolicy {ReinforcementLearning} | R Documentation |
Computes the reinforcement learning policy
Description
Computes reinforcement learning policy from a given state-action table Q. The policy is the decision-making function of the agent and defines the learning agent's behavior at a given time.
Usage
computePolicy(x)
Arguments
x |
Variable which encodes the behavior of the agent. This can be
either a |
Value
Returns the learned policy.
See Also
Examples
# Create exemplary state-action table (Q) with 2 actions and 3 states
Q <- data.frame("up" = c(-1, 0, 1), "down" = c(-1, 1, 0))
# Show best possible action in each state
computePolicy(Q)
[Package ReinforcementLearning version 1.0.5 Index]