Polarith AI
1.8
Steering

SteeringBehaviour is the base class for our and possibly your very own steering behaviours like Seek and Planar Avoid. When implementing your own behaviours, you will most likely inherit from this class, since it uses our base algorithms to write objective values. Please, do not get confused by the name steering though, because our approach is fundamentally different to classic steering algorithms (by Craig Reynolds). We decided to stick to this naming since the effect and the basic implementation of our steering behaviours are similar (but much more powerful when combined). For example, Seek will most likely be intended for searching interesting objects by computing a direction towards a perceived object. However, our Seek is much more versatile and it is applicable for many more different situations, e.g., to cluster the environment for a specific objective.

Basics

A steering behaviour determines how data which is provided by, e.g., an environment is processed and how the results are written to the objectives before the MCO solver makes a decision. For doing this, a steering behaviour compares a given (in-code) ResultDirection to every receptor Direction of the sensor which is currently attached to the Context of an agent. Based on this comparison, a value is written for each objective element corresponding to a receptor with respect to a given (in-code) ResultMagnitude. The property TargetObjective defines in which objective the values are finally written. The finally computed value for one objective element is dependent on the factors listed in the following table.

Scalar Description
ResultMagnitude This factor is given in-code by the concrete behaviour and can have individual interpretations. For instance, radius steering behaviours apply a mapping of the distance to the target between two radii for obtaining this value.
MapBySensitivity() (method of MoveBehaviour) This factor is based on the dot product between the ResultDirection, the receptor's Direction and multiplied by its Sensitivity. This is the base value which is scaled by the following factors. Note that this is also dependent on the set value mapping.
Magnitude (receptor) Each receptor has got its own magnitude. This can be used to weight the general receptor input.
MagnitudeMultiplier (steering behaviour) With the help of this parameter, it is possible to weight every behaviour. For example, a Seek on interesting objects can have a smaller weighting than the avoidance of an obstacle.
Significance This is a value which is given by the percept object if it has got a Steering Tag attached. It is a weighting factor for single objects which functions independently of receptors or behaviours.

Sensitivity

Like the name suggests, MapBySensitivity() considers the receptor's Sensitivity. If the it is set to is 90°, then the result for a corresponding ResultDirection which is perpendicular to the receptor's Direction would be 0. If the ResultDirection is parallel to a receptor's Direction it would be always 1. The values in between are dependent on the set value mapping.

Writing Objective Values

The overall function for writing objective value is given by the following formula and is illustrated in Figure 1.

If UseSignificance is enabled:

ResultMagnitude * MapBySensitivity(receptor.Structure.Direction, ResultDirection) * receptor.Structure.Magnitude * percept.Significance = Value

If UseSignificance is disabled:

ResultMagnitude * MapBySensitivity(receptor.Structure.Direction, ResultDirection) * receptor.Structure.Magnitude = Value

Figure 1: Shows how the steering behaviour Seek samples objective values.

Properties

The following is the set of properties which most of the inbuilt behaviours inherit from the SteeringBehaviour base class. You can read more about every property on its own manual page.

Remarks

A Steering Behaviour always ignores the Self percept even if its game object is part of a perceived environment.

It is always better to use environments instead of game object lists to filter what an agent perceives, especially if there are more agents which should perceive the same things. See this page for further information concerning performance.

Imprint