powered by
Run interaction between agent and environment for specified number of steps or episodes.
interact(env, agent, n.steps = Inf, n.episodes = Inf, max.steps.per.episode = Inf, learn = TRUE, visualize = FALSE)
[Environment] Reinforcement learning environment created by makeEnvironment.
Environment
[Agent] Agent created by makeAgent.
Agent
[integer(1)] Number of steps to run.
integer(1)
[integer(1)] Number of episodes to run.
[integer(1)] Maximal number of steps allowed per episode.
[logical(1)] Should the agent learn?
logical(1)
[logical(1)] Visualize the interaction between agent and environment?
[list] Return and number of steps per episode.
list
# NOT RUN { env = makeEnvironment("windy.gridworld") agent = makeAgent("softmax", "table", "qlearning") interact(env, agent, n.episodes = 10L) # }
Run the code above in your browser using DataLab