Forms of Life

Inspired by the idea of Life by architect Christopher Alexander and the artificial life simulation Game Of Life by John Conway, the living environments of GOL are optimized to maximize their total life. i.e a generative architecture for artificial life.

"The more living patterns there are in a place - a room, a building, or a town - the more it comes to life as an entirety, the more it glows, the more it has that self-maintaining fire which is the quality without a name."
- Christopher Alexander


Life or Game of Life by mathematician John Conway is one of the most simple and well known instances of computational emergence. Each active pixel represents 'life' and a few simple rules dictate how they spread and die.

Life or the Quality Without a Name by architect and mathematician Christopher Alexander is not easy to define but is roughly the capacity for design to nurture and spur life and positive experience.

All life is guided by its environment and subtle changes in spaces can have profound effects. Architectural generative design is the practice of using software to assist with the design of buildings so that they may be 'better' for the either the environment, developer or future inhabitants. Despite the appeal, how to make it better and what kind of better and for whom are rarely clear. Here, the what and who are radically simplified since we can simulate the life completely and the focus is on the how. Essentially, it is the most simple but pure generative architecture project possible.

Randoms

To get a feel for the optimization results, random forms are shown below for contrast. These were generated using Perlin noise.

Hostile Design

Below is optimizing for minimum life and maximum resources. This is the bad architecture of GOL. Sometimes only missing a few things makes a large difference.

Metrics

Even in this radically simplified environment a description of goodness has some subjectivity. Originally, simply the total average amount of life was used. But this yielded many static patterns. So do we want more static or dynamic life? The other runs use the amount of created life / area as the objective. Below: examples of static patterns with original fitness function.

Varying amounts of space

Doing a multi-objective optimization (NSGA-II) enables optimizing for life and resource usage (used pixels) separately. Below: options from the Pareto front of solutions.

Methods

This project was an opportunity to experiment with spatial optimization methods. The simplicity of this problem makes it a useful test environment, but also illustrates how algorithms always have their own biases and impact output designs as much as metrics or datasets. All methods were averaged over 5 runs with 80,000 evaluations and the same starting seed.

1: Genetic algorithms directly on the images.

2. Train a GAN on Perlin noise images and do a genetic algorithm within the latent space.

3. Use the same GAN but use Covariance Matrix Adaptation Evolution Strategy (CMA-ES).

4: Use a Content and Pattern Producing Network (CPPN) with neural-evolution.

CMA-ES latent evolution did best but the difference was close enough that it could be made up with meta-parameter tuning. Machine learning methods may be very powerful for organizing search spaces for exploration. However, this 'smoothness' corresponds to a decrease in resolution. This is evident in the above images where the direct evolution had a hard time cleaning up certain details but was able to produce more diverse forms. Remarkably, they still managed to produce a near-equal average fitness.

Evolution in latent space has other nice properties not fully evident here. It is capable of producing a crossover operator and arbitrarily large mutations where none might exist (such as floor-plans or congressional districts), the ability to define the design space via examples and the performance benefits of a smaller search space.

CPPN's are attractive for their capacity to create novelty unburdened by datasets. However, the shapes bias towards simpler geometric shapes defined by the node operators and most runs stayed stuck in the local optimum of a circle.

Implementation

Source

The code is written in Python and uses Pytorch (for ML models), Cython (for image operators) and Taichi (for running GOL in Cuda). These enable extremely efficient but also highly compact and readable code. Two-hundred GOl boards can be run in parallel for 1000 steps in a fraction of a second and a whole optimization run takes just a few minutes. The GA uses pymoo and the evolutionary strategy uses pycma. The WebGL viewers use regl.

Future Work

Broadening the imagination for artificial life is a goal, and there are several other AL domains where it is fun to imagine how they might want to live and what their architecture and communities could look like. For improved spatial optimization, hybrid latent-direct methods that can leverage the advantage of both is exciting. Additionally, incorporating fitness into the ML models and applying it to other generative design problems is a current area of my research.

Related

Here are other examples of my speculative-design and computational-art projects in the medium of spatial optimization:

Dimensions of Dialogue

Experiments inspired by early proto-writing systems such as cuneiform and hieroglyphs. Here, new writing systems are created by challenging two neural networks to communicate information via images

Dimensions of Dialogue

generative

code

2018

Corals

Generative forms art-research

Corals

generative

code

2018

Evolving Floorplans

Floorplans optimized with a custom genetic algorithm.

Evolving Floorplans

generative

code

2017