Abstract
In architectural and structural design, computational methods have transformed the conceptual phase, allowing the exploration of diverse and efficient solutions. This paper introduces a new framework that integrates shape grammar, genetic algorithms, and clustering techniques to optimize structural designs in the early stages of architectural workflows. Unlike traditional optimization methods that aim for a single optimal solution, this approach generates multiple rational design options, balancing structural performance, aesthetics, and project constraints. Shape grammar effectively manages complex topologies with intuitive inputs, enabling designers to create varied structural forms while understanding the underlying rules and processes. Algorithmically, shape grammar offers significant design variety while maintaining designer control and insight into each configuration’s production. This research focuses on developing a tool for designing 2D trusses and frame systems, with the aim of creating a functional prototype and verifying its performance through a case study. The method uses shape grammar for initial topologies, clustering algorithms to group similar designs, and genetic algorithms to refine and optimize each cluster. This ensures efficient and diverse designs, providing a strong foundation for future developments. The framework’s effectiveness is demonstrated in a case study of a simplified large-scale convention hall, where these computational techniques generate innovative structural layouts. The results show the framework’s ability to produce diverse designs meeting architectural and structural needs, offering advantages over traditional parametric design. This research contributes to architectural and structural design by providing a powerful tool for early design stages, where multiple options are crucial. The framework enhances the creative potential and aligns with the requirements of structural engineering, such as safety and performance. By promoting efficiency, diversity, and adaptability, this approach can transform the way architects and engineers tackle complex design challenges, leading to more innovative building practices.
Introduction
In today’s structural, civil, and architectural engineering practices, sustainability has become a cornerstone of modern design. Although much attention is devoted to reducing CO2 emissions and performing life cycle assessments (LCA), sustainability also fundamentally involves optimizing material usage, improving energy efficiency, and ensuring design adaptability. The increasing adoption of computational tools during the conceptual phase is reshaping how architects and engineers explore and refine design solutions, enabling the generation of diverse and efficient outcomes. Recent frameworks emphasize the integration of multidisciplinary optimization strategies to manage complex design variables and improve performance outcomes. 1
Traditional optimization methods typically prioritize identifying a single optimal solution, limiting creative exploration and flexibility in the early stages of design. Addressing this challenge requires a framework capable of generating multiple viable solutions while balancing structural performance, aesthetic goals, and practical constraints. This framework integrates shape grammar, genetic algorithms, and clustering techniques to facilitate the exploration of diversified structural design solutions. The prototype effectively demonstrates the core concept and provides a foundation for future research and development.
Recent advances in digital design tools, primarily driven by proprietary software, have led to solutions often inaccessible to smaller firms and academic institutions. However, the emergence of open-source platforms like Dynamo and Grasshopper has democratized access to computational design, enabling the development of customizable optimization tools tailored to architectural and structural applications. Examples can be found in Haakonsen et al. 2 and Mork and Luczkowski. 3 Optimization is particularly critical during the conceptual design phase, where early decisions have long-term impacts. Unlike traditional methods that focus narrowly on singular outcomes, exploring a range of rational design solutions supports more informed decision-making and fosters creativity. Studies highlight the benefits of interactive, performance-driven design tools that balance automated optimization with designer intuition. 4
Shape grammar, introduced by Stiny and Gips in the 1970s, 5 offers a systematic and rule-based approach for generating complex forms and structural configurations. Although not inherently an optimization method, shape grammar effectively produces diverse design solutions through intuitive rule applications. Its key advantage lies in enabling designers to manage and explore complex topologies with minimal input while maintaining a clear understanding of the design process. However, refining the extensive design space produced by shape grammar requires integration with optimization techniques to ensure structurally sound and efficient solutions. Previous research has demonstrated the potential of topology optimization in generating innovative architectural forms, reinforcing the suitability of shape grammar for early design exploration. 6
To optimize these generative solutions, genetic algorithms are integrated into the framework due to their capacity to handle complex, nonlinear datasets generated by shape grammar. Inspired by natural selection, genetic algorithms evolve a population of solutions through iterative processes of selection, crossover, and mutation, progressively improving design performance over generations. Their adaptability allows robust convergence within irregular design spaces, making them effective in refining the diverse design possibilities created by shape grammar. This integration balances creative exploration with performance-driven refinement, ensuring systematic and effective optimization. The combination of heuristic optimization methods and evolutionary algorithms has proven effective in navigating the complexities of architectural and structural design. 7
To further support the exploration and manage the complexity of the generated solutions, clustering techniques are used to organize and classify designs. Clustering groups similar designs based on shared topological and geometric characteristics, preserving meaningful variations throughout the optimization process. This approach prevents premature convergence and promotes the continuous exploration of different design options. By combining clustering with genetic algorithms, the framework maintains diversity while guiding the optimization process toward structurally efficient and innovative solutions, a crucial balance in the conceptual design phase.
This research presents a working prototype focused on 2D truss and frame systems as a proof-of-concept for the proposed framework. While currently limited to 2D applications, the framework is adaptable and scalable, with the potential to extend to more complex structures such as 3D trusses and shell systems. By situating this research within an open development environment, the study encourages collaboration and further contributions from the architectural and engineering communities. This paper details the framework’s underlying assumptions, methodology, and initial implementation, acknowledging its evolving nature and potential for future refinement.
By proposing this framework, the study contributes to the ongoing discourse on integrating generative design methods with optimization strategies. It offers a pathway toward adaptable, diverse, and efficient design solutions in architectural and structural engineering contexts. This approach also aligns with the growing need for sustainable and innovative practices in the construction industry.
To guide this exploration, the study is structured around the following research questions: • How can the integration of shape grammar, genetic algorithms, and clustering techniques facilitate the rationalization of diverse structural design outcomes in early-stage architectural workflows? • How can computational methods support the generation of diverse and efficient structural designs to aid decision-making in architectural design?
Background
Literature review
Structural optimization in architectural design has seen significant advances in recent years, driven by the integration of computational tools, material science, and sustainability considerations. In a modern context, where optimization involves a combination of finite element programs and an optimization engine, its origins trace back to the 1960s. Schmit 8 from the space industry was one of the pioneers in this field. Vanderplaats 9 summarized the history and development of structural optimization for the first 30 years since then. Bendsøe et al. 10 categorized structural optimization methods into three levels: sizing, shape and topology.
Sizing optimization has been commoditized to the extent that it is implemented in major structural analysis programs, such as Etabs 11 or Midas. 12 It helps structural engineers reduce the quantities of structural materials while maintaining structural performances such as maximum displacements or stress levels. It is a very powerful tool in the later stages of design where the structural layout has been determined and constrained to the extent that there is no more room to adjust the position of each structural member, yet it is wished to reduce the material use or simply cost of structural material. On the other hand, it may be less relevant in the early stages of design when architects and engineers look for various design options or structural systems and its layout.
When it comes to shape optimization, recent development of parametric design tools, such as Rhino 13 and Grasshopper, 14 in combination with a finite element program, contributed significantly to accessibility to this approach. Preisinger developed a structural analysis program, Karamba3D 15 as a plugin for Grasshopper, and numerous built examples have been created using it, where the building structure is first parametrically modeled in Grasshopper and optimized using Karamba3D and the optimization engine, such as Galapagos. 16 This approach helps architects and engineers exploring many variants from a single pre-determined concept, fine-tuning the shape to exploit the potential of the same type. It is also an advantage that Rhino is widely used among architects and engineers, thus it is easy to communicate for both of them with data on the same platform. However, there is also a limitation in the parametric design approach. As Mueller pointed out, 17 the parametric design space is good to create variations, but not easy to explore the entire possible space. It is a significant disadvantage when it comes to the early stages of design, where the architect is still exploring possible design options.
Topology optimization is a field that various engineering fields, such as aerospace, automotive, and civil engineering, have been researching for many decades. The Solid Isotropic Material with Penalization (SIMP) Method was invented by Bendsøe 18 in the 1980s. It treats the design space as a continuum of material, by introducing the concept of material density ranging from zero to one. Each finite element has a specific material density during the iterative SIMP process, allowing for a smooth transition between solid material and the void for each region, facilitating the optimization process. Penalization is introduced to the stiffness of the material. It discourages the intermediate density values, effectively pushing the solution towards a binary distribution. The objective is typically to minimize the compliance (or maximizing stiffness) of the structure, and the optimization process involves iterative updating of the material distribution to minimize the objective function. Another established approach is the Bidirectional Evolutionary Structural Optimization (BESO) method. 19 It was developed on the Evolutionary Structural Optimization (ESO) method that was invented by Xie and Steven 20 in the early 1990s. Although ESO constantly removes an inefficient region of the material, BESO allows for both the removal and addition of material, allowing for more flexible and efficient exploration of the design space. It employs stiffness or compliance as objective functions and sensitivity analysis determines which elements of the structure contribute the most or the least to the structure. Elements with low sensitivity are candidates for removal, whereas those with high sensitivity may be reinforced. Topology optimization is not only advantageous in reducing material consumption of the structure, but also the resulting shapes are also interesting in the sense that it can propose a form that humans may not be able to think of. Although built examples include a masterpiece such as the Qatar Convention Center, 21 the number of projects appears to be limited even early 2020s. 22 Research has been done on why there are few architectural projects that claim to employ topology optimizations. Beghini 23 reported that there is no user-friendly software and the topology optimization workflow is mainly focused on engineering, while it requires significant expertise and is not straightforward for architects who are more familiar with design-oriented tools. The methodology relies heavily on structural engineering principles, finite element analysis, and numerical optimization techniques. The lack of architectural training in these areas makes it difficult for architects to directly engage with or modify optimization results. Dombernowsky 24 highlighted that optimization software generates forms based on structural efficiency, but these may not be in line with architectural aesthetics. Genetic algorithms (GAs), first proposed by John Holland in the 1960s and later popularized through his 1975 book Adaptation in Natural and Artificial Systems , were inspired by the process of natural selection. 25 Designed to solve optimization problems, GAs have since become widely adopted across engineering disciplines, including architectural and structural design. GAs simulate evolutionary processes—selection, crossover, and mutation—to evolve design solutions over generations, enabling exploration of vast design spaces and convergence toward optimal or near-optimal configurations. In architectural design, Caldas 26 introduced GENEARCH, a generative design system that integrates a GA with energy simulation tools to explore energy-efficient architectural solutions. GENEARCH demonstrates the capacity of GAs to balance aesthetic intentions with environmental performance, using Pareto optimization to manage trade-offs between conflicting objectives such as lighting and thermal efficiency. Similarly, Kiavarz et al. 27 applied a GA in combination with Building Information Modeling (BIM) to develop an explainable and prescriptive framework for energy optimization. Their work emphasizes the integration of data-rich environments with algorithmic reasoning to support performance-driven design. In structural engineering, GAs have proven effective in topology and member size optimization problems. AlHamaydeh et al. 28 proposed a Genetic algorithm with Domain-Trimming (GADT) for optimizing offshore wind turbine support structures, addressing complex constraints and nonlinear load conditions. Their results underscore the robustness of GAs in structural design tasks where traditional optimization methods struggle. Xu and Liu 29 further extended this approach by combining GAs with particle swarm intelligence in a multi-objective evolutionary framework for optimizing internal building layouts. Their system demonstrated improved efficiency, adaptability, and solution quality for spatial configuration problems. Across these studies, GAs are consistently highlighted for their versatility, capacity for handling multi-objective scenarios, and compatibility with simulation-based evaluations—making them particularly suitable for early-stage design optimization in architecture and structural engineering.
Diversifying optimization
In the current landscape of architectural and structural design, optimization techniques are predominantly applied during the engineering stage of projects. This stage is characterized by well-defined parameters, constraints, and performance goals, making it conducive to traditional optimization methods. However, in the early conceptual design phase, optimization is often neglected due to the inherent uncertainty and numerous undefined variables. 30 This gap limits opportunities for creativity and innovation, restricting architects and engineers from exploring a wider range of design possibilities. Addressing this limitation requires a change in the way optimization is perceived and utilized, particularly by introducing frameworks that encourage design diversity and adaptability. 31
Topology optimization, traditionally driven by structural performance metrics such as material efficiency and load-bearing capacity, has immense potential to transform early-stage design exploration. When combined with metrics beyond structural performance, such as topology and shape descriptors—optimization can generate fundamentally different design outcomes that challenge conventional forms. This expanded approach allows the discovery of novel structural solutions that may not emerge through intuition alone. For architects and engineers, this means gaining access to a broader and more diverse set of design options that balance structural integrity with aesthetic and functional goals. 32
Another current in topology optimization is to employ a grammar-based approach, such as shape grammar.
Since their introduction by Stiny and Gips in 1971, 5 shape grammars have been widely applied across different historical and stylistic domains, as well as in computational design theory. Stiny’s contributions to the field are foundational. In The Palladian Grammar, 33 he demonstrated how a rule-based system could model the architectural language of Andrea Palladio’s villas. The study established the capacity of shape grammars to replicate classical design idioms through a limited set of formal transformations. Similarly, in his study of Ice-Ray patterns, 34 he applied grammar rules to generate traditional Chinese lattice designs, revealing the underlying logic in a non-Western architectural tradition. These works underscore shape grammar’s versatility in capturing both spatial and ornamental structure. Another major application came with the Prairie House Grammar by Koning and Eizenberg, 35 which explored Frank Lloyd Wright’s residential architecture. Their grammar captures the hierarchical spatial organization and stylistic consistency of Wright’s early 20th-century designs. This application marked a turning point by showing that grammars could be used to analyze and reproduce more modern and complex architectural vocabularies.
Beyond descriptive models, shape grammars have evolved into tools for customization and user-driven design. Duarte’s work represents a significant advance in this area. In his grammar for Siza’s Malagueira housing, 36 he proposed a discursive grammar—a system that incorporates user preferences and constraints to generate mass-customized housing solutions. This approach bridges the gap between formal architectural languages and practical needs for adaptability and scalability in urban contexts. Economou has also contributed to expanding the scope of shape grammars, particularly in education and historical analysis. He highlighted the use of shape grammars in architectural education. 37 He demonstrated how grammars could be incorporated into design studios to foster creativity and critical thinking, providing students with a formal framework for architectural composition. This work emphasized the pedagogical benefits of shape grammars, positioning them as more than just design tools but as integral components of design theory. Building on this, Grasl and Economou’s study 38 introduced a parametric approach to shape grammars using graph-based systems. This innovative method allowed for the incorporation of topological and geometric constraints, expanding the grammar’s capabilities for complex, parametric design generation. Together, Economou’s contributions have significantly advanced the practical application of shape grammars, merging educational theory with cutting-edge computational design practices.
Collectively, these works demonstrate that shape grammars are not only theoretical tools but practical frameworks for both historical analysis and generative design. They have proven adaptable to diverse cultural and stylistic contexts, while also evolving to accommodate interactive, parametric, and performance-based design systems. More to the topic, Haakonsen 39 summarized the development of the shape grammar over the last 50 years. When it comes to the structural applications of shape grammar or its inspired methods, Geyer 40 used a grammar-based approach using dynamic models to improve design optimization by integrating qualitative architectural qualities with quantitative analyzes such as costs and energy use. Through an example of a hall-like building, he demonstrates how system modifications are guided by rules that reflect both engineering and aesthetic considerations. His approach is very practical and seems to be highly useful when considering design directions in real building projects. However, the resulting proposals are limited to trusses, single members, and their combinations. It appears that the optimization is not aimed at discovering entirely new design concepts. Recent advances have sought to expand the scope of grammar-based approaches in structural optimization. Zimmermann et al. 41 developed a 3D spatial grammar interpreter that integrates finite element analysis (FEA) and stochastic optimization to create a generative design framework. By automating the link between rule-based design generation and structural evaluation, their approach improves on traditional shape grammars, allowing constraints related to fabrication methods and material performance to be incorporated within the optimization process. Mueller 17 extended this concept through structural grammars, which integrate performance-based design principles to explore trans-typological structural configurations. Her research introduced interactive evolutionary frameworks that allow users to navigate design spaces more flexibly while incorporating both qualitative architectural constraints and quantitative structural analysis. This makes grammar-based approaches more adaptable in conceptual structural design, where diverse configurations must be efficiently evaluated. Furthermore, Shea and Cagan 42 proposed the shape annealing method, which merges shape grammars with simulated annealing optimization techniques. Their approach demonstrated how structural optimization could evolve topologically diverse solutions, surpassing the limitations of conventional shape grammars, which are often restricted to predefined truss structures. However, while this method expands the design space, it still relies on predefined rule sets, limiting its ability to generate completely novel structural solutions. Despite these advancements, a key challenge remains in bridging grammar-based design with real-time structural analysis and optimization techniques in architectural design.
A significant challenge in achieving design diversity within optimization frameworks lies in how algorithms interpret and generate variation. While humans can easily discern different structural types and appreciate nuances in design, algorithms have historically struggled to differentiate between solutions in meaningful ways. Traditional optimization processes tend to converge on solutions that are structurally efficient but often similar in form, thereby limiting the exploration of distinct design alternatives. This limitation is largely due to the reliance on singular performance metrics that do not account for the complexity and variability inherent in architectural design. 43
The integration of clustering methods into the optimization process presents a promising solution to this problem. Clustering algorithms, such as K-means and hierarchical clustering, enable the grouping of similar designs based on topological and geometric characteristics. By embedding clustering techniques within the optimization workflow, it becomes possible to actively manage the diversity of generated solutions. This approach allows designers to influence how many distinct structural systems are produced and how varied these systems are from each other. 44 Consequently, the optimization process is no longer solely driven by performance efficiency but also by intentional diversification of design outcomes.
Controlling clustering within optimization introduces a new layer of decision-making that empowers designers. Instead of passively accepting the solutions generated by traditional algorithms, architects and engineers can set parameters that define the level of diversity in the resulting designs. This democratization of design enables practitioners to tailor the optimization process to their specific needs, balancing the pursuit of structural performance with the desire for innovative and varied solutions. 30 Such control over the degree of diversity fosters a more inclusive and participatory design process, where the exploration of multiple alternatives becomes an integral part of early-stage decision-making.
Moreover, this approach aligns with the broader movement toward democratizing computational design tools. Historically, advanced optimization methods have been accessible primarily to specialized engineers or large firms with dedicated computational resources. By integrating clustering and diversity control into user-friendly design environments, such as Grasshopper and Dynamo, these powerful tools become more accessible to a wider range of practitioners. 31 This democratization not only enhances creative freedom, but also promotes interdisciplinary collaboration between architects, engineers, and designers.
From a global perspective, the ability to generate and evaluate diverse design solutions has significant implications for sustainable and context-sensitive design. In regions with varying environmental, cultural, and economic conditions, a one-size-fits-all design approach is inadequate. Diversified optimization allows for the tailoring of structural systems to local needs, encouraging solutions that are efficient and contextually appropriate. 32 This adaptability is particularly valuable for addressing global challenges such as resource scarcity, climate resilience, and cultural preservation.
Recent advances in computational power and algorithmic development have further expanded the possibilities for diversified optimization. Multi-objective optimization techniques, when combined with clustering, enable the simultaneous consideration of multiple performance criteria, such as structural efficiency, material sustainability, and aesthetic variation. 30 This holistic approach ensures that diverse design solutions are not only structurally viable but also aligned with broader project goals and environmental considerations.
Case studies in architectural design have begun to demonstrate the effectiveness of integrated optimization and clustering frameworks. Projects that utilize these methods have produced innovative structural forms that balance efficiency with creativity. For example, in the design of complex roof trusses or facade systems, clustering has allowed the exploration of multiple design families, each offering unique advantages in terms of performance and aesthetics. 43 These examples highlight the transformative potential of integrating diversity-driven optimization into the early stages of design.
Methodology
The proposed methodology integrates rule-based generative modeling with performance evaluation and evolutionary optimization to support diversified structural design in early-stage architecture. The workflow begins with the generation of multiple spatial configurations using shape grammar rules. These configurations are evaluated for basic geometric and topological properties before being grouped into representative clusters using unsupervised learning. A genetic algorithm is then applied to each representative case to explore structurally optimized variants. The final output is a diverse set of structurally sound design options that balance conceptual richness with performance criteria. Figure 4 illustrates the overall process.
Shape grammar implementation
In this study, four fundamental rules are implemented to make a two-dimensional truss. Figure 1 summarizes the rules. Rule 1 splits a line at a given parameter ranging from 0.0 to 1.0. Rule 2 creates a vertical line from the existent nodes with a given length. The parameter range is from 0.0 to 1.0 and its length is defined by an input in the grasshopper component for Rule 2. Rule 3 creates upper and lower chords. It creates envelopes for top and bottom chords, and then it extends a vertical line from the nodes created by the Rule 1 toward upper and lower chords. In case there is an intersection, it splits the chords. Finally, Rule 4 finds a place to insert a cross-bracing from among rectangular regions in the structural layout. Rules 1 to 4 take place in series. In order to automate the shape generation and optimization by the genetic algorithm, the order of applying rules and their parameters are described as a comma-separated value type text. An example of such a text, together with its associating shape, is shown in Figure 2. It consists of the same number of Boolean parameters and real parameters. Shape grammar nodes and elements have an index, and the rule observes the nodes and elements from the youngest number of index of nodes and elements. If the boolean parameter for the node or element is zero, it will skip applying the rule for the current node/element. If it is one, it will apply the rule with the real parameter at its associated position. −1, −2, −3, −4, and −999 are in the CSV-encoded grammar string, the markers for entering a rule (−1 to −4) and for exiting a rule (−999). Shape grammar rules in this study. Example of rules applied.

Genetic algorithm integration
The genetic algorithm is performed outside of Grasshopper. Communication between the genetic algorithm and Grasshopper is done with the text data through the TCP/IP protocol. The number of the population, the number of the clusters, the number of generation need to be set at the beginning. The order of applying rules and their parameter values are determined randomly for the first generations’ individuals. For the first generation, a factor (initial boost) is set and applied that multiplies the number of individuals per generation to explore the design space more densely before evolving the individuals. The standard procedures in the genetic algorithm, such as selection, cross-over, and mutation, are applied (Figure 3). Transition phase from a previous generation to a new generation.
As the transition phase from an earlier generation to the next generation, candidate individuals are pooled from where the next generation’s individuals are selected. What is characteristic of the genetic algorithm in this study is that the chromosome contains both integer-type and real-value-type parameters. Therefore, cross-over contains two parallel procedures for both types. For the integer type, the two-point cross-over method is chosen to manipulate the parameters. The algorithm splits the integer part of the chromosome at the two chosen random places and swaps the chromosome between the two selected sets of individuals. When it comes to the real value part of the parameters, the BLX-alpha crossover algorithm is selected and implemented. 45 It is an algorithm used for the crossover of real-valued chromosomes. It generates offspring by creating new genes within a range defined by the parent genes. Specifically, for each gene, it calculates the minimum and maximum values between two parent genes and extends this range by a factor of alpha (α). The offspring genes are then randomly selected from this extended range, allowing exploration beyond the values of the parent gene. A smaller number of individuals by mutation are also added to avoid reaching a local-optima. Finally, the next generation’s individuals are picked up from the pool by using tournament selection where a subset of individuals is randomly chosen from the population, and they compete against each other based on their fitness values. The individual with the highest fitness in this subset is selected as the parent. This process is repeated until the desired number of parents is selected.
Clustering for design diversity
In order to maintain design diversity within the population, we implemented the K-Means clustering algorithm using the open-source library Scikit-Learn, 46 based on a carefully selected set of shape and topology metrics. Initially, a comprehensive evaluation of numerous metrics was undertaken to characterize the geometric (shape) and connective (topology) properties of each structural design. Ultimately, 10 metrics were selected to clearly and succinctly represent these properties, evenly divided into shape and topology metrics 5 (Figure 5).
The shape metrics include total structural length, defined as the cumulative length of all structural elements, structural height as the vertical extent of the design, aspect ratio indicating the ratio of width to height within the bounding box, outline area describing the enclosed space of the design’s convex hull, and maximum member length capturing the length of the longest structural element.
Topology metrics selected for clustering are the number of elements representing total structural members, number of nodes as points of connection, average node degree reflecting the mean connectivity per node, maximum node degree as the highest number of connections at a single node, and the number of cycles indicating independent closed loops within the structure.
All selected metrics are normalized prior to clustering to ensure comparability across scales. The normalized data are then combined into a two-dimensional array that serves as input for the K-Means clustering model. The K-Means algorithm partitions the data into a specified number of clusters, defined by a setting parameter, iteratively assigns each data point to the nearest cluster center, and then recalculates the cluster centers based on the assigned points. This process continues until the cluster centers stabilize or a maximum number of iterations is reached. Once the model is fitted, each individual is assigned a cluster label, which is used to group them for further processing in the genetic algorithm. In algorithm. In subsequent generations, the algorithm uses the fitted K-Means model to predict cluster assignments for new data, ensuring consistency in clustering across generations. This clustering helps in organizing the population into groups, which can be useful for applying different genetic operations or analyzing the population structure.
Grasshopper/Rhino implementation
The shape grammar rules, genetic algorithm, Geometry generation is done in Grasshopper. Shape grammar algorithm is developed in Grasshopper environment and external Python code is used to send and receive the text data that contain information on the combination of the rules as well as parameters associated to each rule. The entire workflow is shown in Figure 4. Comparison of different metrics for 120 randomly generated structures.
Case study results
Case study and analysis
A case study was conducted to showcase the approach introduced in the Methodology section. Here we use an example used in a convention center that is simplified for this study (Figure 5). The assumed function is a single-story large-scale convention hall. Figure 6 shows the transverse section of the model. It has three bays spanning 12.8, 44.8, and 12.8 m, respectively. The loading intensity was determined as 38.4 kN/m in the vertical direction. The support condition is also shown in Figure 6. Rules 1-4 introduced in the Methodology section were used. The constant values for this specific example are shown in Table 1. The content of each setting is shown in the Methodology section. Procedure of Shape grammar, genetic algorithm and clustering. Case study setup. Analysis settings.

Study case results
The analysis took approximately 10 hours with a standard workstation laptop (Windows 10 Education, Intel Core i7-13700H, 2400 Mhz CPU, 32GB Memory, NVIDIA RTX A500 GPU). Figure 7 shows the results through the fitness values over generations. On the left side is the plot of the best fitness values for all the clusters over generations. The general tendency among the clusters appears that the best fitness values have been improved as generations progress. On the right side of the same figure are the plots of each cluster about the best, mean, and worst fitness values for each generation. Although the best fitness values have improved constantly, the worst values have not improved significantly. Convergence of optimization results.
Figures 8 and 9 show the 10 best performing individuals for each cluster in the initial generation (generation 0) and the last generation (generation 29). It is observed that there are more similarities within the same generation and more diversities in the shape across the clusters. The best 10 results for each cluster for the first generation (generation 0). The best 10 results for each cluster for the last generation (generation 29).

Figure 10 shows the clustering results in the first and last generations. It is observed that the clustering algorithm drew the borders among the clusters successfully in the sense that there are no elements that belong to multiple clusters. The enlarged image in the central area of the clusters is shown in the lower half of the Figure 10. Clustering was performed by using the K-Means algorithm, which was explained in the Methodology section. Generations and clustering.
Discussion
The results of this study demonstrate that the proposed algorithm works effectively as a whole, as shown in Figure 9. The algorithm exhibits clear convergence, with clusters maintaining stability across generations and achieving diversified structural layouts up to the final generation. This confirms the method’s capability to balance exploration and exploitation in the design space, providing a robust foundation for future enhancements. The ability to sustain diversity across clusters while refining individual solutions underlines the viability of the proposed framework. Importantly, the clustering algorithm ensures that the designs remain structurally distinct while maintaining a logical progression toward optimized solutions. This integration of generative and analytical techniques within a unified workflow strengthens its applicability to early-stage structural and architectural design.
A key area for further refinement is the genetic optimization technique employed. While effective, the genetic algorithm used in this study is relatively basic, and its simplicity may lead to rapid convergence, particularly given the large initial population size. Although this approach facilitates a broad initial exploration of the design space, it may have restricted the potential for further optimization in later generations. In some cases, rapid convergence within clusters suggests that the algorithm may have favored exploitation over exploration too early in the process. More advanced implementations—such as adaptive mutation rates, elitism, or hybridization with alternative optimization methods—could enhance both convergence behavior and solution quality. Additionally, modifying selection strategies or increasing the number of generations could help clusters that stagnate early to develop more competitive solutions.
Another factor influencing the efficiency of the optimization process is computational demand, particularly due to the integration of integer-type and real-value parameters. The custom-developed genetic algorithm solver, while sufficient for the purposes of this study, lacks the sophistication of more advanced optimization frameworks. Exploring more efficient optimization methods, such as differential evolution or particle swarm optimization, could improve both speed and robustness, reducing the likelihood of getting trapped in local optima while maintaining computational efficiency.
The shape and topology metrics used in this study also warrant further discussion. While effective for clustering, their current formulation remains simplistic, potentially limiting differentiation between structurally distinct solutions. The topology metric, for instance, aggregates the number of elements connected to each node, but does not capture more complex spatial relationships. As seen in Figure 9 (bottom), some clustered designs exhibit high degrees of similarity, suggesting that the metrics could be refined to better reflect nuanced structural differences. Incorporating higher-dimensional representations, such as graph-based topology metrics or shape descriptors based on curvature and symmetry, could enhance the clustering process, ensuring that resulting groups are both distinct and meaningful.
Similarly, the shape metric, which relies on normalized perimeter lengths, provides only a partial representation of geometric characteristics. While sufficient for an initial implementation, this metric does not fully capture geometric complexity, spatial configuration, or material distribution. Expanding the metric framework to include load distribution, structural stiffness, or dynamic performance factors could enhance the quality of clustering and subsequent optimization. A more sophisticated metric system would allow for richer design exploration, ensuring that the framework is capable of addressing increasingly complex structural challenges.
Another critical aspect of the genetic optimization process that merits attention is the influence of chosen metrics on cluster performance and convergence toward specific geometric typologies. As illustrated by the clustering analysis, the selection of different shape and topology metrics significantly affects the optimization trajectory and final outcomes. Some metric combinations tend to converge rapidly towards particular structural forms, leading to clusters that consistently achieve high fitness values. In contrast, other metric combinations result in clusters where the genetic optimization struggles, showing stagnation or limited improvement over generations.
This variation highlights that the performance and effectiveness of genetic optimization can be substantially influenced by the metric definitions themselves. Certain metrics may inherently favor specific geometric configurations, while others may offer broader exploration potential but slower convergence. Consequently, if the goal is to further develop and refine the optimization framework, it is crucial to experiment with various metrics, potentially even developing entirely new types of descriptors. By doing so, we can better control convergence behavior, maintain design diversity, and potentially discover novel, high-performance structural solutions that would otherwise remain unexplored.
Another aspect of the genetic optimization process that warrants further attention is its influence on cluster performance. As illustrated in Figure 6, certain clusters demonstrated consistent fitness improvements, while others stagnated or underperformed. For example, clusters 0, 3, and 7 exhibited limited progress, while the highest-performing solutions in clusters 2 and 9 were less competitive than others. This uneven distribution suggests that 30 generations may have been insufficient for some clusters to reach their potential. Additionally, the genetic algorithm’s reliance on randomized mutation and selection may have contributed to this imbalance. Introducing fitness-sharing mechanisms, where solutions are penalized for excessive similarity, could encourage greater diversity and allow weaker clusters to evolve more effectively. Similarly, refining crossover and mutation operations to better accommodate mixed integer-real parameter spaces could further enhance efficiency and overall solution quality.
Beyond optimization, the clustering algorithm itself could benefit from comparative analysis with alternative methods. While K-Means clustering successfully grouped designs based on topology and shape metrics, exploring hierarchical or density-based clustering approaches may offer deeper insights into the structure of the design space. For example, hierarchical clustering could identify nested relationships between design variations, while density-based methods could reveal clusters of varying sizes and densities that K-Means may overlook. Incorporating clustering validation metrics, such as silhouette scores or Davies-Bouldin indices, would also provide quantitative benchmarks for evaluating and refining the clustering approach.
From an implementation perspective, this framework offers significant potential for early-stage architectural and structural design. One of its key advantages is its ability to generate diverse solutions, rather than converging toward a single optimal outcome. In conceptual design, this diversity is crucial, allowing architects and engineers to explore a range of feasible options before making decisions. By maintaining multiple design paths, the framework ensures that the exploratory nature of early-stage design is preserved, rather than prematurely narrowing down to a singular direction.
For architects, structural feasibility must be balanced with spatial and contextual considerations, meaning that small variations in structural efficiency may be less important than overall design intent. Conversely, for structural engineers, the ability to identify and compare subtle performance differences between structural configurations provides a valuable tool for decision-making. In this regard, the integration of generative techniques with analytical methods in the proposed framework can serve as a bridge between architectural creativity and structural engineering rigor, fostering collaboration and innovation in early-stage design workflows.
Conclusion and future work
This study represents a first prototype, introducing the methodology and addressing programming challenges involved in developing a framework for diversified structural optimization. The results highlight the potential of integrating shape grammar, genetic algorithms, and clustering techniques, providing a foundation for future development.
The initial focus of future work is the development of more sophisticated shape and topology metrics. The current metrics, while functional, are simplistic and insufficient for capturing the full diversity of design possibilities. Future iterations will incorporate higher-dimensional and more nuanced metrics to improve differentiation between clusters and foster richer design diversity. These advanced metrics will be essential for addressing complex design challenges and ensuring more meaningful clustering results.
The second direction of future research involves extending the framework to accommodate three-dimensional truss systems and shell structures. The ability to generate and optimize 3D geometries will significantly broaden the framework’s applicability, allowing it to address a wider range of architectural and structural challenges. This extension will enable exploration of more intricate and spatially diverse designs, reflecting real-world applications and expanding the scope of the framework’s utility.
The third area of development focuses on enhancing the shape grammar rules and experimenting with alternative clustering methods. Expanding the rule set will unlock new generative possibilities, enabling the framework to produce a broader variety of structural forms. Concurrently, exploring clustering techniques such as hierarchical clustering or density-based methods will provide deeper insights into the design space and ensure that the clustering process remains robust and adaptable to different contexts. These refinements will address current limitations and pave the way for a more flexible and comprehensive design tool.
While this study has established a strong foundation, the proposed framework is a prototype that will evolve significantly with further research. The aim is to transform it into a versatile tool that bridges computational efficiency and creative exploration. By pursuing these research directions, the framework will better support architects and engineers in generating, analyzing, and optimizing diverse design solutions during the early stages of architectural and structural workflows. Through continued development, this system has the potential to redefine the approach to conceptual design, fostering innovation and collaboration in the Architecture, Engineering, and Construction (AEC) sector.
Copyright statement
Please be aware that the use of this LATEX2ɛclass file is governed by the following conditions.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
