sophisticated_plan

sophisticated_plan#

hybrid_aif.planning.sophisticated_plan(
ctx,
use_bound='midpoint',
metrics=True,
memory_budget=None,
split_depth=None,
batch_size=None,
)[source]#

The sophisticated planner with its memory options.

batch_size sets the number of subtrees evaluated at once below split_depth (1 when only batch_size is given). With neither, memory_budget (bytes) chooses them from the estimate (chunk_plan()): the largest batch that fits, deepening the split until one subtree fits unless split_depth is given. With none of the three, the whole deepest level is evaluated. The q_pi, G and plan are the same at every setting up to float rounding.

A per-step legal= mask that is traced is not checked: one leaving no legal action at a depth gives a NaN q_pi.