irlc.ex01.agent.Agent
- class irlc.ex01.agent.Agent(env)[source]
Main agent class. See (Her21, Subsection 4.4.3) for additional details.
- Example
>>> print("Hello World") "Hello world"
\begin{eqnarray} y & = & ax^2 + bx + c \\ f(x) & = & x^2 + 2xy + y^2 \end{eqnarray}- __init__(env)[source]
Instantiate the Agent class.
- Parameters
env (
Env
) – An openai gym Environment instance.
Methods
__init__
(env)Instantiate the Agent class.
Optional: Can be used to record extra information from the Agent while training.
hello
(greeting)The canonical hello world example.
pi
(s[, k])Evaluate the Agent's policy at time step k in state s
train
(s, a, r, sp[, done])Called at each step of the simulation after a = pi(s,k) and environment transition to sp.