Hero Image
- Carlos de la b

Generative design with Genetic Algorithms

Genetic algorithms perform highly efficiently when all the parameters are connected, and it is not possible to maximize one value without affecting the others. For this experiment, a GA is used as a design exploration tool. A binary list 1,0,1,0,0,0,1 represents a series of cubes stacked together to create a rectangular cuboid (20x15x30 units composed of 1x1x1 cubes) used as a test bed for the different explorations. The 1 represents a cube, and the 0 represents a void.

Fitness Function

The fitness function consists of balancing a series of parameters, which are:

*Maximize the Volume:* The idea behind exploring the maximum building volume is usually driven by economic aspirations, like maximizing the space for offices or residential units. Minimize site occupation Area:** Good buildings are usually generous with public space, which implies creating soft and hard surfaces to allow people to meet. *Penalize the Distance between the building and other constraints in the surroundings: Since a building belongs to an urban network, there are many constraints to satisfy, like rights of light or sightline restrictions, among others.

The final shape will be the result of balancing these parameters. On one side, the volume needs to be maximized, populating the maximum number of cubes (1) in the rectangular cuboid. On the other hand, the area operates in the opposite direction: maximizing the number of voids (0) in the lower levels of the rectangular cuboid. The developer’s Manhattan function maximizes the volume and minimizes the footprint on the ground floor. (COATES, Paul., Programming.Architecture, New York, Routledge, 2010, p. 97). Finally, the distance parameter reacts to different inputs, which in this case have been represented by attractor and repeller points. If some part of the building is inside an influence area, the chromosome is punished or rewarded.

The model (Genetic Algorithm) works as a curator engine to select the highest-ranked designs from the generative process. The designer can also define other constraints to represent the real environment of the design as much as possible. The objective will always be to find the subtle balance between all parameters.

The model (Genetic algorithm) works as a curator engine to select the highest ranked designs from the generative process. The designer, can also define other constraints to represent as much as possible the real environment of the design. The objective will always consist in to find the subtle balance between all parameters.

This experiment takes advantage of GAs as a generative design engine to search for the most suitable shapes according to the parameters. The goal is to satisfy all the functions in the fitness function: min = (f(x1), f(x2), f(x3), f(x4), …, f(x+i)). Since it is not possible to make at least one function better off without making any other function worse off, this definition is known as the Pareto frontier.

GA video process animation

Genetic algorithm parameters

The following list shows the parameters used for the Genetic Algorithm. To test the robustness and variability of the algorithm, several tests were performed. The following parameters do not represent the best tuning for the solution but a good approximation.

  • Objective Function: Fitness = (fitSequence + Volume) – ( (InsidePts x 2) + footPrint))
  • Codification: Binary string. ('0', '1', '0', '1', '1', '0')
  • Type of problem: Multi-objective
  • Number of generations: 300
  • Size of population: 20
  • Natural selection: Roulette Wheel, scaled by non-polynomial function.
  • Crossover: Uniform crossover (1 point)
  • Mutation: Bit string mutation, 0.01%

Test bed example: Geometric representation of the problem

The semi-transparent orange spheres represent the attractor and repeller points. The rectangular cuboid has been represented in black lines. On the right are examples of iterations.

Design

Chromosome: The Chromosome is made up by of a binary list: 0,0,0,1,0,0,1,0,1,1,1,0,0. The 1 represents a cube position and the 0 a void.

Fitness function: If ( footPrint > 45) Then footPrint = footPrint * 5 If ( Volume > 800) Or ( Volume < 700) Then Volume = Volume * 0.5 Fitness = ( fitSequence + Volume ) – ( ( InsidePts x 2 ) + footPrint ) )

Natural Selection: The natural selection implemented is a roulette wheel scaled by a non-polynomial function and a learning rate parameter to manage the decay factor in the curvature. This feature allows detailed control of the natural selection algorithm.

Crossover:

Two types of crossovers were implemented: single-point crossover and uniform crossover. The single-point crossover works by splitting the parents into two stripes in order to create offspring. Moreover, the uniform crossover uses a random number (50%) to determine if the father or the mother will inherit the gene to the offspring. Both algorithms return 2 offspring. The uniform crossover returns a more random result than the single-point method. The idea behind implementing both strategies is to include a "little bit of noise" to delay the convergence of the result.

Mutation The mutation operates by swapping a 1 for a 0 or vice versa, according to the mutation percentage parameter.

Process

For this experiment, the buildings have been distributed in the space using another A.I. technique

The red spheres represent different constraints like, Right of light, ventilation, sightline restrictions, minimum distances, etc

In the image above os possible to understand how the GA react with the different constrains, and the results make sense

White render, to represent the group of buildings

White render, to represent how could looks like a city or neighbor

Other Related Posts:

Steel truss Optimization

Steel truss Optimization

This experiment uses generative components as a parametric modeling software and Microsoft Excel to evaluate and optimize a steel truss. The objective consists in reducing the total steel weight in the truss.

The problem is simple. It is necessary to modify the position of some truss joints (nodes...

10th Apr 2009 - Carlos de la b