computePolicy: Computes the reinforcement learning policy

Description Usage Arguments Value See Also Examples

View source: R/policy.R

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

1

Arguments

x

Variable which encodes the behavior of the agent. This can be either a matrix, data.frame or an rl object.

Value

Returns the learned policy.

See Also

ReinforcementLearning

Examples

1
2
3
4
5
# 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)

nproellochs/ReinforcementLearning documentation built on March 3, 2020, 12:22 a.m.