hybrid_aif.reference.raif.seed#
Seeding M⁺: episode collection in their driver’s row convention, and the bang-bang
fallback controller for fixture-less runs. Seed statistics are
hybrid_aif.train.buffers.seed_stats().
Design: docs/design/amortization.md A12 item 6.
Module Attributes
A policy for |
Functions
|
|
|
|
|
Run one episode eagerly and record it as an |
|
An |
Classes
|
Array base class for JAX |
|
|
|
One episode's per-step columns — the format the whole training side speaks. |
|
Sparse-reward continuous Mountain Car. |
- hybrid_aif.reference.raif.seed.Policy#
A policy for
collect_episode():(key, obs) -> actionof shape(1,).
- hybrid_aif.reference.raif.seed.bang_bang(key, obs)[source]#
a = sign(velocity): full throttle in the direction of travel, deterministic.sign(0) = 0at the reset state costs one step and is not tie-broken.
- hybrid_aif.reference.raif.seed.collect_episode(env, policy, key, *, can_self_imitate=False, steps=None)[source]#
Run one episode eagerly and record it as an
Episode.steps(default: the env’stime_limit) bounds the applied actions, so the episode is at moststeps + 1rows and stops early at the goal. Rows follow their driver, ashybrid_aif.reference.raif.run.make_collect_fn()does: rowtis(obs_t, reward_t, flags_t, a_t)withreward_tcaused bya_{t−1}, opened by a reset row atreward = 0and closed by a terminal row whose action is zeroed and whosecan_self_imitateis cleared.is_successis the goal predicate on the row’s observation,has_succeededits running OR, andcan_self_imitateis the caller’s flag for the policy (Truefor expert data).Design:
docs/experiments/raif-mountain-car/execution-ledger-acting.mdD1–D3.
- hybrid_aif.reference.raif.seed.bang_bang_episodes(key, n_episodes=22, env=None)[source]#
n_episodesseed episodes frombang_bang(), flagged expert.The default 22 is their Mountain Car seed budget (≈1,000 agent steps). Every row but the terminal one has
can_self_imitate=True.