(Animated Artificial Life)

3.3 A Collection of Artificial Life Experiments


3.3.1. Computer System
The creatures described in this paper were developed through a series of experiments with a somewhat different approach than many other experiments of the new Frankensteinian Order: importance is placed on real-time animation, and user interaction with the creatures, much like in a computer game. Because of this emphasis, lighter physics models are designed, and graphical representation is expressed in a more iconic, economical form, allowing for higher frame-rate and tighter interaction. To this end, an architecture was designed for fast physics and graphics rendering.




A typical simulation/animation loop is illustrated in Figure 1.

Fig 1. Simulation/animation loop. The steps illustrated are not necessarily performed in the order shown. User interface control is not included here. All of the steps are performed exactly once per cycle. Simulation time is updated by units of 1 each cycle, and animation frame rate is equal to simulation speed. The steps are described below.

Apply Physical Forces from User Input
Mouse and keyboard events can be mapped to physical events in the simulated world to enable interaction with creatures as well as manipulation of a viewpoint (2D or 3D camera).

Compute Motor Control
Autonomous mechanisms cause body parts of creatures to move.

Compute Stimulus/Response
Body part motions and mental states are changed by environmental stimuli.

Compute Flow and Transfer of Energy
Energy is exchanged between the environment and organisms, and supplies the fuel for the creatures to live.

Compute Evolutionary Dynamics
Creatures can mate, reproduce with mutation, and die, either a standard genetic algorithm, or through "artificial natural selection" (no explicit fitness function).

Display Graphics
The current state of affairs(positions and orientations of body parts, and camera orientation and position(determine the appearance of things for every animation frame.

Apply Forces from Ground Collision or Fluid Friction
Body parts in motion continually rub up against the world. Friction with a virtual ground surface or a virtual surrounding fluid enable organisms to move around.

The design of these simulations includes the following key components:

* a morphological scheme
* an embryology
* a motor control scheme
* a physics
* a nervous system
* genetic evolution
* computer graphics rendering

These are each explained in the sections below.

3.3.2. Walkers
In "Oh Superman," performance artist Laurie Anderson describes walking as a continual process of catching oneself while almost falling, by placing one foot out in the direction of the fall, stopping the fall, and then almost-falling again, only to be stopped by the alternate foot [Anderson, 1981]. This notion inspired the idea to construct a 3D bipedal figure which has mass and responds to gravity and which is always on the verge of falling over and so must continually move its legs in order to keep from falling, to stay upright, and to walk.

The first project in the series began an attempt to build a 3D stick figure which could stand up by way of internal forces bending various joints. The original idea was to model a human-like form, but this was too large a task at the time. To simplify the problem, the bipedal figure was reduced to the simplest anatomy possible which can represent bipedal locomotion: two springy jointed sticks, called "Walker," shown in Figure 2. It could be argued that there can be no "walking" without "knees." But then again, the term, "walking" is used only in the qualitative sense here, as are the terms "head," and "feet," hence the preponderance of quotes around names for body parts and functions in this paragraph.


Figure 2. Walker

A Walker's head experiences a pull in the direction of its goal (a virtual plate of food on the ground), proportional to the Walker's distance from the goal. This causes the Walker to tilt in the direction of the goal (an inaccurate model of the desire to be somewhere else, yet sufficient for this exploration). A Walker can perceive how much its body is tilting. This perception is used to modulate the motions in its legs (in a genetically determined way). As its head is pulled towards its goal, its legs move in such a way as to potentially keep it upright and afford locomotion. Internal forces cause the legs to rotate about the head joint, in periodic fashion, using sine functions. Parameters in the sine functions for each leg, such as amplitudes, frequencies, and phases, are genetically determined, varying among a population of Walkers, and are allowed to evolve over time within the population. Responses to body tilt are also genetically determined.

To optimize these parameters for walking, the population of Walkers is continually updated, generation-by-generation, with the best Walkers giving birth to new Walkers, and the worst ones dying off. At the evolutionary start, the motions of most of the Walkers are awkward and useless, with much aimless kicking, and so most of the Walkers immediately fall as soon as they are animated. Due to genetic variation, some move their legs such that they can stay upright for slightly longer periods, as they are pulled towards the food. These Walkers have higher fitness values. By using a simple genetic algorithm which repeatedly tests for fitness and reproduces the most fit Walkers in the population, with small random genetic mutations, the population improves locomotion skill over time, while maintaining slight variation throughout evolution. The genetic algorithm scheme used for Walker and subsequent simulations is described in more detail in section 3.3.13.

3.3.3. Food That Runs Away From You Keeps You Fit
A special feature is included in the simulation to help optimize locomotion: the virtual plate of food which causes the attractive force for the Walker also supplies energy to sustain the Walker for a specified duration of time. A Walker's energy level is continually decreasing. If it reaches zero, the Walker stops kicking and it falls over. So, if a Walker reaches critical proximity to the food and thus "partakes," its energy level is increased by a specified amount. Furthermore, the food possesses a minimal degree of adaptive evasive behavior. If a Walker partakes of the food, the food begins to move away from the Walker, experiencing a repulsion force analogous to the attractive force pulling the Walker to the food, only proportional to the inverse square of the distance from the Walker. Each time the Walker partakes, the food's repulsion force increases, causing it to move away more quickly as the Walker approaches. The back-and-forth adaptation resulting from this creates increasing demand for faster locomotion in order for a Walker to get to the food and thus to maintain energy.

This primitive form of co-evolution provided for Walkers adapted to turning on a dime, while pursuing a constantly moving target. To demonstrate Walker's ability to react to a constantly changing situation, a virtual "leash" was attached to the head, which a user could gently pull around (this is shown in figure 3, illustrated with motion blur). Also, scenarios were constructed in which multiple Walkers had attractions and repulsions to each other, generating novel pursuit and evasion behaviors.


Figure 3. Walker on an interactive leash

3.3.4. Springy Issues
Walker is the first in a series of artificial life creatures in this system consisting of linked body parts which are connected at their ends and which can rotate about their joints. Walker bodies are based on a spring model: there are three point masses: head, foot 1, and foot 2, each whose velocities are affected by gravity, ground friction, and spring forces. Spring forces are used to keep the feet and head close to an ideal distance (leg length). Simulation of rotations of legs about the head joint are achieved by incremental translational forces in the feet, oriented tangent to a sphere whose center is located at the head. The design of Walker had a number of flaws, one of which was the fact that, being a pair of joined springs instead of a rigid body model, there was no way to identify an explicit orientation of the body, and so rotational control was without context to a local body coordinate system. It required a physics hack. But despite these holes in the physics model, there was clearly something which adapted to meet its goals within that physical system, and it generated sufficiently life-like locomotion behavior. This early experiment provided a useful context for further exploration.

3.3.5. Other Walkers
The next stage in the simulation used fixed-length segments, and shifted geometry down to two dimensions. Figure 4 shows a creature from this later simulation of 2D creatures, consisting of five rigid interconnected segments, with four effective joints. As in the case of Walker, rotations about the joints are oscillatory, controlled by sine functions with parameters determined by genes. In this scheme, rotation is explicit and results in deterministic transformations of geometry. There is no food reward in this simulation. Fitness in this scheme is measured simply as distance traveled from the starting position during an animation sequence of specified duration. Even though creatures in this population are modeled in 2D, locomotion is possible, with evolved populations consisting of creatures ambulating either to the left or to the right. A distinctive feature of evolved locomotion in these populations is the emergence of phase offsets in joint angle oscillations converging close to 90 degrees, which correspond to the characteristic alternating gaits in many limbed animals.

Figure 4. A walking figure

3.3.6. Morphology
It is one thing to link together a collection of segments of predetermined length in a predetermined topology and then allow the motions of the joints to evolve for the sake of locomotion. It is another thing entirely to allow morphology itself to evolve.

In the next simulation in this artificial life series, dimensionality was brought back up to three, and a morphological scheme was designed which allowed the number of segments, lengths, branching angles, and branching topology to vary. All of these factors are genetically determined. An important principle in this newer morphological scheme is that in this case, there are no implied heads, legs, arms, or torsos, as shown in Figure 5. Creatures are open-ended structures to which Darwinian evolution may impart differentiation and afford implicit function to the various parts. In this scheme, any body part can become a "foot."


Fig. 5. 3D creatures with variable morphology.

3.3.7. Embryology
Each creature possesses a series of genes organized in a template (the genotype). Genotypes are fixed-length arrays of real numbers. Each gene is mapped to a real or integer value which controls some specific aspect of the construction of the body, the motion of body parts, or reactivity to environmental stimuli. Genotypes get expressed into phenotypes through this embryological scheme. For most of the simulations discussed, the typical genotype for a creature includes genes for controlling the following set of phenotypic features:


* number of body parts
* frequency of sine wave rotations for all parts
* global control parameters affecting the following local features:
* the parent of each part (determining branching topology)
* the angle at which each part branches off its parent part
* length of each part
* amplitude of sine wave rotation in each part
* phase offset of sine wave rotation in each part
* amplitude modulator of sine wave (reactivity to continuous stimuli)
* phase modulator of sine wave (reactivity to continuous stimuli)

For the 3D simulations, the phenotypic features above which pertain to angles are each represented by up to three genes, corresponding to three axes of rotation.

3.3.8. Lessons from the Blind Watchmaker
The design of embryologies has been one of the most interesting components in building artificial life worlds in this scheme. It is not always trivial to reduce the notion of a prolific body plan or motor control scheme to an elegant, data-compressed representation. [Dawkins, 1989] promotes the concept of a "constrained embryology," whereby global aspects of a form (such as bilateral symmetry, segmentation, or fractal-like self similarity) can be represented with a small set of descriptive parameters. A representation with a small set of genes which are able to express, through their interactions during embryology, a very large phenotypic space, is desirable, and makes for a more evolvable population.

I have experimented with a variety of embryologies inspired by Dawkins's' explanations. In one simulation, I used a scheme which in fact goes completely against Dawkins's constrained embryology philosophy. In Gene Pool (section 3.4.4), each gene in the genotype controls only one local aspect of the phenotype. It is a fine-grained embryology with little innate structure. Consequently, the number of genes had to be made large (to account for prolific morphology and motion). This is not ideal for swift evolutionary search. On the other hand, using this scheme afforded the opportunity to identify emergent structure in phenotypes which originated from adaptation, with no influence from innate structure in embryological development. For instance, in Gene Pool, many emergent locomotion strategies appeared to utilize forms of symmetry. Since no structure for symmetry was designed into embryology, symmetry was observed as a desirable state that the population converged upon, purely through adaptation, without any genetic disposition.

The above example is an exception to the rule. In general, I have found that some implicit structure in embryology is useful. Furthermore, from a design research standpoint, building pregnant structure into tight representations provides a fascinating creative occupation.

3.3.9. Sims's Directed Graphs
The embryology used in Sims's virtual creatures employs an open-ended, flexible scheme which imparts a healthy amount of structure on morphological development, yet doesn't overly constrain embryology, as evidenced by the spectacular zoo generated by his system. In this scheme, the genotype is represented as a directed graph allowing for topologies and geometries with recurrent features. During development, signals are passed around through the accumulating hierarchy of body parts, and adjusted in the process. The recurrent nature of this scheme allows body parts to recursively express themselves with modifications. This corresponds to the existence of self-similarity in animal form and motion.

3.3.10. Motor Control
The simulations discussed here incorporate a straightforward motor control scheme. Each creature possesses a virtual motor which drives all the body parts to rotate in pendulum fashion, about their joints, repeatedly and continuously, from birth to death. Each body part can have its own amplitude and phase, as shown in Figure 6. This motor control scheme roughly models periodic forms of locomotion in animals, in which the environment is relatively free of irregularities or distractions. It does not address motor control mechanisms for navigating irregular spaces, requiring stimulus/response mechanisms for moment-by-moment reactivity.


Fig. 6. different phases and amplitudes for bending body parts


These periodic motions are further modulated by environmental factors, as explained in section 3.4.3, concerning the most recent simulation.

3.3.11. Physics
These simulations evolved from a simple animation technique whereby motion was made progressively more complex and autonomous. The notion of a physics also became incorporated in progressive steps. The early animation experiments that lead up to the current artificial life simulations were based on Koch curve fractal generators [Mandelbrot, 1977]. These fractal curves are made of line segments connected at various angles, the sequence of which is recursive. Motion was achieved by simply changing angles in the data-compressed fractal generator incrementally over time, resulting in highly organic motion in the "data-amplified" fractalized forms. These motions are beautifully chaotic and organic. In viewing these abstract art pieces, parts of the fractals were found to move completely out of view as the animation progressed. As an experiment to keep these forms roughly centered on the computer screen, a simple feedback mechanism was incorporated, which computed the "center of mass of the object" and caused the form to gravitate towards the center of the screen in a loose, springy manner. Other techniques were added which, while being purely aesthetic visual treatments, pushed the animations closer to physical models, treating the fractal form as a complex jointed object in space rather than an image of recursion. These various techniques later became useful for modeling figures composed of line segments attached at angles, where the line segments were assumed to be skeletal components.

It may seem unconventional to progressively add physics to enhance animated motions. Often people speak of a computer model as being physically based or not being physically based. Is there an in-between? I believe that there is. In fact, there is no such thing as totally "real" physics. Every physical simulation is an approximation. The evolution of physics is a fundamental aspect of the methodology by which these artificial life simulations have been built. As the physical models deepen, so do the adaptations of the creatures.

2.3.12. Current Physics Scheme
In the present scheme, time is updated in discrete steps of unit 1 with each time step corresponding to one update of physical forces and one displayed animation frame. A typical creature is modeled as a collection of hierarchically-connected segments in a tree-like branching topology. It can change the angles of segment joints by small increments over time, resulting in pendulum-like rotations over extended time. The segment-bending procedure is borrowed from the fractal morphing technique described above.

Creatures are assumed to have infinite strength to bend joints without resistance from outside forces. A creature's body has position, orientation, linear velocity, and angular velocity. The body's position and orientation are updated at each time step by adding the body's linear and angular velocities. These velocities are in turn changed at each time step by various forces. These include:

Gravity
Always adding to the vertical component of the body's linear velocity

Ground Collision (for terrestrial simulations)
When the endpoint of a body segment collides with the ground (a flat horizontal surface), the angular and linear velocities of the body are affected (giving rise to effects such as bouncing, scraping, sitting at rest, etc.).

Water Friction (for aquatic simulations)
The motions of body parts (instantaneous linear velocities of the midpoints of individual body segments) create resistance within a fixed frame of viscous fluid. The relationship between the orientation of each body segment and the direction of its motion determines the magnitude and direction of each component force. The accumulations of these forces are summed to determine resultant changes in the body's linear and angular velocities.

User Interaction
Pressing certain keys on a computer keyboard or clicking the mouse cursor over certain areas in the scene of the simulation are translated into various forces acted upon the creatures. These can be used to "pick up" or drag creatures, or to stimulate them, for a variety of purposes.

The more recent creatures have body parts of varying thickness and length, and so there are implied uneven distributions of mass on either side of each joint. This requires more realistic modeling of orientations and center of mass changing over time as a result of joints bending. Actual torques between bending parts is not directly modeled. The effects of moments of inertia are modeled using a technique which is computationally economical for real-time animation speed. This recent upgrade in physics was required to avoid anomalies such as "the tail wagging the dog" (and I don't mean that figuratively!)

With computer processing speeds increasing the current rate, it will become reasonable to design deeper physical models, in which forces are based on first principles, while still maintaining real-time interactive speeds (always a high priority in this series of simulations). Each body part could then be modeled with its own independent position, orientation, velocity, and angular velocity. The interactions among parts would give rise to the coherent features which have been modeled globally so far. But, as a matter of fact, and however, I expect the next physics upgrade to bypass rigid body dynamics altogether and to model creatures on a springs-and-point mass level.

3.3.13. Evolution
The simulations discussed above use a variation of the standard genetic algorithm. A population of creatures are initialized with random genotypes, then each genotype is expressed as a phenotype and animated for a specified duration to establish a fitness ranking (in most cases, this is determined by how far it has traveled from the position at which it started, when the animation is complete). After this initial fitness test, a cycle begins: for each step in the cycle...

1) Two individuals are chosen from the population at random, with chances of being chosen proportional to fitness ranking.

2) Their genotypes are randomly crossed to generate one offspring genotype consisting of alternating gene sequences from both parents.

3) The offspring genotype is subject to chance mutation.

4) The lowest fitness ranking genotype in the population is removed, and the new offspring genotype is added to the population.

5) The offspring genotype undergoes embryology to create a phenotype.

6) The offspring phenotype is then animated to determine its fitness ranking within the population.

This process repeats for a specified number of cycles. This technique avoids premature convergence and guarantees that overall fitness never decreases in the population; the most fit creatures are never lost, and the least fit creatures are always culled [Ventrella, 1994b].

3.3.14. Moving "Ahead"
In one experimental embryological scheme, I imposed an artificial symmetry and segmentation to the body, and designated a special part as the "head" (shown with a black dot in figure 7). Although I knew quite well where their heads were, these creatures had no notion of what it means to have a head, and so this was ignored by evolution. In fact, many evolved populations consisted of highly mobile creatures who used these head parts, along with other parts of their bodies, like feet. Some locomotion strategies appeared as if they could be painful. So extra components were added to the fitness function, rewarding creatures with bonus fitness points for such behaviors as: 1) not clobbering the head on the ground, 2) holding the head relatively high, and 3) moving the head relatively little. Figure 7 shows an example of a creature from a population in which head-height was added as a component to fitness, along with distance traveled.


Fig. 7. Evolutionary pressure for head-height.

The use of multiple fitness rewards pertaining to the head, compounded with the fundamental fitness reward for distance traveled, proved promising as a prototype for introducing a hint of top-down design in this evolutionary scheme. Encouraging lack of motion in the head, in addition to keeping it from hitting the ground, during evolution, resulted in some satisfying locomotion styles, such as the creature shown in four sequences of Figure 8.


Fig. 8. 3-legged locomotion strategy with steady head.


In this illustration, the creature is seen traveling in the direction indicated by the arrow in the first frame. Blurry afterimage lines are shown indicating the motion of the body. Notice how the head remains relatively steady while other body parts take care of most of the locomotion work.

3.3.15. Why Having No Inner Ear Means Having Three Legs The creatures in these illustrations tend to use a tripod stance to stabilize themselves. Creatures in this scheme usually evolve 3-legged locomotion, sometimes 4. Bipedal locomotion does not evolve: this is probably due to the fact that they have no sensors for balance, and thus no way of adjusting to tilt (as Walker did). A future enhancement will be to add 3D "vestibular" sensors (analogous to the three semicircular canals in our inner ears), and adaptable reactivity to that sense, as a means (among others) to encourage evolution of bipedal locomotion.

3.3.16. Putting Meat on the Bones
An extension of this scheme includes bodies with variable thickness among parts. Figure 9 is a hand-drawn illustration of a representative 3D creature from this set. These creatures are the most complex of all the morphological schemes, and can exhibit locomotion styles and anatomies which exploit the effects of uneven distributions of mass among the body (consider for instance the way a giraffe uses the inertia of its neck when it runs).


Fig. 9. A 3D creature with variable thickness in parts.




next section:

3.4 Sexual Swimmers


(go to beginning of document)