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())
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
agent = makeAgent("softmax", "table", "qlearning")