To enable an artificial fish to follow a moving target, we have implemented a routine chasing-target. This routine plays a crucial role in several higher-level behavior routines such as mating.
Fig.
outlines the chasing-target(
,
I,
) routine, where
(Fig.
) is the
3D position of the target in the fish's local coordinate system , I
is an integer indexing the fish's current intention, and
is a threshold angle indicating how closely in direction
(orientation) the fish should follow the target. The closeness is
measured by E where
is the angle between the
fish's orientation
and the projection of
onto the local
-plane (Fig.
). In most cases (i.e. when I=
mate, I= leave, and I= school),
is a
nonzero constant (e.g.
when I= school) so
that the fish can quickly approach the target in roughly the right
direction rather than spending most of its time steering without
making much progress. When I = eat,
is given
according to the distance d to the target (
). In
general, when the target is far away (i.e. d is greater than a
threshold value),
is relatively large so that the fish can
rapidly home into the target. When the target is near,
decreases to provide more targeting accuracy.
The output of chasing-target is the activation of one of the
following muscle motor controllers:
,
,
, along with the activation of one of
the pectoral fin motor controllers: ascend-MC
,
descend-MC
and brake-MC
. The speed
parameter is set based upon the distance d, such that the fish swims
at full speed when the target is far, and in order to gain more
control over steering, slows down as it approaches the target. The fin
angle control parameter
is calculated from the up-down angle
(Fig.
):
When
, the ascend-MC is invoked and when
, the descend-MC is invoked. When braking is
needed in the schooling or mating behaviors, the
brake-MC is invoked.
Furthermore, when I= eat the angle parameters of the turn-MCs
are calculated by taking into account the velocity with which the
target moves. For example, consider the case when the target is
located to the right of the fish and is moving to the right. Suppose
that
and the matching set of motor control parameters for
E from the steering map is
(see Fig.
),
then, to anticipate the movement of the target,
(obtained by a right shift from E), rather than
, is output to
indicate an `overshot turn'. The amount of the shift is proportional
to the speed with which the target is traveling. This maneuver,
observed in predatory animals when pursuing a prey, is referred to as
`interception' by ethologists [Chauvin and Muckensturm-Chauvin1977].
Figure: A peaceful marine world.
Figure: The smell of danger.
| Xiaoyuan Tu | January 1996 |