Objectives

Objectives#

The quantity a planner minimises is a tree of named terms, one block per state factor or modality. Each term is an Interval that bounds a quantity such as risk, ambiguity or information gain, and says whether the bound is exact. total folds a tree into the single expected free energy. The default objective is the standard expected free energy.

Which variables carry an information-gain term is set by the epistemic selector of a System, by name: a state factor, the parameters of a transition or of a likelihood. Leaving a name out removes that term and nothing else. Preferences enter through the targets described under Preferences. New terms are added by registering a name and a sign.

Term trees#

total

Fold a term tree into a single G Interval (expected free energy, minimized).

merge

Merge term trees block-wise, dropping empty terms.

map_leaves

Apply fn to every Interval leaf, preserving the term/block structure.

register_term

Register a term name with its sign as a contribution to G: +1.0 for a cost, -1.0 for a value.

Intervals#

Interval

A closed interval [lower, upper], broadcastable like its member arrays.