Λογότυπο Algorithmic Patterns

Algorithmic Patterns

Κοινότητα
Abhinavbwj
algorithmic-patterns

L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing algorithms, and nature-inspired computation for AEC design

Add to TypingMind

Επισκόπηση

ΕκδότηςAbhinavbwj
ΑποθετήριοClaude-skills-for-Computational-Designers
Όνομα δεξιότηταςalgorithmic-patterns
Αστέρια
223
Διακλαδώσεις
40
Συνοδευτικά αρχεία
2
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Συνοδευτικά αρχεία: 2

    Αρχεία script, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό Abhinavbwj. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Algorithmic Patterns στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/Abhinavbwj/Claude-skills-for-Computational-Designers/tree/main/skills/algorithmic-patterns
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Abhinavbwj/Claude-skills-for-Computational-Designers.git /tmp/Claude-skills-for-Computational-Designers
mkdir -p .claude/skills
cp -r /tmp/Claude-skills-for-Computational-Designers/skills/algorithmic-patterns .claude/skills/algorithmic-patterns
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Algorithmic Patterns σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Algorithmic Patterns μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Algorithmic Patterns δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

Algorithmic Patterns for AEC Design

1. Nature-Inspired Computation in AEC

Why Biological Algorithms Matter for Design

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 and Self-Organization

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:

  • Nonlinearity -- small changes in rules produce disproportionate changes in output
  • Feedback loops -- positive feedback amplifies patterns, negative feedback stabilizes them
  • Decentralization -- no single agent has global knowledge of the system
  • Adaptation -- the system responds to environmental changes in real time
  • Robustness -- local failures do not cascade to system-level collapse

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.

AspectTop-Down (Traditional)Bottom-Up (Algorithmic)
ControlCentralizedDistributed
SpecificationGlobal geometryLocal rules
AdaptabilityLow (manual redesign)High (rules adapt)
ScalabilityDifficultInherent
NoveltyLimited by imaginationGenerates unexpected solutions

Applications Across AEC

DomainAlgorithm ClassApplication
Urban growthCellular automata, ABMLand use simulation, sprawl prediction
Structural branchingL-systems, space colonizationTree columns, dendritic roofs
Facade patterningReaction-diffusion, CAPerforated screens, shading panels
Space planningAgent-based, packingRoom layout, furniture arrangement
Material distributionTopology optimization, DLAGraded density structures
Circulation designAnt colony, shortest pathCorridor networks, staircase placement
Acoustic designReaction-diffusion, fractalDiffuser panel geometry
Thermal designSwarm optimizationVentilation opening placement

2. L-Systems (Lindenmayer Systems)

Formal Grammar

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.

DOL-Systems (Deterministic, Context-Free)

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

Stochastic L-Systems

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.

Context-Sensitive L-Systems

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.

Parametric L-Systems

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.

Turtle Interpretation

SymbolActionSymbolAction
FMove forward, draw line[Push state (branch start)
fMove forward, no draw]Pop state (branch end)
+/-Turn left/right by delta&/^Pitch down/up (3D)
\//Roll left/right (3D)!Decrement diameter

Extended Grammars

Binary Tree (2D):

Axiom: 0
Rules: 1 -> 11, 0 -> 1[+0]-0
Angle: 45 degrees, Iterations: 7

Produces a symmetric binary tree with 128 terminal branches.

Stochastic Shrub:

Axiom: F
Rules: F -> FF+[+F-F-F]-[-F+F+F] (p=0.5), F -> FF-[-F+F]+[+F-F] (p=0.5)
Angle: 22.5 degrees, Iterations: 4

3D Tree (with pitch and roll):

A -> F(1)[&(30)B][/(120)&(30)B][/(240)&(30)B]
B -> F(0.8)[+(25)$C][--(25)$C]B
C -> F(0.5)[+(20)$C][--(20)$C]

City Block Generator:

X -> F[-X][+X]FX | F -> FF
Angle: 90 degrees

Generates recursive block subdivision resembling organic street networks.

Column Capital (parametric, 3D):

A(h,r) -> F(h,r) [+(60)&(40) B(h*0.3,r*0.6)] [+(180)&(40) B(h*0.3,r*0.6)] [+(300)&(40) B(h*0.3,r*0.6)]
B(h,r) : h > 0.05 -> F(h,r) [+(45)&(30) B(h*0.5,r*0.7)] [-(45)&(30) B(h*0.5,r*0.7)]

AEC Applications

Branching Structures: Tree-columns in airports and stations (Stuttgart Airport, Sendai Mediatheque). A 5-rule L-system defines a column branching into 200+ terminal supports for a roof canopy.

Root-Like Foundations: Inverted L-system trees distributing loads through soil following optimized branching angles per Murray's law.

Dendritic Circulation: Corridor systems following L-system branching produce naturally navigable spaces with clear hierarchy.

Fractal Facades: Koch-curve-based facades provide increased surface area for shading while maintaining structural regularity.

Implementation

Python:

python
def l_system(axiom, rules, iterations):
    current = axiom
    for _ in range(iterations):
        current = "".join(rules.get(c, c) for c in current)
    return current

Grasshopper: String rewriting via text components, Anemone loop for iterations, turtle geometry components for line/curve generation, pipe/mesh for 3D visualization.


3. Cellular Automata (CA)

1D Elementary CA (Wolfram's 256 Rules)

A row of binary cells; next state depends on 3-cell neighborhood (8 configurations, 2^8 = 256 rules).

Rule 30 (chaotic): Aperiodic, seemingly random from a single cell. Found on Conus textile shell. Rule 90 (Sierpinski): XOR of neighbors. Perfect for facade patterning -- regularity with complexity. Rule 110 (Turing-complete): Proved by Cook (2004). Generates gliders and spaceships. The simplest known universal computer.

2D Cellular Automata

Game of Life (B3/S23): Dead cell with 3 neighbors is born; alive cell with 2-3 survives; all others die. Produces gliders, oscillators, guns, and self-replicating patterns.

Urban Growth (B3678/S2345678): Compact blob growth mimicking suburban sprawl. Adjusting to B45/S2345 produces polycentric growth.

Floor Plan Generator (B3/S1234): From random initial conditions, produces room-like enclosed spaces connected by narrow passages.

Neighborhoods

Von Neumann (4): Orthogonal patterns for rectilinear layouts. Moore (8): Organic, rounded patterns; standard for most 2D CA. Extended Moore (24, radius 2): Smoother boundaries for urban simulation. Hexagonal (6): Isotropic, no directional bias.

State Transitions and Multi-State CA

Binary (0/1): Simplest case -- cell is active or inactive.

Multi-state (0-N): Enables gradient effects and functional zoning:

  • State 0: empty / undeveloped
  • State 1: residential low-density
  • State 2: residential high-density
  • State 3: commercial
  • State 4: industrial
  • State 5: park / green space

Transition rules encode zoning logic: residential adjacent to 3+ commercial cells transitions to mixed-use. Green space cells never transition (protected). Totalistic CA depends only on the sum of neighbor states; outer-totalistic (like Game of Life) depends on center state AND neighbor sum but not arrangement.

3D Cellular Automata

Cubic lattice with 6 (von Neumann), 18 (edge-sharing), or 26 (Moore) neighbors.

Structural topology application:

States: solid (1), void (0)
Initial: solid block
Rules: Death: solid cell with < 4 solid Moore-26 neighbors -> void
       Birth: void cell with 8-12 solid neighbors -> solid

Produces porous, trabecular bone-like structures exportable as mesh for 3D printing or CNC fabrication.

AEC Applications

Urban Growth Simulation: SLEUTH/DUEM models simulate decades of land-use change for infrastructure planning. Structural Topology: Voxel rules remove low-stress material, approximating optimal distributions. Facade Patterns: CA grid mapped to facade; cell states determine panel type. Rule 90 produces Sierpinski; Game of Life produces organic patterns.

Python:

python
import numpy as np
from scipy.signal import convolve2d
def gol_step(grid):
    n = convolve2d(grid, np.array([[1,1,1],[1,0,1],[1,1,1]]), mode='same', boundary='wrap')
    return ((grid==0) & (n==3) | (grid==1) & ((n==2)|(n==3))).astype(int)

4. Agent-Based Modeling (ABM)

Agent Architecture

An agent has: position (x,y,z), velocity, state variables (energy, type, memory), behavioral rules executed each timestep, perception radius, and communication mode (direct messaging or stigmergy).

Environments: Grid-based (simple collision, coarse simulations), continuous (realistic pedestrian/vehicle movement, requires KDTree spatial indexing), network-based (agents move along graph edges for transit simulation).

Stigmergy

Indirect communication through environment modification. Agents deposit pheromone; it diffuses (Gaussian blur) and evaporates: P(t+1) = P(t) * (1 - rho). Others sense gradients and bias movement toward high concentrations. This is how ant colonies find shortest paths -- and how pedestrians create desire lines.

Flocking (Reynolds Boids)

Three rules applied each timestep:

  • Separation: force = sum((self.pos - neighbor.pos) / dist^2) within separation_radius
  • Alignment: force = avg(neighbor.velocity) - self.velocity within alignment_radius
  • Cohesion: force = centroid(neighbors) - self.pos within cohesion_radius

Combined: velocity += w1*sep + w2*ali + w3*coh; clamp(velocity, max_speed); pos += velocity*dt

High w1 = dispersed; high w2 = parallel streams; high w3 = tight swarms; balanced = natural flocking.

Ant Colony Optimization (ACO)

Path selection: P(i->j) = (tau_ij^alpha * eta_ij^beta) / sum(tau_ik^alpha * eta_ik^beta) where tau = pheromone, eta = 1/distance. Pheromone update: tau = (1-rho)*tau + Q/L_k for ants using edge.

AEC: Hospital corridor layout optimization. Nodes = rooms (ER, ICU, pharmacy). ACO minimizes total daily staff travel distance, producing a connectivity graph that informs spatial adjacency.

Termite Mound Algorithms

Stigmergic construction: deposit material where pheromone is high; deposits emit pheromone; positive feedback creates pillars, arches, chambers. Translates to robotic construction agents building without centralized control.

AEC Applications

Pedestrian Flow: Thousands of agents navigating stations/malls; identify bottlenecks, optimize door placement. Evacuation: Social force model (Helbing) validates egress timeframes with body-compression physics. Urban Morphogenesis: Developer/resident agents produce clustering, segregation, gentrification from individual decisions. Structural Placement: Agents walking force-flow lines deposit material at convergences, reflecting principal stress trajectories. Adaptive Facades: Each panel is an agent with sensors/actuators, coordinating shading with neighbors.

Tools: Quelea (Grasshopper real-time ABM), NetLogo (visual ABM platform), Mesa (Python framework integrating with compas/ladybug/honeybee).


5. Swarm Intelligence

Particle Swarm Optimization (PSO)

v_i = w*v_i + c1*r1*(p_i - x_i) + c2*r2*(g - x_i)
x_i = x_i + v_i

w (inertia): 0.9 -> 0.4 over iterations. c1, c2 (cognitive/social): typically 2.0. r1, r2: random [0,1]. AEC: Optimize building orientation, WWR, shading angles via EnergyPlus fitness function. Converges in 50-200 iterations.

ACO Pheromone Strategies

Ant System: All ants deposit; simple but slow. Ant Colony System: Best-ant-only with local decay; faster convergence. MAX-MIN: Bounded pheromone prevents premature convergence. AEC: Pipe routing through ceiling cavities minimizing length while avoiding structural members.

Bee Algorithm

Scout bees (random global search), employed bees (local exploitation), onlooker bees (quality-weighted roulette selection). Abandoned food sources trigger scouting. AEC: Multi-objective optimization balancing energy performance, structural efficiency, daylight, and cost.

Firefly Algorithm

Attractiveness: beta(r) = beta_0 * exp(-gamma*r^2). Brighter fireflies attract dimmer ones; distance-dependent attraction clusters solutions around promising regions. AEC: Structural member sizing -- each firefly is a set of beam/column cross-sections; brightness = low weight satisfying constraints.

CriterionPSOACOBeeFirefly
Continuous variablesExcellentPoorGoodGood
Discrete/combinatorialPoorExcellentGoodFair
Multi-objectiveFairFairGoodFair
Convergence speedFastModerateModerateSlow
Best AEC useParametric opt.Routing/layoutMulti-objectiveSizing opt.

6. Reaction-Diffusion

Turing Patterns

Two morphogens -- activator (slow diffusion, self-promoting) and inhibitor (fast diffusion, activator-suppressing) -- produce stable spatial patterns via short-range activation / long-range inhibition: spots, stripes, labyrinths, inverse spots. Found throughout biology: leopard spots, zebra stripes, seashell markings, fingerprints.

Gray-Scott Model

du/dt = Du*laplacian(u) - u*v^2 + f*(1-u)
dv/dt = Dv*laplacian(v) + u*v^2 - (f+k)*v

Typical: Du=0.16, Dv=0.08. The (f,k) parameter space maps to distinct regimes:

fkPattern Type
0.0100.045Spots (mitosis)
0.0220.051Spots and stripes
0.0300.057Stripes / labyrinthine
0.0400.063Worms / meandering
0.0500.065Holes (inverse spots)
0.0250.060Solitons (isolated spots)
0.0140.054Pulsating spots

Belousov-Zhabotinsky Patterns

Chemical reaction producing concentric target waves and spiral waves. Modeled by Oregonator equations. AEC: spiral/concentric patterns for acoustic diffusers breaking up sound reflections.

AEC Applications

Facade Patterning: Concentration field drives perforation density -- dense shading where solar gain is highest, open where views are prioritized. Structural Porosity: 3D reaction-diffusion determines solid/void in 3D-printed elements, lighter than solid while maintaining load paths. Ventilation: Opening density correlates with local wind pressure via tuned diffusion parameters. Acoustic Diffusers: Labyrinthine patterns achieve broadband diffusion without periodicity artifacts.

Implementation

Discretized Laplacian (5-point): L(u,i,j) = u[i+1,j] + u[i-1,j] + u[i,j+1] + u[i,j-1] - 4*u[i,j] 9-point stencil (more isotropic): weight corners 0.05, edges 0.2, center -1.0.

python
import numpy as np
def gray_scott_step(u, v, f, k, Du=0.16, Dv=0.08, dt=1.0):
    Lu = np.roll(u,1,0)+np.roll(u,-1,0)+np.roll(u,1,1)+np.roll(u,-1,1) - 4*u
    Lv = np.roll(v,1,0)+np.roll(v,-1,0)+np.roll(v,1,1)+np.roll(v,-1,1) - 4*v
    uvv = u*v*v
    return np.clip(u+dt*(Du*Lu-uvv+f*(1-u)),0,1), np.clip(v+dt*(Dv*Lv+uvv-(f+k)*v),0,1)

256x256 runs real-time on CPU; 512+ requires GPU (CUDA/WebGL compute shaders).


7. Growth and Packing Algorithms

Diffusion-Limited Aggregation (DLA)

Seed at origin; random walkers perform Brownian motion, sticking permanently on cluster contact. Fractal dimension ~1.71 (2D). Produces patterns resembling lightning, river deltas, mineral dendrites, frost. AEC: Branching structural topologies refined by FEA, green infrastructure networks (branching bioswales).

Space Colonization Algorithm

Attraction points fill target volume (canopy envelope). Tree nodes grow toward nearest points; points consumed within kill distance. Parameters: influence distance, kill distance, step length D, point distribution. AEC: Column-tree structures for large-span roofs with branch density proportional to local load. More natural branching than L-systems for canopy-filling geometries.

Circle/Sphere Packing

Apollonian gasket: Recursive tangent circle insertion (D~1.31). RSA: Random placement rejecting overlaps; jams at ~54.7% coverage. Force-directed: Repulsive forces between overlapping circles iterate to equilibrium, producing dense organic packings.

python
def force_pack(circles, iterations=1000):
    for _ in range(iterations):
        for i, ci in enumerate(circles):
            force = [0, 0]
            for j, cj in enumerate(circles):
                if i == j: continue
                d = dist(ci, cj); overlap = (ci.r + cj.r) - d
                if overlap > 0:
                    force[0] += overlap * (ci.x-cj.x)/d
                    force[1] += overlap * (ci.y-cj.y)/d
            ci.x += force[0]*0.1; ci.y += force[1]*0.1

AEC: Column placement (circles = tributary areas), window placement on curved facades, bubble diagrams for space planning.

Bin Packing and Graph Algorithms

2D Nesting: Irregular polygons on sheets; NP-hard; bottom-left + NFP heuristics. CNC steel cutting, facade panel nesting. 5-10% efficiency gain = significant cost savings.

Dijkstra: Shortest paths O((V+E)log V) for service routing. A:* Heuristic-guided single-target wayfinding. MST: Minimum-length corridor/utility networks (Kruskal/Prim).


8. Space-Filling and Fractal Geometry

Fractal Dimension

D = log(N)/log(S) for self-similar fractals. Box-counting method: cover pattern with epsilon-boxes, plot log(N) vs. log(1/epsilon); slope = D. Urban analysis: compact cities D2.0; sprawling cities D1.3-1.5. Track D over time to quantify sprawl. Skyline D~1.3-1.5 correlates with visual preference.

Iterated Function Systems (IFS)

Contractive affine transformations applied recursively. Barnsley fern: 4 transformations with probabilities (stem p=0.01, leaflets p=0.85, branches p=0.07 each). AEC: decorative screens, tile designs, mullion layouts with parameterized self-similarity.

Space-Filling Curves

Hilbert curve: Visits every point in 2^N x 2^N grid preserving locality. AEC: CNC toolpaths, sensor placement, robotic inspection routes. Peano curve: 3x3 recursive, denser coverage. Z-Order (Morton): Bit-interleaved 2D-to-1D for spatial database indexing.

Self-Similar Structures and Fractal Architecture

Historical examples of fractal architecture:

  • African vernacular settlements: Recursive compound layouts where village plans mirror individual compound plans (Ron Eglash's research)
  • Hindu temples: Shikhara towers with recursive self-similar profile
  • Gothic cathedrals: Pointed arch motif repeated at window, door, vault, and building scales
  • Menger sponge structures: Theoretical 3D fractal (D=log(20)/log(3)=2.727) with infinite surface area and zero volume, informing ultra-lightweight structural concepts

Fractal analysis of cities:

  • Street networks: organic medieval cities D1.8-1.9 vs. grid cities D2.0 vs. suburban dendritic D~1.3-1.5
  • Building footprints: D of built/unbuilt boundary correlates with walkability and urban vitality
  • Skyline silhouettes: D~1.3-1.5 correlates with visual preference in perception studies

9. Implementation Guide

Grasshopper Ecosystem

  • Anemone: Looping and recursion for iterative algorithms
  • Quelea: Real-time agent-based simulation with custom force fields
  • Heteroptera: CA and ABM utilities
  • 4D Noise: Perlin/simplex noise field generation
  • Kangaroo 2: Physics simulation (particle-spring, packing)
  • Dendro: Volume/SDF operations for 3D CA output
  • Cocoon: Isosurface extraction from scalar fields
  • C# scripting: 10-100x faster than GhPython for tight numerical loops

Python Libraries

numpy (array ops, convolution), scipy (KDTree, signal processing), matplotlib (visualization), networkx (graph algorithms), compas (AEC geometry framework), shapely (2D polygon ops), trimesh (3D mesh export).

Performance: Vectorize with numpy (100x over Python loops). scipy.spatial.KDTree for O(log n) agent neighbor queries. Preallocate arrays. GPU via cupy/CUDA for grids > 512x512.

Processing/p5.js for Visualization

Processing (Java): Excellent for real-time interactive visualization. Built-in 2D/3D rendering with straightforward pixel manipulation for CA and RD simulations.

p5.js (JavaScript): Browser-based Processing ideal for client presentations and web demos. WebGL mode enables GPU-accelerated rendering of large simulations. Particularly effective for interactive reaction-diffusion and flocking demonstrations.

Performance Considerations

Grid resolution vs. computation:

  • 256x256 RD: real-time on CPU. 1024x1024: requires GPU (CUDA, OpenCL, WebGL compute).
  • Doubling grid resolution quadruples memory and computation per step.

Agent scaling:

  • ABM: O(N^2) naive -> O(N log N) with spatial hashing/KDTree. Essential for >10,000 agents.

Memory management:

  • 3D CA at 256^3: 16M cells, 16 MB/step. 100 timesteps = 1.6 GB. Use sparse representations for low fill ratios.

Convergence:

  • L-systems: deterministic, terminate after specified generation count.
  • CA/RD: may need thousands of steps to reach steady state. Define convergence threshold (change between steps < epsilon).
  • ABM: may never reach equilibrium. Use maximum iteration limits or target metric values.

Algorithm Selection Guide

Design GoalAlgorithmRationale
Branching structureL-system / Space ColonizationControlled recursion with biological analogy
Organic facade patternGray-Scott reaction-diffusionTunable Turing patterns with density control
Regular-complex patternCA (Rule 90, Game of Life)Deterministic complexity from simple rules
Pedestrian flow analysisABM (boids + social force)Captures individual decision-making
Structural optimizationPSO / topology-optimized CAContinuous variable optimization
Routing optimizationAnt Colony OptimizationGraph-based combinatorial problems
Column/support placementCircle packing, force-directedDistributes supports with minimum spacing
Panel nesting (fabrication)2D bin packing, NFP nestingMinimizes material waste
Urban growth predictionCA (SLEUTH) or ABMCaptures spatial dynamics of development
Ventilation openingsReaction-diffusionOrganic density variation across surface
Multi-objective optimizationBee Algorithm, NSGA-IIBalanced Pareto front exploration
Fractal complexity analysisBox-counting dimensionQuantifies pattern complexity across scales

References

  • Prusinkiewicz, P. & Lindenmayer, A. (1990). The Algorithmic Beauty of Plants. Springer.
  • Wolfram, S. (2002). A New Kind of Science. Wolfram Media.
  • Reynolds, C. (1987). "Flocks, Herds, and Schools." SIGGRAPH.
  • Turing, A. (1952). "The Chemical Basis of Morphogenesis." Phil. Trans. Royal Society.
  • Pearson, J.E. (1993). "Complex Patterns in a Simple System." Science, 261(5118).
  • Runions, A. et al. (2007). "Modeling Trees with a Space Colonization Algorithm." Eurographics.
  • Shiffman, D. (2012). The Nature of Code. Self-published.
  • Terzidis, K. (2006). Algorithmic Architecture. Architectural Press.
  • Hensel, M., Menges, A. & Weinstock, M. (2010). Emergent Technologies and Design. Routledge.
  • Frazer, J. (1995). An Evolutionary Architecture. Architectural Association.
  • Coates, P. (2010). Programming.Architecture. Routledge.
  • Dorigo, M. & Stutzle, T. (2004). Ant Colony Optimization. MIT Press.
  • Kennedy, J. & Eberhart, R. (1995). "Particle Swarm Optimization." IEEE ICNN.
  • Witten, T.A. & Sander, L.M. (1981). "Diffusion-Limited Aggregation." PRL.
  • Eglash, R. (1999). African Fractals. Rutgers University Press.

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Algorithmic Patterns;

L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing algorithms, and nature-inspired computation for AEC design

Γιατί να χρησιμοποιήσετε τη δεξιότητα Algorithmic Patterns στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Algorithmic Patterns είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Algorithmic Patterns στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/Abhinavbwj/Claude-skills-for-Computational-Designers/tree/main/skills/algorithmic-patterns. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Algorithmic Patterns;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Algorithmic Patterns;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Algorithmic Patterns με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Algorithmic Patterns;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό Abhinavbwj με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇