Physics & Swarm Algorithms: SA & PSO
Topic - When optimizing high-dimensional, non-differentiable engineering systems, physics-based and swarm-based algorithms provide powerful alternatives to evolutionary methods. Simulated Annealing (SA) exploits thermodynamic annealing principles to escape local minima via probabilistic uphill transitions, while Particle Swarm Optimization (PSO) coordinates decentralized swarm intelligence through inertia, personal memory, and social collaboration.
1. Algorithmic Comparison: SA vs. PSO
| Dimension | Simulated Annealing (SA) | Particle Swarm Optimization (PSO) |
|---|---|---|
| Foundational Metaphor | Statistical thermodynamics and crystal annealing | Collective flocking behavior of birds and fish |
| Search Paradigm | Single-point trajectory (state-to-state walk) | Population-based (swarm of flying particles) |
| Governing Equation | Metropolis probability: | Velocity vector update: |
| Memory Tracking | Current best state () | Dual memory: individual () and swarm () |
| Exploration Control | System temperature (), cooled via schedule | Inertia weight (), dynamically decayed over time |
| Primary Domain | Combinatorial and discrete scheduling problems | Continuous multi-dimensional parameter spaces |
2. Simulated Annealing (SA)
Physical Metallurgy Analogy
Simulated Annealing simulates the thermodynamic process of heating a metal alloy above its melting point and cooling it gradually:
- Heating Stage: High thermal energy enhances particle mobility, freeing atoms from existing crystalline dislocations.
- Isothermal Phase: Particles collide and exchange thermal energy at constant temperature within an equilibrium boundary.
- Cooling Stage: Gradual thermal decay reduces atomic kinetic motion, freezing molecules into the lowest possible energy crystal lattice.
The Metropolis Acceptance Criterion
In a cost minimization problem, let .
- If (downhill move toward lower cost): Always Accept ().
- If (uphill move toward higher cost): Accept with Metropolis Probability ():
A uniform random number is drawn. If , the inferior solution is accepted.
Temperature Trajectory & Cooling Schedules
- High Temperature (): . The algorithm accepts virtually every uphill move, exploring the entire landscape and jumping freely out of deep local valleys.
- Low Temperature (): . Uphill moves are rejected; the algorithm behaves as a greedy local gradient descent, refining the solution.
- Geometric Cooling Schedule:
3. Particle Swarm Optimization (PSO)
Biological Metaphor & Swarm Mechanics
Introduced by James Kennedy and Russell Eberhart (1995), PSO simulates the collective foraging intelligence of bird flocks. A swarm of particles navigates a continuous -dimensional search space without centralized coordination.
Each particle tracks three coordinates:
- Current Position (): Coordinates in the problem domain.
- Personal Best (): The highest-fitness position achieved by particle across all iterations.
- Global Best (): The highest-fitness coordinate discovered across the entire swarm.
The Governing Velocity and Position Equations
Every particle updates its velocity vector and shifts position at time step according to:
- 1. Inertia Component (w)
- 2. Cognitive Component (c1)
- 3. Social Component (c2)
- Mathematical Role: preserves current flight momentum.
- Search Function: High inertia () drives broad exploration of unknown space. Low inertia () focuses on localized exploitation.
- Standard Practice: Linearly decrease over iterations from to .
- Mathematical Role: pulls the particle toward its own historical best.
- Search Function: Represents individual memory and self-confidence.
- injects stochastic diversification.
- Mathematical Role: pulls the particle toward the swarm's collective consensus.
- Search Function: Facilitates global communication and flock convergence.
- prevents premature clustering.
4. Exam Traps & Operational Nuances
- 1. Cooling Schedule Too Fast (Quenching)
- 2. PSO Velocity Explosion
- The Trap: Reducing temperature too rapidly (e.g., ).
- The Consequence: Known in metallurgy as quenching. Thermal motion vanishes before molecules escape crystalline dislocations, causing the algorithm to freeze permanently in a local minimum.
- The Correction: Maintain gradual cooling ().
- The Trap: Leaving acceleration parameters unbounded without velocity clamping ().
- The Consequence: When particles are far from , velocity terms compound exponentially, throwing particles outside the problem boundaries.
- The Correction: Always enforce velocity clamping: .
5. Summary & Cheatsheet
Simulated Annealing
- Metropolis: .
- Cooling: ().
- Property: High explores; low exploits.
Particle Swarm Optimization
- Velocity: .
- Position: .
- Balance: Inertia decays from to .
Key Takeaways
- Asymptotic Optimality: Simulated Annealing guarantees asymptotic convergence to the global optimum provided the temperature decreases logarithmically or sufficiently slowly.
- Swarm Consensus: Particle Swarm Optimization excels in continuous multi-dimensional search spaces by balancing individual memory () against swarm consensus ().
- Hyperparameter Discipline: Algorithm performance depends strictly on cooling parameters in SA and velocity clamping/inertia tuning in PSO.
Next Section: Review the Module 4 Exam Prep Checklist and Solved Practice Problems for examination review and practice exercises.