Evolutionary Design for Architects
Evolutionary Design for Architects
Computer-Aided Design
journal homepage: www.elsevier.com/locate/cad
matrix into linear chromosomes is required for GA applications. in nature. As the work progresses, the architect chooses between
Dodd [4] encoded graphs by concatenating rows of an adjacency alternative potential graphs with required adjacencies between
matrix into a linear string, the length of the chromosome has to functional spaces. Those graphs that do not lend themselves to
be the square number of the dimension of the adjacency matrix. desirable mix of functional spaces or potential of developing into
This square number constraint has to be maintained in order to reasonable dimensions and geometries will be discarded at early
enable successful decoding of the chromosome back into a graph. stage while leaving the others for further development. The use of
Hence, it does not favor variable length chromosome evolution. In EvoArch is to evolve potential graphs with preferred adjacencies
order to produce legal offspring, it requires special encoding and of functional spaces for the architect’s input of dimensions and
decoding procedures and repair mechanisms before and after the geometries in the next stage to generate floor plans.
evolution process. Furthermore, as the size of the graph increases, In addition to the preferred adjacencies, the budget and some
the encoding of all details will result in a very long chromosome. other design constraints are imposed in the EvoArch process. The
Different indirect encodings of graphs are also developed for resulting graphs that satisfy these constraints will facilitate the
graph evolution. They generate graphs by reading instructions ease of architectural layout plan generation in the next stage
from genotypes in the form of a chromosome [5] or a tree [6]. as there are fewer remaining requirements to be catered for.
Evolution is then carried out at the genotype level by using GA In the experiments, we apply EvoArch to the design of a house
for chromosomes or Genetic Programming (GP) for trees. Other with 9 required functional spaces. Each functional space may
forms of indirect encoding involve evolution of graph generating present more than one time in the house depending on the budget
rules such as that proposed by Kitano [7] or of encoding on a available. The other design constraints to be imposed in EvoArch
grammar based construction program in the genome proposed by include the maximum number of functional spaces that can be
Lindenmayer [8]. However, the efficiency of search is hampered adjacent to a particular functional space known as the valence,
by the indirect evolution on the genotype or evolving graph and the relative ratios of functional spaces in the house which is a
generation rules instead of the evolving the graphs themselves or design norm in the architect’s profession. The resulting graphs will
their direct representations. This paper addresses this problem by have different topologies at different costs and functional mixes for
encoding graphs directly into adjacency matrices so that evolution the client and the architect’s evaluation and selection for further
of graphs can take place directly with them using specially development into layout plans.
designed crossover and mutation operators. This encoding scheme EvoArch encodes graphs in adjacency matrices to conduct
avoids the need for special encoding and decoding procedures to evolution. The difficulty with the evolution of graph topologies
be developed. using EAs is the tremendous increase in the complexity of
The problem of automating spatial configuration is concerned the search space when the number of nodes of the graphs
with the finding of feasible locations for a set of interrelated increases [13]. Even though this problem can theoretically be
objects that meet design requirements and maximize design mitigated by a corresponding increase in population size so that
quality according to design preferences. Spatial configuration is more candidates can be utilized to evolve the best target, such an
necessary for all physical design problems such as component increase in population demands too much computational resource
packing [9], route path planning [10], VLSI [11], and architectural for the evolutionary process. To overcome this problem, we
layout design [12]. Of all these problems, the architectural layout propose a novel uniform graph-based crossover operator, Uniform
design problem is particularly interesting because, in addition to Graph Crossover (UGC), that can effectively facilitate the exchange
common engineering objectives such as costs and performance, of useful characteristics of two graphs.
it is concerned especially with aesthetics and usability, which are The UGC that operates on adjacency matrices is similar to the
generally more difficult to describe formally. Also, the components uniform crossover operator for linear-string chromosomes in GAs.
in a building layout (such as rooms or walls, etc.) often do not For such GAs, the uniform crossover operator has been shown
have pre-defined dimensions and every such component has to to be more efficient at a heuristic search even when given a
be resizable. These characteristics make the design problem very small population [14–16]. The reason is that such an operator is
difficult. a relatively more disruptive operator and novel offspring can be
The conventional approach to such architectural layout design generated even when the size of the population being evolved is
problem is for an architect to receive a briefing from the client, relatively small to provide a sufficient variety of building blocks
usually a layperson, on functional requirements. Once such for the evolution of an optimal design.
requirements are obtained, it is an architect’s job to convert In addition to the use of the UGC, EvoArch also makes use
the client’s requirements into building plans. The process begins of a set of matrix based mutation operators called Number-of-
with conceptual sketches of architectural space topologies of Node mutation, Number-of-Edge mutation, Node-Label mutation
the functional spaces and their adjacencies based on the client and Swap-Node mutation operators. Given the design constraints
preferences. These sketches are sometimes called bubble diagrams. based on the adjacency preferences of the functional space of
After these diagrams are done, the architect’s next task is to add a house and the budget constraints, EvoArch makes use of a
dimensions to the space topologies drawn in the bubble diagrams fitness function to evolve optimal architectural space topologies.
and this whole process is idiosyncratic and very dependent on the To evaluate the effectiveness of EvoArch, experiments to find
artistic talent of individual architects. optimal architectural space topologies were conducted based on
To facilitate the architectural layout design process so that both different budget ranges on a set of adjacency preferences between
experienced and less experienced architects can respond quickly to the functional spaces required of a house. The results are very
their clients’ requests, we propose to use an EA called EvoArch (The promising.
name combines the two words Evolutionary and Architecture).
The EvoArch represents spatial configuration in the form of a 2. Literature review
labeled graph so that functions such as bedrooms and kitchens
can be represented as nodes and the adjacency between them, The architectural layout design problem is concerned with
such as separation by a wall, etc., can be represented as edges. the allocating of a set of space elements according to certain
These graphs are in fact equivalent to bubble diagrams from which design criteria. A solution to this problem usually involves the
floor plans can be generated by inserting into them dimensions specifying of topological or geometrical relationships between
and geometries. The architectural design process is evolutionary elements. Given a topology that describes the adjacencies between
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 651
space elements such as different geometrical shapes, these space be fixed around the first feasible design. Also, both [21] and [22]
elements can be arranged to satisfy the pre-specified topology. are designed for rectangular room plan manipulation but not other
The mapping of geometries of space elements in a topology is geometric shapes. Again, these represent constraints on the degree
therefore a many-to-one mapping. Given the geometries of space of creativity that can be exercised.
elements, it may therefore not be possible to retrofit them to satisfy Current studies on automated architectural space planning con-
a particular topology. centrate on packing rooms with fixed geometries and evolving
There have been some attempts to automate architectural floor plans from basic elements with fixed dimensions. Architec-
space planning. For example, in [17], an evolutionary approach is tural space topology plays a secondary role as a condition to be
described to map functional activities to a floor plan by encoding satisfied. The creative freedom of the architect is therefore restruc-
the activities in a chromosome. This evolutionary approach is an tured to a large extent by pre-determined geometric shapes and
extension of the traditional GA, called genetic engineering [18], dimensions of the basic elements adopted in the design automa-
Other than the traditional crossover operator of swapping of genes tion algorithms. The resulting floor plans tend to be predictable and
between two chromosomes, this genetic engineering approach mundane. In order not to restrain the creativity of an architect, we
attempts to also convert low fitness genes by high fitness genes propose to start off the design process by evolving an optimal ar-
in a chromosome. The evolutionary approach described in [17] chitectural space topology while leaving the insertion of geometry
requires that the architectural space topology be given and fixed. of rooms to the creative hands of the architect. Since the most nat-
Different functional activities encoded in different chromosomes, ural form of presentation of architectural space topology is in form
which represent different architectural spaces, are then swapped of a graph and it has been used in other researches for encoding
with each other during crossover so as to obtain optimal fitness of floor plans [23,24], we propose to use an EA called EvoArch that
functional activities to individual spaces. can evolve such graphs. The details of EvoArch are given below.
Other than the above, there have been studies on the automatic
generation of floor plans by combining basic elements (such as a 3. The details of EvoArch
straight line of unit length etc.) of a plan using a set of combination
rules or shape grammar [19]. The combination rules are encoded as Many EAs are developed to handle special kinds of graphs. For
a genotype in a chromosome on which GA or genetic engineering is example, GP algorithms [3,25] have been used to evolve trees
applied. The floor plan is generated by decoding the chromosomes and algorithms, such as [26], have been used to evolve Artificial
as a phenotype after the applying of the crossover or mutation Neural Network (ANN) topologies which can be considered as
operations on the genotype. The fitness is evaluated according to special bipartite graphs. These algorithms cannot be used to
the phenotype—the floor plan. An illustration of this approach can evolve architectural space topologies as these topologies cannot be
be found in [20] where a square module is used as a basic module represented easily as trees and bipartite graphs, What is needed
for the generation of floor plans. Such modules are to be combined is an EA that can evolve graphs without many of the topological
to form higher level components which constitute the functional constraints like those that other EAs have to work under. In this
spaces of a house. The grammar of combination of the modules paper, we propose such an EA called EvoArch.
and the components are encoded in a chromosome on which GA Using EvoArch, an architectural space topology can be repre-
is applied. The floor plan is generated according to the evolved sented as a graph with nodes representing space and edges their
combination rules. Like other indirect encoding method in EAs, adjacencies. EvoArch converts these graphs into their adjacency
the efficiency of evolution is not high. Furthermore, the resulting matrices and conducts crossovers and mutations on these matri-
geometries of the rooms are dictated by the geometries of the ces. These reproduction operators of crossover and mutation can
basic elements, such as an aggregation of squares. As a result, the work with adjacency matrices to produce effects similar to the uni-
dimensions of the evolved plans can only be multiples of the basic form crossover and mutation operators in the case of linear-string
elements. These are some constraints on how creative one can be! GA. Like other EAs, EvoArch finds optimal spatial topologies in sev-
Other studies on the automatic generation of architectural eral steps as follows:
space plans start off with rectangular rooms that constitute a floor
plan [21,22]. For example, in [22], a computer program called 1. Initialize a population of graphs at random and encode these
ARCHiPLAN can be used as a tool to manipulate the absolute graphs as their adjacency matrices so that evolution can be
locations, orientations, and dimensions of the rectangular rooms carried out on them.
under a set of physical constraints. During the floor plan generation 2. Evaluate the fitness of each graph.
process, it checks the topological consistencies of the rooms by 3. Select two graphs for reproduction using the roulette wheel
avoiding overlaps among them. In another example in [21], an selection scheme.
approach for representing rectangular rooms as nodes of a tree 4. Apply crossover and mutation operators on the selected graphs.
is described. The topology of the tree is a description of room- 5. Replace the least-fit graphs in the existing population by the
adjacencies. The tree topology and the absolute locations of the newly generated offspring using the steady-state reproduction
rooms are encoded in different chromosomes and each of them scheme.
undergoes crossovers and mutations independently. The separate 6. Repeat Steps 2 to 5 until the termination criteria are met.
results decoded from the chromosomes are put together in a floor
plan and this is equivalent to a swapping of rectangular rooms 3.1. Encoding graphs in graph adjacency matrices
attached to a tree topology where dimensions and orientation of
the rooms as well as the tree topology are changing at the same Encoding is usually the first thing one needs to decide when
time. The efficiency of search of such an approach is hindered by solving a problem with EA. Many encoding schemes, such as
the combinatorial complexity. Furthermore, tree-representation is binary, permutation, value encoding, etc. in GA [1] have been
not a good representation of architectural space topology because developed and used with much success when tackling different
it only represents the adjacencies between the nodes or rooms problems in different application areas. In addition to these
from one layer of node in the tree to the layer immediately above popular encoding schemes, there have been studies on cellular [27]
and below it. It cannot take into consideration adjacencies between or edge encoding [28], developed to encode tree-like structures.
rooms in the same layer or nodes separated by more than one Similarly, work on GP [3,25,29] and the evolution of ANN [26,30,31]
layer of nodes in the tree. The result is that the search tends to architecture has also been proposed.
652 S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667
With a few exceptions in some domain-specific studies [32,33], 3.2.1. Uniform Graph Crossover (UGC) operator
not much work on the use of a direct representation scheme The UGC operator allows two parent graphs, GP1 (V P1 , E P1 ) and
to conduct EA for graphs in general has been done. Here, we GP2 (V P2 , E P2 ), that may contain different number of nodes to be
propose a direct graph representation scheme. This scheme, which crossed. Each labeled node in a graph represents a functional space.
is used by EvoArch, is to encode graphs by encoding their adjacency
Each edge between two nodes represents the adjacency of the
matrices. An adjacency matrix represents graph nodes and their
functional spaces the two nodes represent. Given the two graphs,
connectivity at the same time. Though these matrices can also
GP1 (V P1 , E P1 ) and GP2 (V P2 , E P2 ), their corresponding adjacency
be encoded in linear-string chromosomes which simple GAs can
operate on by concatenating the rows of a graph adjacency matrix matrices GP1 and GP2 can be constructed.
to form a linear array [34], it should be noted that this can be The first step that UGC takes is to randomly permute the
computationally clumsy. If linear-string chromosomes are used, ordering of the nodes in the adjacency matrices of the two graphs,
the connectivity between nodes cannot be read directly. Special GP1 and GP2 . This is to ensure that there is no bias when nodes on
decoding is required to convert the linear-string chromosome back one side of the cut line of the adjacency matrix of a parent graph
into a graph. Furthermore, the length of the chromosome also are selected by the UGC operator for swapping with the adjacency
needs to be a square number of the dimension of the adjacency matrix of another parent graph (see the formalism below). An
matrix |V |2 or |V |C2 if an upper diagonal adjacency matrix is used. adjacency matrix has the advantage that it is invariant to the row
Hence, it does not favor crossover of chromosomes of different and column permutation. This permutation-invariant property of
lengths. Illustrative examples are given in Section 3.4. adjacency matrices does not exist in linear chromosomes in GA. In
An additional advantage of the adjacency matrix encoding a linear chromosome, permutation of alleles will result in different
scheme is that an effective crossover operator can be relatively eas-
properties and hence different fitness but this is not the case with
ily implemented with it. The ‘‘repairing’’ of a matrix after crossover
adjacency matrices. The fitness of a graph is the same regardless of
to ensure connectivity can also be more easily implemented with
the permutation of the rows and columns of its adjacency matrix.
adjacency matrices (see the next section). In the following, the de-
tails of the proposed encoding scheme and evolution operators are After row and column permutations, for each of GP1 and GP2 ,
described. a crossover point between two neighboring rows and columns
A graph adjacency matrix can be used to represent any graph in an adjacency matrix is selected randomly. One submatrix
including both directed and undirected graphs. Architectural space from each of the split parent matrix is then swapped to form
topologies can be represented in undirected graphs and the value, two new child matrices. Connections within the submatrices are
cij , of the ith row and jth column of the adjacency matrix of such a retained throughout the process while connections outside them
graph can be set to 1 if a connection exists between the ith to the are deleted. New edges are generated with repairing in each of
jth node and cij can be set to 0 if there is no connection between the resulting matrices to form two children, GC 1 and GC 2 . The UGC
them. operator can be described step-by-step as follows.
3.2. Reproduction operators 1. Given two graphs, GP1 (V P1 , E P1 ) and GP2 (V P2 , E P2 ), with node
sets {v1P1 , v2P1 , . . . , viP1 , viP1
+1 , . . . , vn } and {v1 , v2 , . . . , vj ,
P1 P2 P2 P2
The EvoArch makes use of both crossover and mutation
operators in its reproduction process. There is one type crossover
vjP2
+1 , . . . , vm } respectively. For the two graphs, corresponding
P2
operator that EvoArch uses and it is called the Uniform Graph adjacency matrices GP1 and GP2 are constructed. The order of
Crossover (UGC) operator, allows any node to have equal chance nodes is randomly permuted.
of being selected to be swapped. For mutation, EvoArch makes 2. A crossover point in each of GP1 and GP2 is randomly selected.
use of two types of operators. They are called the Number-of-Node, 3. Assume that the crossover point for GP1 is between viP1
Number-of-Edge, Node-Label and Swap-Node mutation operators.
and viP1 +1 and for G
P2
is between vjP2 and vjP2
+1 , the lower
When performing crossover and mutation, there is a need to
right portions of these two adjacency matrices are then
ensure connectivity of the graphs being evolved. To do so, EvoArch
embeds a spanning tree at random to a graph which may become swapped so that the rows and columns corresponding to
+1 , . . . , vn } are swapped with the rows and columns
{viP1 P1
disconnected after crossover or mutation. Starting with a spanning
+1 , . . . , vm } to form two matrices G
PC 12
tree, addition of connections between nodes in a spanning tree and corresponding to {vjP2 P2
connection to new nodes will form a connected graph. and GPC 21 . The valid node labels for GPC 12 are therefore
A spanning tree can be considered as a directed graph with given by {v1P1 , v2P1 , . . . , viP1 , vjP2
+1 , . . . , vm } and for G
P2 PC 21
by
the directed edge starting at the root and descending toward the
terminal nodes. A spanning tree has |V | − 1 number of edges {v1P2 , v2P2 , . . . , vjP2 , viP1
+1 , . . . , vn }.
P1
where |V | is the number of nodes in the graph. Except for the root, 4. All cell entries in each of GPC 12 and GPC 21 are scanned to remove
each node receives a directed edge from the node above it. When invalid edges.
represented in an adjacency matrix with the first column as the 5. The number of edges to be added to each of GPC 12 and GPC 21
root, this property implies the second column to the end column respectively are then decided with a random number generator
will have only one cij = 1, where cij represents an edge directed so that, for GPC 12 ,
from node i to node j. An example of such an embedded spanning
tree in a graph is shown in Fig. 1. For the case of an undirected |V PC 12 | − 1 ≤ |E PC 12 | ≤ |V PC 12 |C2 and for GPC 21 ,
graph, embedding of a spanning tree into such a graph is presented |V PC 21 | − 1 ≤ |E PC 21 | ≤ |V PC 21 |C2 .
by using the upper diagonal adjacency matrix shown in Fig. 2.
During crossover of graphs as described in the next section, 6. A spanning tree is generated at random in each matrix and
each of the parent graphs will be broken up into two subgraphs. the remaining edges to be added are generated randomly in
The subgraphs are then exchanged forming two intermediate such a way that they connect nodes from {v1P1 , v2P1 , . . . , viP1 }
degenerate graphs prior to re-connection to form the children
+1 , . . . , vm } and from {v1 , v2 , . . . , vj }
with those from {vjP2 P2 P2 P2 P2
graphs. The re-connection mechanism is done by first generating a
with those from {viP1+1 , . . . , vn } and satisfy the number of edge
P1
spanning tree at random for each set of nodes of the intermediate
degenerate graphs followed by embedment into them. This process requirements in 5.
does not impose any order on the re-connection. Hence EvoArch is 7. Once edge-generation is complete, two children graphs, GC 1 and
a general EA with no bias. GC 1 , are produced.
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 653
(a) Graph with (b) Adjacency Matrix for directed graph with a
spanning tree ‘1’ in each column of non-root node of the
embedment and node embedded tree.
A as root. The spanning
is shown as thick
directed edges.
(a) Undirected Graph. (b) Adjacency Matrix for Graph. Spanning tree
Spanning tree shown in edges shown as ‘1’s.
thick edges.
For illustration, let us consider the following examples in 4. All cell entries in each of GPC 12 and GPC 21 are scanned to remove
Figs. 3–6. In order to indicate how nodes from one parent graph invalid edges. Both of them are degenerate graphs.
are swapped with the other, we use alphabetical node labels (‘A’ to 5. The number of edges to be added to each of GPC 12 and GPC 21
‘H’) for one parent graph and numerical node labels (‘1’ to ‘6’) for respectively are then decided with a random number generator
the other. These labels may represent different functional spaces so that,
in a building. Using the functional spaces in Fig. 12 as an example, for GPC 12 , |V PC 12 | − 1 = 6 ≤ |E PC 12 | ≤ |V PC 12 |C2 = 21 and
label ‘1’ is the ‘study area’ of GP2 and label ‘A’ the ‘study area of GP1 . for GPC 21 , |V PC 21 | − 1 = 6 ≤ |E PC 21 | ≤ |V PC 21 |C2 = 21.
Label ‘2’ is the master ensuite of GP2 and label ‘B’ the master ensuite In this example, say, |E PC 12 | = 10, |E PC 21 |6.
of GP1 and so on.
6. A spanning tree is generated at random for the nodes in each
1. Nodes of 2 graphs in adjacency matrices GP1 and GP2 are matrix and superimpose on the adjacency matrix of each of
randomly permuted prior to crossover. the degenerate graphs to re-connect them. A spanning tree is
2. A crossover point in each of GP1 and GP2 is randomly selected. now embedded in each of the graphs. GPC 12 has 7 edges. The
3. The lower right portions of these two adjacency matrices are requirement of |E PC 12 | = 10 in step 5 is not satisfied in GPC 12 .
then swapped to form GPC 12 and GPC 21 . New edges should be added to GPC 12 to fulfill the requirement.
654 S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667
Fig. 3. Nodes are randomly permuted in the adjacency matrices. A crossover point is randomly chosen for GP1 and GP2 . Corresponding graphs are shown above the adjacency
matrices. Invalid edges to be removed are shown in dotted lines.
Fig. 4. Invalid edges are removed after swapping the lower right portions of GP1 and GP2 . Degenerate graphs GPC 12 and GPC 21 are formed.
Note that if the edges in the resulting graphs are more than 3.3. Mutation of graphs
specified, edges that are not in the embedded spanning tree in
each graph can be deleted at random to achieve the target. The basic mutations of graphs that cause changes in graph
7. Three new edges are randomly added to GPC 12 , say, cD4 = 1, topologies and node labels are introduced. They are Number-of-
cD5 = 1, cA6 = 1 to form GC 1 . GC 2 is formed without addition of Node Mutation, Number-of-Edge mutation, Node-Label mutation
edges. and Swap-Node mutation. Similar to GA, the intention of mutation
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 655
Fig. 5. Re-connect degenerate graphs by generating spanning tree at random. Spanning tree edges are shown as ‘1’s in the adjacency matrices and directed edges in the
graph. New edges added to re-connect the degenerate graphs are shown as dotted edges in the graph.
Fig. 6. New edges cD4 = 1, cD5 = 1, cA6 = 1 in ‘1’ are added randomly to GPC 12 . Children graphs GC 1 and GC 2 are formed.
is to bring about a breakthrough when the population converges to 1. For a graph GP (V P , E P ) with node set {v1P , v2P , . . . , viP , viP+1 , . . . ,
a suboptimal fitness. vnP } we construct its corresponding adjacency matrices, GP .
3.3.1. Number-of-Node mutation 2. Generate at random either ‘0’ or’1’.
The Number-of-Node mutation operator allows us to increase
3. If ‘0’ is generated, a node, viP , in GP is selected at random.
or decrease the number of nodes in a graph by one. It works by
selecting a node at random for deletion or addition. Its details are 4. viP and all edges connected to viP are deleted from GP to form GC
given below. with corresponding adjacent matrix GC .
656 S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667
(a) Select the node B. (b) For ‘0’ case, delete the selected node B and
connect node A and D which are previously
connected to B.
5. Connect nodes previously connected to viP at random and the 4. If ‘1’ is generated, an edge is added to the graph by adding a ‘1’
resulting node set of GC is represented as {v1P , v2P , . . . , viP−1 , viP+1 , to the value of a cell at random in GP to form GC and GC .
. . . , vnP }. An example of the Number-of-Edgemutation operator is given in
6. If ‘1’ is generated, add node vnP+1 to GP and GP to form Fig. 8.
GC and GC respectively with a new node set represented
as {v1P , v2P , . . . , viP , viP+1 , . . . , vnP , vnP+1 }. Edges are generated at 3.3.3. Node-Label mutation
random to connect v P
to other nodes in G . C The Node-Label mutation operator allows us to replace one node
n+1
by another in the same graph. It works by selecting a node to be
An example to illustrate the Number-of-Node mutation operator is replaced and a node to replace it at random as follows.
given in Fig. 7.
1. For a graph GP (V P , E P ) with node set {v1P , v2P , . . . , viP , . . . , vjP ,
(a) For ‘0’ case, select at random edge to be (b) Delete selected edge. Check if PC is connected.
deleted. If yes, stop. If no, superimpose a spanning tree at
random.
(c) For ‘1’ case, select at random cell to add an (d) add an edge to the selected cell.
edge.
4. For a graph GP (V P , E P ) with node set {v1P , v2P , . . . , viP , . . . , vjP , We give an example of the Swap-Node mutation operator in Fig. 10
. . . , vnP } we construct its corresponding adjacency matrices as below.
GP .
5. Two nodes in the graph GP are selected and this is done by 3.4. Comparison of EvoArch operators and conventional genetic
choosing 2 nodes in GP randomly. Assume that the nodes chosen algorithm operators
in GP are viP and vjP .
6. Swap viP and vjP to form a child graph GC and adjacency To compare conventional GA operators with that used by
C C
EvoArch, we use GP1 and GP2 in Fig. 3. The most direct form of
matrix G . The order of node set in G is changed to encoding of graphs into a linear-string chromosome in GA is by
v1P , v2P , . . . , vjP , . . . , viP , . . . , vnP . concatenating the rows of the upper diagonal adjacency matrix as
658 S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667
(a) Select two nodes F and C to be swapped. (b) Swap the nodes F and C.
No.-of-Node mutation
Pedge_Mut no
Pnode_Mut
No.-of-Edge mutation
Initialize a
Evaluate Select two graphs for evolution Termination
population at Pc Uniform Graph Crossover Plabel_Mut
fitness operation by roulette wheel selection criteria met ?
random
Node-Label mutation
Pr = probability of Uniform Graph Crossover yes
Pswap_Mut
Pnode_Mut =probability of No.-of-Node mutation
Pedge_Mut =probability of No.-of-Edge mutation Swap-Node mutation
Plabel_Mut =probability of Node-Label mutation Stop
Pswap_Mut =probability of Swap-Node mutation
Fig. 11. Comparison between conventional genetic algorithm and EvoArch on encoding graphs and the EvoArch flow chart.
illustrated in Fig. 11(a). The length of the binary strings following Mutation in conventional GA is by flipping a bit at random in
the node label strings in the chromosome should be |V |C2 . A the linear-string chromosome of binary presentation. In case of real
crossover point is introduced at random for both GP1 and GP2 in valued representation in chromosomes, mutation is carried out by
Fig. 11(b) (symbol ‘/’). A conventional one point crossover is carried a random change of values of a gene within it. When Number-
out to produce children GC 1 and GC 2 in Fig. 11(c). GC 1 and GC 2 are of-Node mutation is carried out using conventional GA mutation
illegal children because they do not satisfy the length requirement by addition (node I) or deletion (node B) of one node label at
for converting back into an adjacency matrix. This situation is random in the chromosome GP1 in Fig. 11(a), illegal children are
very common for crossover of chromosomes with different lengths. again produced in Fig. 11(d). An additional procedure is required
Furthermore, linear-string chromosomes cannot directly represent to convert the children chromosomes to lengths conforming to
the connectivity between nodes as do adjacency matrices. As such, their corresponding adjacency matrices with the new number
the connectivity of nodes has to be reconstructed by some special of nodes. For Number-of-Edge mutation, addition of an edge can
repair procedures instead of simply incorporating a spanning tree be carried out by randomly selecting a ‘0’ in the linear-string
in the adjacency matrix adopted in EvoArch. Hence, the use of chromosome and change it to ‘1’. The deletion of an edge is by
adjacency matrices for crossover in EvoArch is more appropriate converting at random a ‘1’ to ‘0’. As the linear-string chromosome
than linear-string crossover in conventional GA. does not directly encode connectivity between nodes, it needs to be
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 659
reverted back into adjacency matrix for connectivity checking after B. Bathroom is to be shared by the bedroom, living room, and
edge-deletion. The Node-Label mutation and Swap-Node mutation dining room.
can be conducted by flipping node labels in the linear-string
(APS (6, 3) = 3, APS (6, 4) = 2, APS (6, 5) = 2).
chromosome to achieve their purposes. There are no complications
for these two types of mutation as there are no required-length and C. Patio is to be shared by master ensuite and living room and if
connectivity issues. possible, the dining room and bedroom. It is preferable to be
In summary, adjacency matrix is a more appropriate data exposed.
structure to represent graphs as it encodes the node labels and
their connectivity at the same time. EvoArch operators evolve (APS (8, 2) = 3, APS (8, 3) = 1, APS (8, 4) = 3,
adjacency matrices and produce legal offspring without the need of APS (8, 5) = 1, APS (8, 10) = 3).
complicated repair or re-conversion procedures. These operators
D. Circulation areas to link all rooms and carpark.
are applied with their respective probabilities in the evolution
process stated in the beginning of this section. The process is (APS (9, i) = 3 where 1 ≤ i ≤ 10 and i 6= 8, 10).
summarized in the flow chart in Fig. 11(e).
E. Study area to be attached to master ensuite. (APS(1, 2) = 2).
F. All rooms, carpark, and patio are preferred to be in contact with
4. Encoding architectural space topology and fitness function
the exterior.
At the design inception stage in a typical architectural project, (APS (10, i) = 3 where 1 ≤ i ≤ 10 and i 6= 9).
the architect has to interpret requirements from a client who is,
in most cases, a layperson. The client usually describes his or The architectural layout design process is divided into two
her preferred spatial groupings verbally. Such preferences can be parts: topology and geometry. Topology refers to the logical
translated into an adjacency preference matrix, which describes the relation between layout components. Geometry refers to the
preferred adjacency between functional areas. In Fig. 12, we give absolute location and size of each component layout. Topological
an example of an adjacency preference matrix of a house, drawn decisions define constraints for the geometric design space. For
up based on the requirements of a client. The numbers, which example, a topological decision that ‘‘room i is adjacent to room
make up an Adjacency Preference Scale (APS), are defined in such j’’ restricts the geometric coordinates of room i relative to room j.
a way that −2 means that the adjacency arrangement is very much Such decisions are important and have to be made before finalizing
not preferred, −1 means that it is not preferred, 1 means that it is on the geometry. What a designer needs to do is therefore to
preferred, 2 means that it is very much preferred, and 3 means that it try, as much as possible, to enumerate all topologies that can
is extremely preferable. Each functional space has an APS in relation produce feasible geometries [22] and then review them to select
to each of the other functional spaces as well as itself. those to explore geometrically. This process is slow and time-
An adjacency preference matrix can be drawn up by interpret- consuming. As it is very difficult for designers, especially the
ing the client’s adjacency preferences between each pair of func- inexperienced ones, to run through the process of optimizing
tional space into APS as shown in Fig. 12. Several APS can be topologies manually, subsequent geometric designs produced may
obtained by interpreting the client’s descriptive statements. Some not best match the client’s need.
examples are listed below. This matrix will be used in the fitness To overcome this problem, EvoArch can be used to find possible
function and the experiments in Sections 4 and 5. The fitness func-
optimal topologies in the design process so that, instead of
tion will maximize the APS subject to constraints. This will be dis-
having to deal with too many feasible but suboptimal topologies,
cussed in Section 4.
designers need only deal with the optimized ones when starting
A. Bedrooms should be grouped. (APS(2, 3) = 2). geometry design.
660 S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667
exterior
patio car
bed dining
patio study car
patio
hall
master living bed
bath
ensuite dining
patio study
hall
exterior
exterior
Fig. 15. Dual graph (dotted lines and triangular nodes) construction from the solid
line graph.
car
patio
bed
dining
patio study car
patio
hall
Table 2 Table 4
The probabilities of each operator being selected for reproduction. Summary of experimental results.
Operator Probabilities of being selected Experiment Budget No. of Converging APS Cost APS/Cost
range nodes generation
Uniform Graph Crossover 0.2
Number-of-Edge mutation 0.2 1 30–34 10 1312 55 32 1.719
Number-of-Node mutation 0.2 2 35–39 11 611 64 36 1.778
Node-Labelmutation 0.2 3 40–44 12 1536 74 40 1.85
Swap-Node mutation 0.2 4 45–49 13 1036 74 45 1.644
5 50–54 15 1294 108 52 2.077
6 55–59 16 2101 113 57 1.982
Table 3
Experiment and budget range.
y = 0.4195x + 9.8745
Experiment Budget range 70
R2 = 0.9577
60
1 30–34
50
2 35–39
Cost
40
3 40–44
30
4 45–49
20
5 50–54
10
6 55–59
0
40 60 80 100 120 140
preference matrix as shown in Fig. 12, and each functional space APS
has other constraints specified in Tables 1a and 1b. Using 10
nodes that include 9 functional areas and one node representing Fig. 17(a). Relation between cost and adjacency preference scale (APS).
the exterior, EvoArch generates optimal design topologies that
satisfy budget requirements and other design constraints. These
emphasized that this optimal is based on the adjacency preferences
alternatives compete with each other by compromising design
and constraints input to EvoArch and the optimal graph evolved
objectives in give-and-take situations and eventually arrive at the
is the one that is closest to these input targets. The limitation is
one that best fits the design intent expressed in the fitness function.
that EvoArch can only achieve quantitative targets. The overall
For our experiments, the fitness function given by Eq. (1) is
selection criteria based on the preference of functional mix and the
used.
give-and-take on APS versus cost on the resulting graphs has to
base on the client’s personal liking and the architect’s experience.
5.1. Initialization and EvoArch parameters selection
Hence, given the limited preliminary information in the initial
stage of design, EvoArch plays a role of providing quick alternative
In our experiments, an initial population of 100 graph adjacency
graphs for an architect to select for further development.
matrices is generated at random. The nodes encoded in each of
All adjacency matrices with corresponding APS that represent
them are given the same labels as that in Fig. 12. The crossover
the optimal architectural space topologies obtained in the
and mutations operators selected include all of UGC, Number-of-
experiments are presented in the Appendices A and B. When more
Nodes mutation, Number-of- Edge mutation, Node-Label mutation
than one node has the same function, a small letter will be added
and Swap-Node mutation. They have equal probabilities to be
to the node number label to differentiate it from the others. For
selected and applied (Table 2).
example, two different ‘circulation areas’ will be represented by
‘9a’ and ‘9b’ etc. The fitness plots throughout the evolution for
5.2. Running EvoArch different experiments are also included.
The results will be first analyzed in the APS cost efficiency
Using the parameters as described above, we run EvoArch aspect. That is, the adjacency preference of the client achieved
on the population of 100 graph adjacency matrices generated with respect to cost expressed in APS per unit cost. High cost
at random. The maximum number of generations to be run for efficiency does not necessarily mean a quality design with a good
each experiment is 5000. To compare performance on the same balance of all factors because the solution may bias toward high
basis, all experiments start with the same randomly generated average APS elements (Fig. 12) that render further development of
initial populations. Experiments are carried out each with a budget a quality architectural plan difficult. An overall appraisal that takes
interval of 5 starting from the lowest range of 30 to 34, up to the into consideration the client’s adjacency preference, the functional
highest range of 55 to 59 (see Table 3). Each experiment is run mix and cost is required for the selection of solution for further
10 times and the one with the highest APS is adopted. The reason development. The experimental results on the properties of the
for adopting a budget interval of 5 is to allow a variation of one graphs generated with respect to the number of nodes, number
to two rooms (cost per room range between 2 to 5 in Table 1a) of generations to convergence, APS and costs are summarized in
between each interval. All the other constraints on budget, valence Table 4. All results satisfy the constraints on valence and room
of nodes, minimum functions required, and range of room ratios ratios required in Tables 1a and 1b.
as described in Section 4.2 should be satisfied in order to be The relation between costs and APS is given in Fig. 17(a) if the
acceptable as a valid solution. In such circumstances, the fitness points are plotted on a graph. The relationship between them is
value according to (1) should be equal to the total APS of the close to linear with least square regression value close to 1 at
resulting graph. 0.9577. This reflects the fact that the more the client pays, the more
satisfaction on the adjacency preference he can derive from the
5.3. Discussion of results and limitations design. The marginal increase in APS per unit increase in cost is
approximately 0.42.
Optimal architectural space topologies are obtained in the The relation between the number of generations it takes to
form of adjacency matrices for each experiment. It should be convergence and the number of nodes is plotted on a graph as
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 663
Table 5
Number of functional spaces in the resulting graph in each experiment.
Exp. Cost Number of functional spaces in a resulting graph Remarks on functional mix
1. SA 2. MA 3. BED 4. LR 5. D&K 6. B 7. CP 8. P 9. CIR 10. EXT
1 32 1 1 1 1 1 1 1 1 1 1 Balanced
2 36 1 1 1 1 1 1 1 1 2 1 Balanced
3 40 1 2 1 1 1 1 1 1 2 1 Balanced
4 45 1 2 2 2 1 1 1 1 1 1 Bias toward bedrooms
5 52 1 1 1 1 1 1 1 1 6 1 Biased toward circulation areas
6 57 1 1 2 2 1 1 1 1 5 1 Biased toward bedrooms and circulation areas
3000
R2 = 0.8049
2500
2000
1500
1000
500
0
8 10 12 14 16 18 20
Number of Nodes
7.car
9b.
9a.
6.bath
4.living 9b.
5. dining
8.Patio
9a. 9b.
1.study
3.bed 2b.master
ensuite 9b.
2a.master
ensuite
Fig. 19. Optimal architectural space topology generated by experiment 3 and corresponding floor plans.
between functional spaces. The same principle can be applied approach to design incorporating other factors such as materials
to evolve 3-dimensional space that current Building Information selection and life cycle costing, more variables are required to
Modeling (BIM) is attempting to do with limited availability be handled and application of parallel computing to EvoArch to
of predefined geometries. In combination with a more holistic achieve such a purpose is another new topic to be explored.
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 665
60 70
50 60
50
Maximum Fitness
Maximum Fitness
40
40
30
30
20
20
10
10
0 0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Generation Generation
Experiment 1 (Budget 30 to 34) Experiment 2 (Budget 35 to 39)
Converging generation = 1312 Converging generation = 661
Maximum fitness = 55 Maximum fitness =64
80 80
70 70
60 60
Maximum Fitness
Maximum Fitness
50 50
40 40
30 30
20 20
10 10
0 0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Generation Generation
Experiment 3 (Budget 40 to 44) Experiment 4 (Budget 45 to 49)
Converging generation = 1536 Converging generation = 1036
Maximum fitness = 74 Maximum fitness = 74
120 120
100 100
Maximum Fitness
Maximum Fitness
80 80
60 60
40 40
20 20
0 0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Generation Generation
Experiment 5 (Budget 50 to 54) Experiment 6 (Budget 55 to 59)
Converging generation = 1294 Converging generation = 2101
Maximum fitness = 108 Maximum fitness = 113
Appendix B. Fitness graphs on architectural topology evolution [8] Lindenmayer A. Mathematical models for cellular interaction in development
I, II. Journal of Theoretical Biology 1968;18:280–315.
[9] Yin S, Cagan J. An extended pattern search algorithm for three-dimensional
See Fig. B.1. component layout. Transactions of the ASME 2000;122:102–8.
[10] Shaikh A, Shin Kang. Destination-driven routing for low cost multicast. IEEE
Journal on Selected Areas in Communications 2007;15(3):373–81.
References [11] Tang M, Yao X. A memetic algorithm for VLSI floorplanning. IEEE Transactions
on Systems, Man, and Cybernetics, Part B 2007;37(1):62–9.
[1] Goldberg DE. Genetic algorithms in search, optimization, and machine [12] Levin PH. Use of graphs to decide the optimum layout of buildings. Architect
learning. Boston (MA): Addison-Wesley; 1989. 1964;14:809–15.
[2] Michalewicz Z. Genetic algorithms + data structures = evolutionary [13] Rücker C, Rücker G, Meringer M. Exploring the limits of graph invariant-
programs. Berlin: Springer; 1996. and spectrum-based discrimination (sub)structures. Journal of Chemical
[3] Koza JR. Genetic programming II: Automatic discovery of reusable programs. Information and Computer Sciences 2002;42:640–50.
Cambridge (MA): The MIT Press; 1994. [14] De Jong KA, Spears W. An analysis of the interacting roles of population size
[4] Dodd N. Optimization of neural network structures using genetic techniques and crossover in genetic algorithms. In: Proceedings of the first int’l conf. on
Internal Report RIPREP/1000/63/89, Royal Signals and Radar Establishment, parallel problem solving from nature. 1990.
Malvern, UK, 1989. [15] De Jong KA, Spears W. On the virtues of parameterized uniform crossover.
[5] Nolfi S, Parisi D. Genotypes for neural networks. In: Arbib MA, editor. In: Proceedings of the 4th international conference on genetic algorithms. San
The handbook of brain theory and neural networks. Cambridge (MA): MIT Mateo: Morgan Kaufmann Publishers; 1991. p. 230–6.
Press/Bradford Books; 1995. [16] Xu HZ, Wei XY, Xu MS. Schema analysis of multi-point crossover in genetic
[6] Gruau F. Cellular encoding as a graph grammar. 1993. In: IEE colloquium on algorithm. In: Proceedings of the 3rd world congress on intelligent control and
grammatical inference: Theory, applications and alternatives. pp. 17/1–1710. automation. 2000.
[7] Kitano H. Designing neural network using genetic algorithm with graph [17] Gero JS, Kazakov VA. Evolving design genes in space layout planning problems.
generation system. Complex Systems 1990;4:461–76. Artificial Intelligence in Engineering 1998;12(3):163–76.
S.S.Y. Wong, K.C.C. Chan / Computer-Aided Design 41 (2009) 649–667 667
[18] Gero JS, Kazakov V, Schnier T. Genetic engineering and design problems. [28] Luke S, Spector L. Evolving graphs and networks with edge encoding:
In: Dasgupta D, Michalewicz Z, editors. Evolutionary algorithms in engineering Preliminary report. In: Late-breaking papers of the genetic programming
applications. Berlin: Springer Verlag; 1997. p. 47–68. (GP96) conference, 1996.
[19] Schnier T, Gero JS. Learning genetic representations as alternative to hand- [29] Luke S. Two fast tree-creation algorithms for genetic programming. IEEE
coded shape grammars. In: Gero JS, Sudweeks F, editors. Artificial intelligence Transactions on Evolutionary Computation 2000;4(3):274–83.
in design. Dordrecht: Kluwer; 1996. p. 39–57. [30] Koza JR, Rice JP. Genetic generation of both the weights and architecture for
[20] Rosenman M. The generation of form using an evolutionary approach. a neural network. IJCNN-91-Seattle International Joint Conference on Neural
In: Dasgupta D, editor. Evolutionary algorithms in engineering applications. Networks 1991;2:397–404.
Springer-Verlag; 1997. p. 69–86. [31] Nikolaev NY, Iba H. Learning polynomial feedforward neural networks by
[21] Michalek JJ, Choudhary R, Papalambros PY. Architectural layout design genetic programming and backpropagation. IEEE Transactions on Neural
optimization. Engineering Optimization 2002;34(5):461–84. Networks 2003;14(2):337–50.
[22] Medjdoub B, Yannou B. Separating topology and geometry in space planning. [32] Xiao L, Liu Y, Ni LM. Improving unstructured peer-to-peer systems by
Computer-Aided Design 2000;32:39–61. adaptive connection establishment. IEEE Transactions on Computers 2005;
[23] Ruch J. Interactive space layout: A graph theoretical approach. In: Proceedings 54(9).
of the 15th conference on design automation, Issue 19-21, pp. 152–157, June [33] Carrano EG, Fonseca CM, Takahashi RHC, Pimenta LCA, Neto OM. A preliminary
1978. comparison of tree encoding schemes for evolutionary algorithms. IEEE
[24] Liao CC, Lu HI, Yen HC. Compact floor-planning via spanning trees. Journal of International Conference on Systems, Man and Cybernetics 2007;7(10):
Algorithms 2003;48:441–51. 1969–74.
[25] Koza JR. Genetic programming: A paradigm for genetically breeding popula- [34] Miller G, Todd P, Hegde S. Designing neural networks using genetic algorithms.
tions of computer programs to solve problems, Stanford University Computer In: Proceedings of the third conference on genetic algorithms and their
Science Department technical report STAN-CS-90-1314, June 1990. applications. San Mateo (CA): Morgan Kaufmann; 1989.
[26] Yao X. Evolving artificial neural networks. Proceedings of the IEEE 1999;87(9): [35] Fisher G, Wing O. Computer recognition and extraction of planar graph from
1423–47. the incidence matrix. IEEE Transactions on Circuit Theory 1966;13(2):154–63.
[27] Gruau F.. Cellular encoding as a graph grammar. IEE colloquium on grammat- [36] Nagamochi H, Suzuki T, Ishii T. A simple recognition of maximal planar graphs.
ical inference: Theory, applications and alternatives, 1993. pp. 17/1–1710. Information Processing Letters 2004;89(5):223–6.