makeAgent: Create Agent.

Description Usage Arguments Examples

View source: R/agent.R

Description

An agent consists of a policy and (optional) a value function representation and (optional) a learning algorithm.

Usage

1
2
3
makeAgent(policy, val.fun = NULL, algorithm = NULL,
  preprocess = identity, replay.memory = NULL, policy.args = list(),
  val.fun.args = list(), algorithm.args = list())

Arguments

policy

[character(1) | Policy]
A policy. If you pass a string the policy will be created via makePolicy.

val.fun

[character(1) | ValueFunction]
A value function representation. If you pass a string the value function will be created via makeValueFunction.

algorithm

[character(1) | Algorithm]
An algorithm. If you pass a string the algorithm will be created via makeAlgorithm.

preprocess

[function]
A function which preprocesses the state so that the agent can learn on this.

replay.memory

[ReplayMemory]
Replay memory for experience replay created by makeReplayMemory.

policy.args

[list]
Arguments passed on to args in makePolicy.

val.fun.args

[list]
Arguments passed on to args in makeValueFunction.

algorithm.args

[list]
Arguments passed on to args in makeAlgorithm.

Examples

1
agent = makeAgent("softmax", "table", "qlearning")

reinforcelearn documentation built on May 2, 2019, 9:20 a.m.