Running experiments#
Module: statrl.experiments
The experiments package is the harness for benchmarking agents: it runs an
algorithm for many independent replicates (in parallel), measures regret against an oracle,
and plots the result. Everything is glued together by one entry point.
The orchestrator#
runLargeMulticoreExperiment():
runLargeMulticoreExperiment(
env, agents, oracle, interact,
timeHorizon=1000, nbReplicates=100, root_folder="results/",
)
For each agent it launches nbReplicates runs, runs the oracle for the same
horizon, computes the regret (oracle score minus agent score), writes a logfile, and saves
regret plots under root_folder.
The pipeline underneath#
Function |
Role |
|---|---|
Runs |
|
Runs a single interaction and pickles the score series to disk (one replicate). |
|
Loads the pickled scores and computes regret statistics vs. the oracle: mean, median, and the 0.25 / 0.75 quantiles over time. |
|
Produces the regret plots (linear and log-scaled |
|
Pickle helper used to persist intermediate score series (with
|
Results are written under root_folder (default "results/"): the intermediate
per-replicate dumps, a logfile, and the regret figures.