Optimal Distance from an enemy unit(s) is the distance at which we have maximum advantage and enemy unit(s) have maximum disadvantage.
In three dimensions, such as in a Stitie Space Model, to have certain unit(s) of the same type engage other unit(s) at optimal distance requires use of Certain Formations...
Form is idea, that gives qualities. Formation is spread of units in space.
Transition between such Certain Formations can happen in steps, and can be realized with MATEN Certain Form Invocation or with Prism Transformation as neccessary.
Optimal transition can consider many factors, such as keeping distance from certain unit(s) or points in space, or quickness of transition between Formations (amount of steps).
Formation (positions or at least coordinates of units in space) can be described by a function, complex or not.
Position is coordinates plus direction.
(to be finished if neccessary).
See also: Stitie Machine 1.1 'Sunsail' for Stitie Space, MATEN & Prism, Robot Swarm, Internet of Things, the Distributed Machine.