langgoap.TransitionModel#
- class TransitionModel(*args, **kwargs)[source]#
Separates action specs from world dynamics.
Implementations expose two views:
expected()— deterministic point estimate, used by A*, CSP, and MCTS tree expansion. Must equalaction.get_effects(state)unlessdivergence_policyopts out (seeDivergencePolicy).sample()— one draw from the effect distribution, used by MCTS rollouts and the graph action-executor. Free to diverge fromexpected()— that divergence is the whole point of a non-deterministic model.
The optional
divergence_policyattribute declares intentional divergence betweenexpected()and the action’s declared effects. Its absence (orNone) means strict equality is enforced byassert_expected_matches_declared().- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)expected(state, action)sample(state, action, rng)Attributes
divergence_policy