Weighted

A SteeringStrategy performing a weighted sum of steering actions (see computeNextPosition).

Parameters

environment
the environment in which the node moves.
node
the owner of the steering actions combined by this strategy.
weight
lambda used to assign a weight to each steering action: the higher the weight, the greater the
importance of the action.

Inheritors

Constructors

Link copied to clipboard
constructor(environment: Euclidean2DEnvironment<T>, node: Node<T>, weight: SteeringAction<T, Euclidean2DPosition>.() -> Double)

Functions

Link copied to clipboard

actions are partitioned in group steering actions and non-group steering actions. The overall next position for each of these two sets of actions is computed via weighted sum. The resulting vectors are then summed together (with unitary weight).

Link copied to clipboard

If there's no SteeringActionWithTarget among the provided actions, a zero vector is returned. Otherwise, the closest target is picked.