Changelog¶
Release notes are maintained at the root of the repository and reproduced here.
Changelog¶
All notable changes to this project are documented here. The format follows Keep a Changelog and the project uses Semantic Versioning.
Unreleased¶
0.3.1 - 2026-11-23¶
Added¶
- Documentation site (
docs/,mkdocs.yml, MkDocs Material +mkdocstrings): install, quickstart, concepts, specifications, reward shaping, reward machines, shielding, configuration and command-line references, plotting, troubleshooting, one page per example, and generated API pages. Built by.gitlab-ci.ymlwith--stricton every push and published to GitLab Pages from the default branch. tests/test_example_configs.py: guards that no example uses the retiredcfg_specs.cfg_rmkey and that every reward-machine transition condition is declared as a monitor formula — the failure mode that made MiniGrid's machine inert.
Changed¶
- Dependencies:
wandbandir-simwere removed from the base install (nothing referenced them), and the notebook-only stack (jupyter,ipympl,plotly,kaleido) moved to anotebooksextra.pip install rlrompulls 16 packages instead of 21. - Example notebooks carry no stored outputs any more, and no longer import
bokeh: the three heaviest shrink by ~2.5 MB in total. rlrom.wrappersis a regular package (it had no__init__.py), so static analysis —mkdocstringsamong others — can collect it.
Fixed¶
load_cfg(verbose=0)expanded no.yml/.stlreference at all: the verbosity flag doubled as the switch that turns expansion off, so areward_machine: fsm.ymlreference stayed a string and reached the wrapper unresolved.verbosenow only controls what is printed.- MiniGrid: the reward machine is declared under
cfg_specs.reward_machineswith its label formulas inmonitor_formulas; it was wired through the retiredcfg_specs.cfg_rmkey and never ran.
Removed¶
examples/minigrid/blocked_unlock_pickup/— an older task family whose configs used the retiredcfg_specs.cfg_rmkey, whose entry point importedbokeh, and whose machine conditions were not labels of the specification it loaded.examples/cartpole/rm_stuck_left.yml— an inert machine (weight: 0, and its conditionstuck_leftwas never declared as a monitor formula).examples/simglucose/— needs thesimglucosepackage, which is not a dependency; its notebook was not valid JSON either.examples/sandbox.ipynb,examples/sandbox_analysis.ipynb— scratch notebooks.
0.3.0 - 2026-11-23¶
Everything below the 0.2.0 entry: this release replaces the STL wrapper with a
unified SpecWrapper, adds reward machines and action constraints as
first-class features, and completes the CLI. It is not backward compatible
with 0.2.0 — see Removed and Changed.
Added¶
SpecWrapper(rlrom.wrappers.spec_wrapper): one wrapper for STL monitoring and reward machines, built bywrap_env_specs.- A single
monitor_formulassection. Each formula is evaluated once per step and yields a label for reward machines;obs_weightalso appends it to the observation,reward_weightadds its robustness to the reward,terminal: trueends the episode when it becomes true, andactionsconstrains the action. - Reward machines (
rlrom.wrappers.reward_machine): a pure FSM driven by STL labels, wired throughcfg_specs.reward_machines, with weights, optionalin_observation, state rewards, final states and per-state action constraints. - Shielding / action constraints:
forced,blocked,fallbackandpriorityfrom reward-machine states and from monitor formulas, with deterministic conflict resolution, plusdisable_actionsto compare shielded and unshielded runs. - Continuous-action shield hook (
cfg_specs.action_shield) forBoxaction spaces: a Python callback gated by an activation formula, with per-stepepisode['shield_active']recording andinfo['shield']reporting. cfg_specs.episode_info_keys: opt-in aggregation of environmentinfokeys intomean_<key>episode metrics.- CLI:
rlr test|train|show|plot|select-model, with--cfg-train,--cfg-test,--cfg-specsoverrides,--set-params k=v,--verbose, andshow --expand/--subcfg. rlr plotand therlrom_plotentry point: training curves from checkpoint result files, several trainings, metrics and envelopes, saved to png/pdf/svg.rlr select-modeland therlrom_select_modelentry point: pick a checkpoint by metric (or by step) and make it active forrlr test.cfg_train.repeat_training: run the same training N times from scratch.- Test-time plotting:
cfg_test.plotfigures built withstlrom.Signal, including live-updating windows (live: true). - Algorithm coverage:
sb3-contribalgorithms, SBX (JAX) algorithms, multi-objective algorithms throughmo-gymnasium/morl-baselines, and a tabular Q-learning implementation for discrete environments. - Examples: MuJoCo Hopper (fetched policy, specifications, alternative
tasks), MetaDrive (curved highway with a shield), MiniGrid
blocked_unlock_pickup, Acrobot, MountainCar, and a rewritten highway-env case study; notebooks for CartPole, highway-env, Acrobot, MiniGrid and simglucose. - Test suite: 188 tests over config handling, the wrapper, reward machines, shielding, episode figures, model selection, environment construction and training repeats.
Changed¶
requires-pythonfrom>=3.10to>=3.12.stlromdependency from>=0.2.3,<0.3.0to>=0.4.0.- Environment construction separates
env_id(the idgym.makebuilds) fromenv_name(the name the policy was published under), addsenv_kwargs, and finds custommake_env_*factories throughimport_module. flatten_obsis configurable oncfg_specs; dict observations are kept when it is off.- Training output is organised as
models/<model_name>_<date>__training<N>/, with the active model selected through a symlink and its config. cfg_train.eval, when present, is used for the periodic in-training evaluation instead ofcfg_test.- Config loading (
load_cfg,find_subcfg,set_rec_cfg_field) moved to the lightrlrom.cfg_utils, sorlr showandrlr plotrun without the training stack installed. - Episode plots are built from the recorded monitor data instead of re-running the environment.
Removed¶
rlrom.wrappers.stl_wrapper.StlWrapper— replaced bySpecWrapper.rlrom.envsand itssupported_envs,supported_models,cfg_envsmodule level API — environment metadata now comes from the config andcfg_utils/utils.- The
bokehdependency; plotting uses matplotlib andstlrom.Signal.
Fixed¶
- Singleton NumPy arrays are parsed as signals instead of failing on dimensionality.
resetis handled correctly insidestep, and the next observation reaches the wrapper.- A missing
model_namein the config raises instead of failing later. - Declaring the same formula in two deprecated sections with a non-zero weight
raises
ValueErrorinstead of double counting. - Failures when saving a model or dumping the config are caught and reported.
0.2.0 - 2025-10-25¶
STL wrapper release on PyPI: monitoring of STL formulas around a Gymnasium
environment, robustness-based reward shaping and observation augmentation,
testing through rlr test and training through rlr train. Earlier versions
on PyPI: 0.1.0, 0.1.1, 0.1.2.