makePolicy: Create policy.

View source: R/policy.R

makePolicyR Documentation

Create policy.

Description

Reinforcement learning policies.

Usage

makePolicy(class = "random", args = list(), ...)

Arguments

class

[character(1)]
Class of policy. One of c("random", "epsilon.greedy", "greedy", "softmax").

args

[list]
Optional list of named arguments passed on to the subclass. The arguments in ... take precedence over values in this list. We strongly encourage you to use one or the other to pass arguments to the function but not both.

...

[any]
Optional named arguments passed on to the subclass. Alternatively these can be given using the args argument.

Value

[list(name, args)] List with the name and optional args. This list can then be passed onto makeAgent, which will construct the policy accordingly.

Policies

  • RandomPolicy

  • GreedyPolicy

  • EpsilonGreedyPolicy

  • SoftmaxPolicy

Examples

policy = makePolicy("random")
policy = makePolicy("epsilon.greedy", epsilon = 0.1)

markdumke/reinforcelearn documentation built on Nov. 17, 2022, 12:53 a.m.