In non-articulated characters, motion is often trivial - the whole character simply moves forward or turns. Instead, the character's behaviors can be specified, such as the tendency to flock, or the ability to avoid obstacles or walls [reynolds87]. This technique allows a large number of characters to be animated automatically, saving the animator a great deal of work.
Higher-level control of articulated characters is desirable for the non-expert animator. By specifying behavior, pleasing results are available to non-expert. This means many of the frequent actions for a creature must be automated. At the simplest level, the creatures must react to their environment to be realistic. They must avoid bumping into fellow creatures and other obstacles. At more complex levels, their actions are more complex, including flocking, pursuit and evasion, finding food, mating rituals, and play. Finally, traditional animators are extremely adept at giving any character human characteristics and emotions. Producing the appearance of emotion automatically is a much more difficult problem which has received only a small amount of investigation.
These aspects of animation suggest a continuum of creature control [gritz95]:
Keyframe animation is also impractical with a large number of characters. Animating a flock of birds would be tedious, especially if the path of the flock needed to be changed just a little to get the scene right… Automatic animation of a large number of characters is appearing in more feature films; for instance, it was used to animate bats in both Cliffhanger and Batman Returns.
This method is computationally intensive, and complex. Liu, Gortler, and Cohen [lui94] develop a wavelet basis, so the trajectories can be refined hierarchically to concentrate computational effort on areas where the trajectories change rapidly. They also use a technique from compiler design, common sub-expression elimination, to reduce the computation costs to a reasonable level. It is also notable that torques on a character's joints are never directly specified in this method - the output is a set of cubic splines specifying the change in the joint angles.
To generate an acceptable controller, we might choose to generate it by hand. Indeed, that has been the predominant way to specify controllers so far in the literature [mckenna90] [reynolds87], and some authors generate such a controller to compare with the output of their genetic algorithms [gruau95]. Hand-generating a controller is sometimes very hard, especially when the model has many degrees of freedom. Also, in some cases, hand generated controllers are inadequate. In [hodgins97], the authors adapted an existing, hand-generated controller for an adult male human running, to a female and a child. The motion achieved was awkward and robotic. This seems to have been a problem in the original controller, and it carried through into the adapted controllers. If the original controller had had more natural, organic motion, the results might have been better.
The approach many researchers have taken to generating controllers is to try to automate the process of searching for a controller. This involves trying to find an optimum solution to a large set of equations involving the parameters of the controller. There are many numerical search techniques, and many have been applied to finding controllers. The hope is that the resulting motion will be more appealing, and that these search techniques will find controllers when we are unable to hand-generate a controller. The following sections discuss how searching for a controller has worked successfully.
SGA has a major drawback. It depends heavily on the initial guess given for the controller. If you start with a poor guess for the controller, you might not find an acceptable solution (you get stuck on a local maximum). This is true when SGA is used for spacetime constraints or forward methods. This is typical of other methods of searching for a local optimum not covered here - they depend on an initial guess being near the global optimum in order to find it.
Simulated annealing is designed to reduce this problem, by allowing the parameters to be varied randomly some of the time, thereby escaping local maxima.
Both SGA and simulated annealing have some drawbacks in common. They depend on a control system model with a fixed set of parameters to optimize - in [ngo93] there are 10 stimulus-response pairs, and in [panne93] the topology of the control network is fixed: only its parameters change. The choice of these parameters is critical, and will decide whether the problem is soluble at all. The parameterizations used in these two papers are extremely rich, allowing for a wide variety of controllers. However, we can point to some results of genetic programming [sims94a] to argue that we need a controller model whose size can grow, to allow complex and organic behavior.
Finally, we would like controllers which are robust, in that they can produce similar results under varying conditions. An example might be a controller which takes a parameter indicating a target point, and hops the creature forward until it stops on that point. By taking parameters, a controller can achieve variable goals, and also adapt to changes in the environment, without running a new optimization process. The solutions arrived at by SGA and simulated annealing combined with spacetime constraints and forward methods are brittle, in that they only solve a very specific animation problem, and cannot be easily generalized. In the case of spacetime constraints, the motion is entirely specified, and a constraint, such as the end target position, cannot be modified without rerunning the entire simulation. In the forward methods, creatures are often designed just to walk/hop forward, and there is no way to have the creature stop at a specific spot, or even start moving from a different pose, perhaps from an earlier activity in an animation sequence.
To produce an individual, its genome is evaluated; the creature that results is called the phenotype. The simulated character can then be placed in a physical simulation. In most cases investigated in the literature, the body type of the character is fixed, and the genome affects only the controller. For instance, in [ngo93] the typical creature consisted of five rigid rods, connected in different configurations. One GA optimization was performed for a Mr. Star Man character, where the rods all originated from a central point. Another featured a humanoid character, with a torso and two jointed legs. The genes of these creatures determined the parameters for 10 stimulus-response pairs; the values at which a stimulus produces a response, and the angles of the body parts which constitute a response. These genes result in motion under simulation, which along with the physical construction of the character produce its phenotype.
In Gritz [gritz95] [gritz97], the genotype is made up of a tree, with operators at the nodes and terminals at the leaves (see Figure 1). It uses a few simple operators, { +, -, *, %, iflte } (iflte stands for "if less than equal") and the following terminals: random floating point numbers, internal angle sensors, the position and velocity of the character, goal distance, and a goal met flag. These might combine in an expression like ( iflte ( * 0.1 px) 0.5 ( + a2 0.3 ) 0.05 ), where px and a2 are position and angle sensors. A complete expression is enclosed in parenthesis, with the operator coming first, and its operands coming next in a list. This LISP expression is evaluated by the simulator to produce a desired angle for one of the character's degrees of freedom. This evaluation, along with the character's appearance, produce the character's phenotype.
Karl Sims [sims94a] [sims94b] is unusual in that the genome in his system determines the body geometry as well as the controller, allowing for the appearance of characters to be evolved as well. This model allows for a total change in the character's appearance and behavior over time. It is not as useful for character animation, except in the generation of new design concepts.
Unfortunately, creatures evolved using this fitness metric are often unable to adapt to new situations, i.e., they are not robust. For instance, a creature evolved to "move forward 10 cm and stop" would be unable to "move forward 20 cm and stop." An alternative formulation uses successive fitness functions to evolve a population; once the population evolves a controller able to satisfy the first fitness function (coming within a margin of the ideal behavior), the second is introduced, and the population is evolved again to satisfy that fitness function as well. This method was used successfully in [gritz95] to evolve a controller for a Luxo lamp which hopped forward and stopped at different places. In [gruau95], a neural net controller was evolved that was able to achieve 6 legged tripod motion from any starting position of the six legs. This method is used because the GA often will not find any useful solutions if the initial fitness function is too hard to satisfy, similar to simulated annealing.
Once fit individuals are selected, their genes must be propagated. This can be done by mutation or sexual reproduction.
Koza [koza94], in a general discussion of genetic programming, points out that mutation is used very sparingly in many applications, and that sexual crossover is the biggest source of diversity and useful genetic material. In fact, in the examples in his book, mutation is not used at all.
Figure 1. This illustrates crossover on an expression tree, and was taken from [gritz95]. On the left are the parents, with the selected cross-over nodes in bold. On the right are the resulting children.
GAs have been used to attack and solve a remarkable variety of problems. The subjects in a recent GA proceedings include NP complete problems, pattern recognition, shop flow, control strategies, aircraft design, stack filters, and Steiner trees.
Koza [koza94] has two explanations why GAs using sexual reproduction are so successful. The fitness function can be thought of as defining a terrain, and a controller is placed on this terrain according to its fitness. Then it wanders around trying to find the top of the highest mountain in the terrain (the optimal solution). Wandering is implemented by replacing the controller with a new one, or with many new ones, for GAs. In simulated annealing and SGA, there is only one controller wandering this fitness terrain. With SGA, it is constrained to travel uphill only. If it started near a small hill, it gets stuck and can't find the mountain. With simulated annealing, it can travel downhill, but if it is far away from the mountain, it will have a hard time finding the mountain. In genetic algorithms with mutation, there are hundreds or thousands of controllers searching the terrain, having their positions changed a little or a lot by mutation. Those that find a hill will be replicated so that the uphill area is searched more thoroughly. This may cost much more in computational time than simulated annealing, but because there are more controllers searching, it may find the highest mountain much faster.
When we add sexual crossover to the mix, the situation becomes more complicated. If two individuals are crossed, we can picture a new individual arriving on the fitness plane somewhere between the two parents. It's hard to say what the terrain will be under this new individual. But if both the parents were judged fit, then they are on a rise in the terrain. There could be a valley between them, but more likely there is more high terrain, maybe even the mountain we are looking for. Of course, this analogy simplifies the problem considerably, because, if the genome has 12 parameters, the terrain has 12 dimensions. If the genome has a variable structure, the terrain has potentially infinite dimensions. Koza explains this property in terms of schema. A schema is a set of genes, with some of the positions in the genotype filled with a "don't care" terminal. This represents a set of individuals which share the same genes, except where the "don't care" symbol appears in the schema. When we pick a cross-over site in an individual, we are defining a schema with a "don't care" symbol at that site. The individual serves as a sample of all the individuals that share that schema. Since the individual is fit, hopefully the schema is fit, too. When we intersect two fit schemata, we are more likely to find fit individuals. Schemata and their relationship to choosing fit individuals has been investigated in the theoretical literature of GAs [koza94].
With GAs, the search space does not have to be limited. GAs can combine the sensors, internal nodes and effectors in a control system in arbitrary ways, to allow controllers of very different forms than might be designed by hand.
The use of a variable fitness function also allows for the design of robust controllers. Gritz [gritz95] [gritz97] uses a function which starts with a main goal (reach point X at the end of the time allotment) and gradually adds in additional style points, for completing the motion early and staying put, penalties for falling over or hitting its head. This allows the main goal to evolve individuals which are then refined by the style restrictions. Additionally, fitness was averaged over multiple tries with different end-target points, resulting in controllers which could move any distance and stop. The lamp had learned the skill of moving forward and stopping, instead of learning the action of "move forward 30 cm." This may be successful with SGA or simulated annealing as well, but has not been investigated in the literature so far.
If effort is made to model creatures on aspects of biology, researchers hope that GAs can be used to study the motion, behavior and evolution of real creatures. In [gruau95], a controller was based on a biological model of a cockroach's neural system. Interestingly, the GA produced a controller which, compared to a hand designed controller, was more robust, in that it could start from any leg position, and used fewer nodes.
In [gritz95], expression tree controllers described in the Genotype and Phenotype section are evolved. First, two controllers for a Luxo-style lamp are investigated. One of them uses a progressive fitness function to allow the lamp to hop forward and stop on a spot 10 to 60 cm in front of it. In the second, the lamp learns to duck under a horizontal pole by the introduction of a penalty in the fitness function for hitting the pole. Controllers for a human model are also evolved, for controlling from 6-10 degrees of freedom of a 28 degrees of freedom model. The model learns to touch an object in space, and touch its nose. These results show how control of an animated character can be carefully directed by the animator, even though the details of the motion are generated automatically by the GA.
Figure 2. This is taken from [gritz95], and shows the behavior of the Luxo lamp avoiding an overhead bar as it hops.
[gruau95] shows another robust controller. The controller produces 6-legged tripod motion, in which three legs are down and three legs move forward at any time. The evolved controller is able to start from any initial leg positions, where the hand-designed controller made by the authors is not able to do this. Craig Reynolds has also investigated generating robust controllers through the introduction of noise in sensor input and effector output [reynolds94a], as discussed in the Problems sections.
There are also some recent results which show that GAs are not the only way to go. In [tu94], random weights are generated for the sensor-actuator network controllers, and then SGA is used to tune other parameters in the controllers, so as to maintain the basic gait. They find some robust controllers for a 4 legged hopper which allow it to navigate up a small incline, though the optimization process took place on flat terrain. However, the authors note that their technique was not able to find interesting controllers for more complex creatures, of six or more links.
The animator would probably use a tool like this as an idea generator. The simplified model of creature construction allows shapes and behaviors not found in nature to evolve readily.
In this way GAs are similar to other numerical techniques. SGA is designed only to find a local optimum, and simulated annealing was designed to address this shortcoming. Because of their large populations and variety of genetic material available for solution of the problem, GAs are more suited for global optimization than SGA. But because they are probabilistic, results from two otherwise identical runs can be quite different, and we are not guaranteed to find a solution, where SGA will at least find a locally optimal solution. Premature convergence is a condition in GAs where a mediocre solution comes to dominate the population in early generations, and because the population lacks a variety of genetic material, it cannot break away from the mediocre, locally optimal, solution and find a better one. Often this problem can be solved by adjusting the fitness function, or simply by re-running the simulation.
Gritz [gritz97] showed one way to deal with this problem, by starting the population with an easier fitness function and gradually adding style restrictions. An alternative that does not use GAs is presented by van de Panne [panne95]. The authors introduce a "hand of God" torque to keep the character upright, and then uses a simple gradient ascent optimization to have the character learn to walk. Then the influence of the stabilizing torque is reduced and eliminated in two more stages of optimization. Both of these approaches change the shape of the fitness landscape, making it easier to get near a solution to start, and then specializing towards the final, desired controller.
One place where this might prove particularly useful is in the study of the Burgess Shale [gould90]. This is a fossil record of animal life just before a mass extinction. There are many body types totally unrelated to those that have survived to the modern day. It would be fascinating to evolve controllers for these bodies, because we have no living examples to give us any idea about how these creatures might have moved or behaved.
Craig Reynolds has also investigated deterministic, reactive controllers based on local information, which give creatures the appearance of intention. His model of flocks [reynolds87] is a purely reactive model based on the local environment of the bird, but it gives the overall flock the appearance of intention and global coordination. He has also evolved robust, reactive controllers for simple vehicles with sensors which follow a corridor [reynolds94a]. Even though these are reactive actions, they can be used by an animator to give a character what appears to be proactive behavior.
In [tu94] and [grzeszczuk95], higher level behaviors are synthesized from lower level skills. Skills like walking forward and stopping have been successfully designed by GAs, so behaviors are a logical and challenging next goal. Possible strategies include simply continuing to evolve the controller for a skill, so that it exhibits more complex behavior, or freezing the skill controllers and using them as basic building blocks in a controller for a behavior. As computational capabilities increase, this kind of design becomes more feasible.
[gritz97] l. Gritz, J. K. Hahn. Genetic Programming Evolution of Controllers for 3-D Character Animation. Koza, J.R., et al. (editors), Genetic Programming 1997: Proceedings of the 2nd Annual Conference, 139-146, July 13-16 1997, Stanford University. San Francisco: Morgan Kaufmann. 1997.
[gritz95] l. Gritz, J. K. Hahn. Genetic Programming for Articulated Figure Motion. Journal of Visualization and Computer Animation, vol. 6, no. 3, pp. 129-142, July 1995.
[gruau95] F. Gruau. Modular Genetic Neural Networks for 6-Legged Locomotion. J.M. Alliot, et al. [editors], Artifical Evolution '95, (AE95), pages 201-219. Springer. 1995.
[grzeszczuk95] R. Grzeszczuk, D. Terzopoulos. Automated Learning of Muscle-Actuated Locomotion Through Control Abstraction, ACM Computer Graphics, Proceedings of SIGGRAPH'95, August 1995.
[hodgins97] J. Hodgins, N. Pollard. Adapting Simulated Behavior For New Characters. In SIGGRAPH 97 Conf. Proc., pages 153-162, Los Angeles, California, August 1997.
[koza94] J. R. Koza. Genetic Programming 2: Automatic Discovery of Reusable Programs. Cambridge, MA: MIT Press. 1994.
[liu94] Z. Liu, S. J. Gortler, M. F. Cohen. Hierarchical spacetime control. In SIGGRAPH 94 Conf. Proc., pages 35-42, Orlando, Florida, July 1994.
[mckenna90] M. McKenna, D. Zeltzer. Dynamic Simulation of Autonomous Agents. In Computer Graphics, 24(4), August 1990, pages 29-38.
[michel95] O. Michel. An Artificial Life Approach for the Synthesis of Autonomous Agents. In Artifical Evolution '95, (AE95), J.M. Alliot, et al., Editors, Springer, 1995, pages 220-231.
[ngo93] J. T. Ngo and J. Marks. Spacetime constraints revisited. In SIGGRAPH 93 Conf. Proc., pages 343-350, Anaheim, California, Aug. 1993.
[reynolds94a] C. W. Reynolds. Evolution of Corridor Following Behavior in a Noisy World. In From Animals to Animats 3: Proceedings of the Third International Conference on Simulation of Adaptive Behavior (SAB94), D. Cliff, P. Husbands, J-A Meyer, and S. Wilson, Editors, ISBN 0-262-53122-4, MIT Press, Cambridge, Massachusetts, 1994, pages 402-410.
[reynolds94b] C. W. Reynolds. Competition, Coevolution and the Game of Tag. In Artificial Life IV, R. Brooks and P. Maes, Editors, ISBN 0-262-52190-3, MIT Press, Cambridge, Massachusetts, 1994, pages 59-69.
[reynolds87] C. W. Reynolds. Flocks, Herds, and Schools: A Distributed Behavioral Model, in Computer Graphics, 21(4) (SIGGRAPH '87 Conference Proceedings), pages 25-34.
[sims91] K. Sims. Artificial evolution for computer graphics. In Computer Graphics (SIGGRAPH 91 Conf. Proc.), volume 25, pages 319-328, Las Vegas, Nevada, July 1991.
[sims94a] K. Sims. Evolving virtual creatures. In SIGGRAPH 94 Conf. Proc., pages 15-22, Orlando, Florida, July 1994.
[sims94b] K. Sims. Evolving 3D Morphology and Behavior by Competition. In Artificial Life IV Proceedings, ed. by R. Brooks & P. Maes, MIT Press, 1994, pages 28-39.
[tu94] X. Tu and D. Terzopoulos. Artificial Fishes: Physics, Locomotion, Perception, Behavior. In SIGGRAPH 9 Conf. Proc., Orlando, Florida, July 1994, July 1994.
[panne93] M. van de Panne and E. Fiume. Sensor-actuator networks. In SIGGRAPH 93 Conf. Proc., pages 335-342, Anaheim, California, Aug. 1993.
[panne95] M. Van de Panne and A. Lamouret. Guided Optimization for Balanced Locomotion, in Computer Animation and Simulation '95, 165-177, Sept 2-3 1995, Maastricht, the Netherlands: Springer-Verlag/Wien. 1995.
References which look interesting but I don't have.
[]Koza, John R. 1992. Genetic Programming: On the Programming of Computers by Means of Natural Selection. Cambridge, MA: MIT Press.
[] J. Ventrella. Disney meets Darwin - the evolution of funny animated figures. In Proc. of Computer Animation 95, pages 35-43, Apr. 1995.
[] A. Witkin and M. Kass. Spacetime constraints. In Computer Graphics (SIGGRAPH 88 Conf. Proc.), volume 22, pages 159-168, Atlanta, Georgia, Aug. 1988.
[]Reynolds, C. W. (1988) Not Bumping Into Things, in the notes for the SIGGRAPH '88 course Developments in Physically-Based Modeling, pages G1-G13, published by ACM SIGGRAPH.
[]Reynolds, C. W. (1993) An Evolved, Vision-Based Behavioral Model of Coordinated Group Motion, in From Animals to Animats 2: Proceedings of the Second International Conference on Simulation of Adaptive Behavior (SAB92), Meyer, Roitblat and Wilson editors, ISBN 0-262-63149-0, MIT Press, Cambridge, Massachusetts, pages 384-392.
[]Reynolds, C. W. (1994) An Evolved, Vision-Based Model of Obstacle Avoidance Behavior, in Artificial Life III, Santa Fe Institute Studies in the Sciences of Complexity, Proceedings Volume XVI, C. Langton, Editor, ISBN 0-201-62494-X, Addison-Wesley, Redwood City, California, pages 327-346.
[]Reynolds, C. W. (1994) Evolution of Obstacle Avoidance Behavior: Using Noise to Promote Robust Solutions, in Advances in Genetic Programming, K. E. Kinnear, Jr., Ed., ISBN 0-262-11188-8, MIT Press, Cambridge, Massachusetts, pages 221-242.
[]Reynolds, C. W. (1994) The Difficulty of Roving Eyes, in Computational Intelligence: Imitating Life (Proceedings of the 1994 IEEE World Congress on Computational Intelligence) Orlando, Florida, USA, June 27-29, ISBN 0-7803-1104-3, IEEE Press, pages 262-267.