Ian Horswill notes that we ascribe character, or intentionality to things that move. His recent work on animation control is summarized in a paper to be presented at AIIDE 2008. The example above is from that paper - two children appear to play with a ball while being observed by an adult.
Despite the apparently complex behavior, under the covers there are simple motivators driving the animation. The children want to approach the ball, but not each other. If they get close to the ball they kick it, and since they have been backing away from each other, they appear to kick it between themselves. If they get too far from the parent, a behavior kicks in where they run to the parent for a moment, then run back to play.
This algorithm can be efficiently implemented in terms of Insect AI (*). The way I translated the description of the behavior to an algorithm was to
- Identify the sensors needed, which are parent, friend, and ball. The output of these sensors has two components, a orientation component, and a scalar distance component.
- Identify the outputs, which in this case are signals to the animation system, move, kick, and hug parent.
- Create transfer functions (the green boxes) that encode the important notions, which for this controller are functions of the scalar distance component. From left to right, output as a function of distance can be read as
- Activate when distant from parent
- Activate when close to friend
- Activate except when close to ball
- Activate when close to ball
- Activate when close to parent
Porcino, Nick, An Architecture for A-Life, AI Game Programming Wisdom 2,Steve Rabin ed., Charles River Media, 2004, pp. 339-349
Porcino, Nick, Insect AI 2: Implementation Strategies, AI Game Programming Wisdom 3, Steve Rabin ed., Charles River Media, 2006, pp. 189-204