JSRL Value Exploration Update
When To Use
Use this skill after JSRL switching rollouts have produced trajectories and the recovery needs to show a real value-based policy update. It is suitable for reduced proxy runs and for sanity-checking full implementations.
Inputs
- Transitions containing
state,action,reward,next_state, anddone. - Q-value table or parameter dictionary for the exploration-policy.
- Learning rate and discount factor.
Outputs
- Updated Q-value parameters.
- Training trace with
loss_before,loss_after,params_before,params_after, andoptimizer_state_changed. - Greedy action helper for the exploration-policy.
Workflow
- Build a deterministic key for each state-action value.
- Compute TD targets with terminal-state handling.
- Record squared TD loss before the update.
- Apply Q-learning style updates to trainable parameters.
- Recompute loss and save parameter-change evidence.
- Use the updated greedy policy in later exploration rollouts.
Validation
Run:
python scripts/value_update.py --demo
python -m pytest tests
The demo prints before/after Q parameters and a validator-compatible training trace.
Limitations
This reduced update is not a replacement for IQL, DQN, or QT-Opt. It preserves the paper-relevant requirement that JSRL data feeds a value-based train-policy step with auditable parameter changes.