JSRL Switching Rollout Curriculum
When To Use
Use this skill to collect trajectories for JSRL or to test whether a recovery harness correctly implements the paper's two-policy handoff. It is useful for full RL environments and for reduced sparse-reward proxy environments.
Inputs
- Environment with
reset()andstep(action). - Guide-policy and exploration-policy callables.
- Horizon
H, selected guide-steph, and optional guide-step schedule. - Threshold
βused to advance curriculum stages.
Outputs
- Trajectory records with state, action, reward, next state, done flag, and
controllerequal toguideorexploration. - Handoff summary with selected
h, guide action count, exploration action count, total reward, and success flag. - Curriculum cursor updates for threshold-based advancement.
Workflow
- Clamp the selected guide-step to the valid horizon.
- Roll out the guide-policy while
t < h. - Roll out the exploration-policy after the handoff until termination or horizon.
- Append controller labels to every transition.
- Advance the curriculum only after evaluation meets or exceeds
β. - For ablations, sample guide steps from the same schedule without changing the data schema.
Validation
Run:
python scripts/switching_rollout.py --demo
python -m pytest tests
The demo prints a small trajectory and handoff summary.
Limitations
This skill does not implement a complete RL algorithm. It only owns the rollout and curriculum contract; policy/value updates belong in the value exploration update skill.