Polarith AI
1.8
Reduction

front-end / back-end: AIMReduction | Reduction
inherits from: AIMPerceptBehaviour<T> | PerceptBehaviour<T>

Reduction is intended to reduce objective values based on how close an agent gets to percepts. It may also use the angle between the direction to a percept and the agent's movement direction as reduction value. The result of this behaviour, as the name implies, is a reduced magnitude which is applied to the Context objectives according to the set ValueWriting type.

Properties

This component has got the following specific properties.

Property Description
MaxDistance Similar to OuterRadius of RadiusSteeringBehaviour, percepts which are located within this distance are relevant for this behaviour.
MinMagnitude The lower limit on how much the magnitude can be reduced.
AngleWeight The reduction amount is dependent on both the distance to the current percept and the angle between the agent's movement direction and the direction towards the target. With this parameter, these dependencies can be weighted as needed.

Preview

Remarks

Like a steering behaviour, reduction always ignores the Self percept even if its game object is part of a perceived environment.

If AngleWeight > 0, this behaviour requires valid velocities. So, if an agent has no Rigidbody attached, a Steering Tag which has TrackVelocity activated needs to be present.

Concerning the default parametrization, AssignLesser is pre-configured. This means that a reduced value of 0.2 would overwrite a value of 0.5. However, it would also make sense to use a non-inverse distance mapping and the Subtraction value writing mode. In every case, it is important to ensure that this behaviour is executed after the actual steering behaviours (a default Order of 1000 should ensure this). Figure 1 illustrates the effect of Reduction.

Figure 1: The above example shows the resulting magnitude values for the proximity based reduction, assuming that the agent at the right has a distance to the target which is equal to MaxDistance.

When Reduction is used in combination with other behaviours, like Seek and Flee, you can achieve effects similar to arrive but with much more flexibility. An agent which becomes slower when it gets nearer to obstacles collides less. On top of that, other behaviours might profit from an active Reduction as well. For instance, when it is used together with Align or Adjust, you can create decent swarming behaviours for your agents. (We will definitely write a blog post about this.)

Imprint