Genetic Algorithm Problem Solving

This algorithm presents a method and tool development for multiple aspects of mixed-use towers development - in terms of costs and financial issues – which is extensible to future research trajectories. The tool specifically delineates financial-based design integration which addresses the costs and the revenues of a proposed design, providing the designer with idea about the construction costs of the design, as well as allowing him/her to search for an optimal design solution, during the initial design phase that minimizes the cost and maximizes the profit.


The objective of the algorithm is searching for the best mixed-use configuration and programs surface areas that minimize the cost and maximize the profit. The tool explores the concept of generating numerous iterations in search for a suboptimal program ratio for each of the space functions: retail, offices and residential.


The algorithm is divided into 8 main sections. The sections are named, according to their function, as follows:

1. Site constraints: defines the allowable dimensions of the site including the curb cut, setback, and maximum allowable building height.
2. Program ratios: defines different ratios for each function taking into account the sum of all ratios should not exceed 1.
3. Program geometry: defines the rectangular dimensions of each function, its height, floor slabs, and start and end surface planes.
4. Continuous geometry: defines the end surface plane of one mass off which the upper massed is generated.
5. Cost and revenue: a series of mathematical functions for cost and revenue calculation based on surface floor areas.
6. Profit calculation: a series of mathematical functions for subtracting total cost from total revenue in search for net profit.
7. Galapagos: the genetic algorithm component that is connected to control genes and one fitness value off which the component operates.
8. Excel exporter: given the wide use of excel spreadsheets in the development profession, an excel exporter has been incorporated into the algorithm to export the values of surface areas, height, and dimensions to the developer’s excel spreadsheet for further use and investigation.

Though direct “control genes” have been assigned to the Galapagos component, this algorithm’s components are interwoven. Changes in one of the component values impact the following components. Given that, there was no need for connecting all variables as “genes” to the genetic algorithm component; values listed below are connected and they consequently affect the other variables through a series of mathematical functions and equations. Galapagos was run for 30 minutes during which it was able to hone in on 10 generation. 5 of the 10 generation are close iterations in term of fitness value. See attached video for more details.

CONTROL GENES (not limited to..)

  1. Maximum allowable building height
  2. Retail total program surface area
  3. Retail floor-to-floor height
  4. Office floor-to-floor height
  5. Residential floor-to-floor height

The genetic algorithm component operates off a “single” numeric value which, within this framework, is the “net profit”, as defined below.

Total Floor Area x Cost per Sq.Ft.=Total Cost ($)
Total Floor Area x Selling Price per Sq.Ft.=Total Revenue ($)
Total Revenue-Total Costs= Net Profit (Fitness Value)

Galapagos works on maximizing the net profit (fitness value) – by minimizing the cost and maximizing the revenue – in search for a suboptimal design configuration for the three main masses composing the building: retail, offices and residential.


Download definition here (Right-click and Save As)
Download High-res board here
Watch Youtube High-def movie here


This exercise aims to maximize the unobstructed view from 2 sides of a building which is surrounded by two other buildings. At the same time, maximizing the surface area of the two neighboring buildings' facades is taken into the equation.

Download definition here
Download movie here


This definition is similar to what we did in class; the difference is in the "weighing" factor for the fitness value. Please feel free to download the definition, read the comment and explanation, and run Galapagos to see the changes.

Download definition here


This is a solution for Problem 21, the last problem on the list. The algorithm defines two fitness values: 1) Crease Length and 2) Folded Part Area. Please feel free to check out the definition and run it by yourself to find the minimum length for crease or minimum surface area.

Download movie here.
Download definition here.

More Examples (Simon Chiu's Challenge)
Trapezoid Inscribed by Semi-Circle
Trapezoid Inscribed by Full-Circle


Energy efficiency is a big discourse that is taking place in the profession. Architects, designers, and software developers are working on integrating energy simulation into the early stage of design. The integration of simulation into the design process will help architects to account for the performance of the building in terms of geometry, form, and materials. But what about having a design tool that architects can run and it automatically finds an optimal solution for specific design problems predefined by the architect/engineer.

My final proposed project is about creating a genetic algorithm-based definition that can help architects/designers account for solar performance of a building. By solar performance I mean daylighting and solar radiation which drastically impact the performance of indoor spaces, in terms of solar heat gain and luminous conditions. I expect that the main variable in the study will be an external shading system that can actuate and change in geometry for the purpose of better indoor environment.

In order to accomplish this project, I need to define a performance criteria based on which the genetic algorithm will operate to find optimal solutions. Also, I should identify the analysis tool which should be integrated into the Grasshopper definition. Though I know how to integrate DIVA for daylighting and Ecotect into Grasshopper, and I used Galapagos before, I would like to gear this project toward more complexity and higher level of programming by exploring different tools, which may require some Visual Basic or C# programming. I look forward to learning something new and different than what I currently know.

In my opinion, a good knowledge of Visual Basics or C# programming will allow architects/designers to not only solve specific problems, but going beyond that level by developing their own custom Grasshopper component that hosts their own analysis parameters or for tools that don't have GH components in the market.


This exercise shows an algorithm for an outdoor canopy geometry design. The canopy is divided into two layers: solids and voids. There are also some site limitations set to control the size and the shape of the canopy. It is enclosed by four polygons that can change shape. The main goal of the genetic algorithm definition is to find an optimal solution that provides the highest ratio between voids to solids. The definition uses very basic grasshopper techniques. Please feel free to download the file, review it, and use it, if necessary.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License