Successor-Feature Transfer Recovery Harness
Use this skill to validate a reduced, mechanism-faithful recovery of Successor Features for Transfer in Reinforcement Learning. It should be used after successor-feature and GPI utilities exist and before claiming the paper mechanism has been recovered.
Inputs
- Attempt directory containing
module_plan.jsonandenvironment/runtime_handoff.json. - Generated skill root containing
successor_feature_modelandgeneralized_policy_improvement. - Soft-mode permission for a reduced/proxy experiment when full four-room or MuJoCo recovery is not feasible.
Outputs
recovery/recovery_result.jsonwithmean_transfer_advantage.recovery/logs/generated_data_item.jsondescribing the gridworld and reward weights.recovery/logs/generated_skill_invocations.jsonproving generated modules were imported/called.recovery/logs/training_trace.jsonrecording exact dynamic-programming/source-policy construction traces.
Workflow
- Construct a small deterministic shared-dynamics gridworld with feature-bearing terminal goals.
- Define source reward weights and held-out transfer weights.
- Derive source policies using exact value iteration for each source reward.
- Compute successor features for each source policy using the generated successor-feature module.
- Reweight source successor features for each held-out reward and apply generated GPI selection.
- Evaluate GPI and a restricted single-source baseline on each held-out reward.
- Save numeric returns, mechanism checks, and validation-ready artifacts.
Validation
Run:
python scripts/run_sf_transfer_recovery.py --attempt-dir <attempt_dir> --skills-root <generated_skills_root>
python tests/test_recovery_harness.py
Limitations
This is a reduced/proxy recovery. It does not reproduce the paper's four-room continuous-navigation or MuJoCo experiments, but it preserves the core mechanism of shared dynamics, changing linear rewards, successor-feature reweighting, and GPI transfer.