langgoap.MinimizeTrajectoryMax

langgoap.MinimizeTrajectoryMax#

class MinimizeTrajectoryMax(name, expression, weight=1.0)[source]#

Minimise the worst-case (maximum) value of expression.

Useful for peak-threat semantics: a plan whose integral proximity is low but which briefly spikes close to a ghost may be acceptable under MinimizeTrajectorySum and unacceptable under MinimizeTrajectoryMax.

Parameters:
  • name (str)

  • expression (Callable[[PlanningState], float])

  • weight (float)

__init__(name, expression, weight=1.0)#
Parameters:
  • name (str)

  • expression (Callable[[PlanningState], float])

  • weight (float)

Return type:

None

Methods

__init__(name, expression[, weight])

evaluate(plan)

Attributes

weight

name

expression