langgoap.BendableScore#
- class BendableScore(hard_levels=<factory>, soft_levels=<factory>)[source]#
A variable-width score with any number of hard and soft levels.
Use this when the problem has multiple tiers of constraints that must be respected in strict priority order (e.g. “never violate legal limits; then never violate corporate policy; then minimize cost”).
Every level in
hard_levelsis bounded above by 0.soft_levelsare unconstrained in sign.- Parameters:
hard_levels (tuple[float, ...])
soft_levels (tuple[float, ...])
- __init__(hard_levels=<factory>, soft_levels=<factory>)#
- Parameters:
hard_levels (tuple[float, ...])
soft_levels (tuple[float, ...])
- Return type:
None
Methods
__init__([hard_levels, soft_levels])is_feasible()Return True if this score represents a feasible plan.
Attributes
hard_levelssoft_levelsvalueSum of every level.