Episode#
- class hybrid_aif.train.Episode[source]#
Bases:
NamedTupleOne episode’s per-step columns — the format the whole training side speaks.
Leaves are
(T, ...)for one episode,(B, T, ...)for a batch. Rowtpairsobs[t]with the action then drawn at it, soreward[t]is the reward ofaction[t−1]and every flag is a predicate onobs[t].Tapplied actions makeT + 1rows: a reset row (is_first,reward = 0) and a terminal row with the action zeroed.- extras: dict[str, Array]#
The task’s own per-step columns,
(T, ...)each, carried through untouched.
- prev_actions()[source]#
The actions re-indexed so entry
tisa_{t−1}; step 0 gets zeros.fit_world()’s convention.
- static __new__(_cls, obs, action, reward, cont, is_first, is_last, extras={})#
Create new instance of Episode(obs, action, reward, cont, is_first, is_last, extras)