Interaction#
- class statrl.experiments.onerun.Interaction[source]#
Bases:
ABCBase class for the interaction loop of a setting.
Methods
__init__()renderrun(env, learner, horizon)Run one interaction with rendering enabled, returning no score.
run(env, learner, horizon)Run one interaction and return its cumulative expected score.
Attributes
Axis labels
(x, y)for the regret plots.- abstract property plotlabels#
Axis labels
(x, y)for the regret plots.Read by
runLargeMulticoreExperiment()and forwarded toplotScoreDiffs(). Settings whose rounds are not time steps override it — the batch setting labels its x-axis by episode.
- abstractmethod renderrun(env, learner, horizon)[source]#
Run one interaction with rendering enabled, returning no score.
- abstractmethod run(env, learner, horizon)[source]#
Run one interaction and return its cumulative expected score.
- Parameters:
- Returns:
Cumulative expected reward. Implementations must return exactly
horizonentries —oneRunWithDump()asserts it.- Return type:
ndarray of shape (horizon,)