langgoap.RuleBasedClassifier

langgoap.RuleBasedClassifier#

class RuleBasedClassifier(branching_threshold=30, horizon_threshold=20, prefer_mcts_for_stochastic=False)[source]#

Lexicographic classifier with conservative defaults.

Order of precedence:
  1. Hard constraints / soft objectives / trajectory metrics → "csp-pipeline".

  2. risk_profile == "risk-averse" → "mcts" (explicit user opt-in via DivergencePolicy).

  3. is_stochastic + prefer_mcts_for_stochastic=True → "mcts" (gated opt-in).

  4. Large branching (action_count >= branching_threshold) + deep horizon (horizon_estimate >= horizon_threshold) → "mcts".

  5. Default → "astar".

Parameters:
  • branching_threshold (int)

  • horizon_threshold (int)

  • prefer_mcts_for_stochastic (bool)

__init__(branching_threshold=30, horizon_threshold=20, prefer_mcts_for_stochastic=False)#
Parameters:
  • branching_threshold (int)

  • horizon_threshold (int)

  • prefer_mcts_for_stochastic (bool)

Return type:

None

Methods

__init__([branching_threshold, ...])

Attributes

branching_threshold

horizon_threshold

prefer_mcts_for_stochastic