langgoap.StochasticRollout#
- class StochasticRollout(max_depth, model, rng=<factory>, scalar_heuristic=None)[source]#
Rollout policy that advances via a
TransitionModel.Distinct from
RandomRollout/HeuristicRolloutin one dimension: state transitions are sampled throughmodel.sample(state, action, rng)rather than applied directly fromaction.get_effects. This is the hook that lets MCTS observe transition noise (slip, learned-model drift, risk-averse pessimism) during simulation.Action selection remains greedy on the heuristic of the expected (not sampled) successor so the policy’s bias is orthogonal to the noise source.
- Parameters:
max_depth (int)
model (TransitionModel)
rng (Random)
scalar_heuristic (ScalarHeuristic | None)
- __init__(max_depth, model, rng=<factory>, scalar_heuristic=None)#
- Parameters:
max_depth (int)
model (TransitionModel)
rng (Random)
scalar_heuristic (ScalarHeuristic | None)
- Return type:
None
Methods
__init__(max_depth, model[, rng, ...])rollout(*, state, goal, actions)Attributes
max_depthmodelrngscalar_heuristic