Reinforcement learning policies.

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

Examples

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