Source: https://en.wikipedia.org/wiki/Leg_mechanism
This document describes the implementation of a genetic algorithm (GA) designed to optimize the leg mechanism of Theo Jansen's Strandbeest. The algorithm aims to find optimal proportions for the 11-bar linkage system that creates the characteristic walking motion of these kinetic sculptures.
The Strandbeest leg mechanism consists of 11 connected bars that form a walking linkage. The optimization challenge is to determine the optimal lengths of these bars to achieve:
- A nearly horizontal motion during the ground contact phase
- Appropriate foot clearance during the return phase
- Mechanical feasibility and stability
Each solution is represented as a list of 11 floating-point numbers corresponding to the lengths of the bars in the mechanism. The chromosome structure is:
lengths = [crank_length, bar_2_length, ..., bar_11_length]
The fitness function evaluates three key aspects:
-
Ground Flatness (50% weight)
- Measures deviation from horizontal during ground contact phase
- Lower deviation scores higher
- Critical for smooth walking motion
-
Step Height (30% weight)
- Evaluates foot clearance during return phase
- Penalizes both insufficient and excessive height
- Optimal range: 15-25% of mechanism height
-
Mechanical Complexity (20% weight)
- Penalizes impractical bar length ratios
- Considers manufacturing feasibility
- Promotes robust mechanical design
- Tournament selection with size 5
- Provides good balance between exploration and exploitation
- Maintains genetic diversity while favoring better solutions
- Single-point crossover
- Crossover point randomly selected
- Preserves successful sub-structures of solutions
- Gaussian mutation with 10% mutation rate
- Maximum mutation magnitude: ±10% of current value
- Helps escape local optima and maintains diversity
- Population size: 100 individuals
- Elitism: Top 10% preserved
- Termination: 1000 generations or convergence
- Convergence defined as < 1% improvement over 50 generations
The algorithm tracks several metrics during optimization:
- Best fitness per generation
- Population diversity
- Convergence rate
- Constraint violations
Solutions are validated through:
- Kinematic simulation
- Physical feasibility checks
- Stability analysis
- All length measurements are in millimeters
- Minimum bar length: 10mm
- Maximum bar length: 100mm
- Angular resolution: 50 points per cycle
- Population size: 100
- Generations: 1000
- Mutation rate: 0.1
- Tournament size: 5
- Elite count: 10
The optimization typically produces results with:
- Ground contact deviation < 5mm
- Step height between 15-25% of mechanism height
- All bar lengths within manufacturable ranges
Potential enhancements include:
- Multi-objective optimization
- Dynamic mutation rates
- Advanced crossover methods
- Real-time visualization
- Parallel evaluation
- Jansen, Theo. "The Great Pretender." 010 Publishers, 2007
- Holland, John H. "Adaptation in Natural and Artificial Systems"
- Goldberg, David E. "Genetic Algorithms in Search, Optimization and Machine Learning"