register_planner#
- hybrid_aif.planning.register_planner(name, *, needs_key=False, branching=False, legal_depth=False)[source]#
Decorator registering a planner under
namefor resolution by Systems.needs_key=Truemarks a stochastic planner, which readsPlannerContext.key.branching=Truemarks a closed-loop planner that scores each step on beliefs updated by the outcomes of earlier steps; it may be declared with a System’sbranch_onmodalities, and when they are declared its context’s step and terminal terms score a state target by its cross-entropy rather than its KL (design: per-variable-infogain.md V11 decisions 6 and 8). The marks are set on the function object, so they travel with a planner passed as a callable:System.infer_policies/actthen require aplan_keyfor a stochastic planner and build the branching step terms for a branching one.legal_depth=Truemarks a planner that readsPlannerContext.legal_steps, masking the illegal actions at every depth of its plan; alegal=mask given per step is then handed to it, and the System applies only the first step’s row to the policies the planner returns.