bim-scripting
Revit API fundamentals, Dynamo for Revit, pyRevit framework, IFC schema and openBIM, model checking, automated documentation,…
L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing algorithms, and nature-inspired computation for AEC design
$ npx -y skills add Abhinavbwj/Claude-skills-for-Computational-Designers --skill algorithmic-patterns --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/algorithmic-patternsContext preview
The summary Claude sees to decide when to auto-load this skill.
L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing algorithms, and nature-inspired computation for AEC design
title: Algorithmic Patterns description: L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing algorithms, and nature-inspired computation for AEC design version: 1.0.0 tags: [algorithmic, L-systems, cellular-automata, agent-based, swarm, reaction-diffusion, fractal, biomimetic] auto_activate: true user_invocable: true invocation: /algorithmic-patterns
For three and a half billion years, evolution has solved the optimization problems architects and engineers face daily: distributing material efficiently, creating structures that resist loads with minimal mass, organizing circulation for millions of agents, regulating temperature without mechanical systems, and generating complex forms from simple rules. Nature-inspired computation translates these solutions into programmable algorithms that transform AEC practice.
The fundamental insight is that complexity does not require complex instructions. A fern frond with thousands of precisely placed leaflets emerges from a recursive rule fitting in a single line of code. A termite mound maintaining two-degree temperature stability is built by agents following three local rules. An oak tree optimally distributing material to resist wind has no central controller -- it grows according to Wolff's law, depositing material where stress is highest.
Emergence produces macro-scale patterns from micro-scale interactions without centralized control. In AEC, this challenges conventional top-down design, replacing it with local rules and boundary conditions that self-organize into coherent spatial configurations.
**Key properties of emergent systems:**
The computational thesis underlying all algorithmic patterns is that irreducible complexity can emerge from reducible rules. Stephen Wolfram demonstrated this with elementary cellular automata: Rule 110, defined by 8 binary transitions, is Turing-complete. A one-dimensional grid of cells with two states and nearest-neighbor rules can compute anything computable. For AEC: a branching structure with thousands of unique members can be specified by 3-4 L-system rules; a facade with apparent randomness generated by a 2-state CA; an optimal circulation network by 10,000 agents following 3 flocking rules.
| Aspect | Top-Down (Traditional) | Bottom-Up (Algorithmic) | |--------|----------------------|------------------------| | Control | Centralized | Distributed | | Specification | Global geometry | Local rules | | Adaptability | Low (manual redesign) | High (rules adapt) | | Scalability | Difficult | Inherent | | Novelty | Limited by imagination | Generates unexpected solutions |
| Domain | Algorithm Class | Application | |--------|----------------|-------------| | Urban growth | Cellular automata, ABM | Land use simulation, sprawl prediction | | Structural branching | L-systems, space colonization | Tree columns, dendritic roofs | | Facade patterning | Reaction-diffusion, CA | Perforated screens, shading panels | | Space planning | Agent-based, packing | Room layout, furniture arrangement | | Material distribution | Topology optimization, DLA | Graded density structures | | Circulation design | Ant colony, shortest path | Corridor networks, staircase placement | | Acoustic design | Reaction-diffusion, fractal | Diffuser panel geometry | | Thermal design | Swarm optimization | Ventilation opening placement |
---
An L-system is a parallel rewriting system G = (V, w, P) where V is the alphabet, w is the axiom (initial string), and P is the production rules. Unlike Chomsky grammars, all rules apply simultaneously, modeling biological growth where cells divide concurrently.
Each variable has exactly one production rule; rules are context-independent.
**Algae (Lindenmayer's original):** `Alphabet: {A,B} | Axiom: A | Rules: A->AB, B->A` String length follows the Fibonacci sequence: A, AB, ABA, ABAAB, ABAABABA.
**Koch Curve:** `Axiom: F | Rule: F->F+F-F-F+F | Angle: 90deg` Fractal dimension log(5)/log(3) = 1.465.
**Sierpinski Triangle:** `Axiom: F-G-G | Rules: F->F-G+F+G-F, G->GG | Angle: 120deg`
**Dragon Curve:** `Axiom: FX | Rules: X->X+YF+, Y->-FX-Y | Angle: 90deg`
**Hilbert Curve:** `Axiom: A | Rules: A->-BF+AFA+FB-, B->+AF-BFB-FA+ | Angle: 90deg`
Multiple rules per predecessor with probabilities summing to 1:
F -> F[+F]F[-F]F (p=0.33) F -> F[+F]F (p=0.33) F -> FF-[-F+F+F]+[+F-F-F] (p=0.34)
No two generated trees are identical, yet all share the same structural grammar. Critical for facades with varied but coherent panel geometries.
Rules depend on adjacent symbols: `A < B > C -> D` (B becomes D only between A and C). AEC application: signal propagation along structural members -- stress information triggers material deposition only where neighbors indicate high stress.
Symbols carry numerical parameters with guard conditions:
A(l,w) : l > 0.1 -> F(l) [+(30) A(l*0.7, w*0.8)] [-(30) A(l*0.7, w*0.8)] A(l,w) : l <= 0.1 -> (terminal leaf)
Parameters 0.7 and 0.8 control child-to-parent ratios, mapping directly to Murray's law for biological branching.
| Symbol | Action | Symbol | Action | |---
Revit API fundamentals, Dynamo for Revit, pyRevit framework, IFC schema and openBIM, model checking, automated documentation,…
Python calculators for geometry analysis, structural checking, solar calculations, panel optimization, mesh analysis, material…
Auto-activating foundation layer providing computational design paradigms, key pioneers, tools landscape, core concepts, and…
NURBS curves and surfaces, mesh geometry, boolean operations, subdivision surfaces, tessellation methods, surface analysis, and…
GIS integration, sensor data, occupancy analytics, space syntax analysis, urban data analytics, climate data processing, and API…
Rule-based design systems, constraint satisfaction, space planning algorithms, automated layout generation, drawing automation,…