powered by
An agent consists of a policy and (optional) a value function representation and (optional) a learning algorithm.
makeAgent(policy, val.fun = NULL, algorithm = NULL, preprocess = identity, replay.memory = NULL, policy.args = list(), val.fun.args = list(), algorithm.args = list())
[character(1) | Policy] A policy. If you pass a string the policy will be created via makePolicy.
character(1)
[character(1) | ValueFunction] A value function representation. If you pass a string the value function will be created via makeValueFunction.
[character(1) | Algorithm] An algorithm. If you pass a string the algorithm will be created via makeAlgorithm.
[function] A function which preprocesses the state so that the agent can learn on this.
function
[ReplayMemory] Replay memory for experience replay created by makeReplayMemory.
ReplayMemory
[list] Arguments passed on to args in makePolicy.
list
args
[list] Arguments passed on to args in makeValueFunction.
[list] Arguments passed on to args in makeAlgorithm.
# NOT RUN { agent = makeAgent("softmax", "table", "qlearning") # }
Run the code above in your browser using DataLab