Fig.
illustrates a simplified generic
intention generator which is responsible for the goal-directed
behavior of the artificial fish in its dynamic world.
The intention generator is based on a priority hierarchy of behaviors.
Life threatening behaviors, such as collision avoidance, have highest
priority. As indicated in the figure, the intention generator first
checks the sensory information stream to see if there is any immediate
danger of collision. If there is (see Chapter
for collision test) then the intention I generated is to avoid
collision. If there is no immediate danger of collision, the
neighborhood is searched for predators, the fear state variable F
and the most dangerous predator m for which
(for any
predator i) are calculated. If the total fear
(where
is a threshold value) evasive action is to be taken.
If the most dangerous predator is not too threatening (i.e.
where
) and the fish has a schooling habit, then the
school intention is generated, otherwise the escape intention
is generated.
If fear is below threshold and the behavior memory (more details are
in Section
below) is empty, the hunger and libido
mental state variables H and L are calculated. If the greater of
the two exceeds a threshold 0 ;SPMlt; r ;SPMlt; 0.5, the intention generated
will be to eat or mate accordingly. If H=L;SPMgt;r, then
is checked to see if it is one of the two intentions
eat and mate. If not, one of them gets chosen at random,
otherwise
.
If the above test fails, the intention generator accesses the ambient light and temperature information from the perception system. If the fish's habits imply contentment with the ambient conditions, the intention generated will be to wander about, otherwise it will be to leave the vicinity. Note that, unlike the desire to eat, to mate or to escape which are modeled explicitly by the mental state variables, the desire to avoid collision, to school, to wander and to leave are modeled implicitly by their intrinsic behavioral priorities (level in the hierarchy), sensory stimuli and innate habits. The following diagram shows all the desires ordered according to their levels in the priority hierarchy:
| Xiaoyuan Tu | January 1996 |