Planner

Planner#

class hybrid_aif.planning.Planner[source]#

Bases: Protocol

Policy inference over a PlannerContext.

Returns (q_pi, tree, policies): the policy posterior, the term tree (per-policy leaves aligned with q_pi), and the planner’s own policy set, int32 (num_policies, policy_len, K) (one column per control node) or, over continuous actions, float (num_policies, policy_len, action_dim). Callers sample from these policies. metrics=False returns None for the tree and must leave q_pi unchanged up to float reassociation. A planner that builds no tree returns {} under metrics=True.

A planner that takes a warm start carries the mark takes_init = True and accepts the keyword init, the continuous plan (policy_len, action_dim) its search starts from (the gradient and mixed planners; planner_takes_init()).

__init__(*args, **kwargs)#