langgoap.UniformRandomAgentModel#
- class UniformRandomAgentModel(*, enumerate_actions, default)[source]#
Baseline
AgentModelthat draws uniformly from a legal set.enumerate_actionsreturns the legal actions available to the modelled agent instate.samplepicks one uniformly via the supplied RNG;expected()returnsdefaultbecause the mode of a uniform distribution is ill-defined — callers who want a particular point estimate should plug a smarterAgentModelimplementation.The
defaultaction is also returned whenenumerate_actionsyields an empty sequence (no legal moves).- Parameters:
enumerate_actions (Callable[[Mapping[str, Any]], Sequence[A]])
default (A)
- __init__(*, enumerate_actions, default)[source]#
- Parameters:
enumerate_actions (Callable[[Mapping[str, Any]], Sequence[A]])
default (A)
- Return type:
None
Methods
__init__(*, enumerate_actions, default)expected(state)sample(state, rng)