Once the intention generator selects an intention, it attempts to satisfy the intention by passing control to a behavior routine along with the data from the perception focusser. The artificial fish currently includes nine behavior routines listed below plus five subroutines (listed within brackets below) which serve the obvious purposes:
The activated behavior routine uses the focused perceptual data to select appropriate MCs and provide them with the proper motor control parameters. Note that more than one MC may be chosen if they are not mutually exclusive. For instance, swim-MC and ascend-MC can be selected simultaneously. We now briefly describe the function of the routines.
The avoiding-static-obstacle and avoiding-fish routines enable a fish to avoid potential collisions. The chasing-target routine guides a fish as it swims towards a goal. These more primitive, perception-driven behaviors are essential components of the more advanced motivational behaviors such as preying, schooling, and mating. We will give a more detailed description of these behaviors in the subsequent section.
The eating-food routine tests the distance d from the fish's mouth to the targeted food (see Fig. ). If d is greater than some small threshold value, the routine chasing-target is invoked. When d is less than the threshold value the subroutine suck-in is activated where a ``vacuum'' force (to be explained in Section ) is calculated and then exerted on the food.
The mating routine invokes four subroutines: looping, circling, ascending and nuzzling (see Section for details). The wandering-about routine sets the fish swimming at a certain speed by invoking the swim-MC, while sending random turn angles to the turn-MCs intermittently. The leaving routine is similar to the wandering-about routine. The escaping routine chooses suitable MCs according to the relative position, orientation of the predator to the fish. The schooling routine will be discussed in Section .
|Xiaoyuan Tu||January 1996|