Trait relearn::agents::Agent [−][src]
pub trait Agent<O, A>: Actor<O, A> {
fn update(&mut self, step: Step<O, A>, logger: &mut dyn TimeSeriesLogger);
}
Expand description
A learning agent.
Takes actions in a reinforcement learning environment and updates based on the result (including reward).
Required methods
fn update(&mut self, step: Step<O, A>, logger: &mut dyn TimeSeriesLogger)
fn update(&mut self, step: Step<O, A>, logger: &mut dyn TimeSeriesLogger)
Update the agent based on the most recent action.
Must be called immediately after the corresponding call to Actor::act
,
before any other calls to act
are made.
This allows the agent to internally cache any information used in selecting the action
that would also be useful for updating on the result.
Args
step
: The environment step resulting from the most recent call toActor::act
.