Particle Swarm Optimization: Exam Concepts

Transcript-first notes for PSO: static swarm, velocity components, informants, per-dimension stochasticity, BPP adaptation, HW#5 observations, and plot behavior.

Core exam idea: PSO is a static swarm with no selection. Particles do not die or reproduce. Each particle keeps moving by updating its velocity from four voices: inertia, personal best, informants' best, and global best.

1. The One-Line Model

PSO = static particles + velocity update from memory and communication

A particle has a position x, velocity v, personal best x*, informants' best x+, and global best x!. The swarm is decentralized: there is no central leader telling particles where to go; the direction emerges from these memory and communication terms.

v = alpha*v + b*(x* - x) + c*(x+ - x) + d*(x! - x) x = x + epsilon*v
TermMeaningDoctor-style interpretation
alpha*vRetain old velocity."I was already flying this way; continue a bit."
b*(x* - x)Personal best pull."I remember a good place I visited."
c*(x+ - x)Informants' best pull."My local neighbors found a good place."
d*(x! - x)Global best pull."The whole swarm's best place is there."
epsilonStep size."How far I move after the direction is computed."

2. PSO vs GA vs DE

FeatureGADEPSO
Population change Generational replacement. Trial child can replace its parent. Static particles persist.
Selection Yes. Yes, parent vs trial. No selection.
Main movement Crossover + mutation. a + alpha*(b-c). Velocity update.
Memory Mostly population/genetic material. Current population positions. Personal best, informants' best, global best.
Death Weak individuals may disappear. Parent dies only if trial beats it. No death; bad particles can keep moving.
Exam sentence: PSO replaces selection with movement. A bad particle is not removed; it is redirected by its own memory and by information from other particles. Fitness improvement acts like a reward because it updates personal/global memory; worse positions are not stored as bests.

3. The Four Components

Inertia: alpha

Diversification

Large inertia lets each particle continue its own direction. That keeps particles spread and preserves exploration.

Personal best: beta

Individual exploitation

Large personal pull makes each particle return to its own best visited place. Too much makes the swarm split into separate hill climbers.

Informants: gamma

Local communication

Informants are the particle's local social group. This balances personal experience and global best.

Global best: delta

Whole-swarm exploitation

Large global pull sends everyone toward one best-known point. This can become one large hill climber and cause premature convergence.

Step size: epsilon

Move length

After velocity is computed, epsilon controls how far the particle actually moves. Too large overshoots; zero means no movement.

4. Parameter Extremes

Likely question shape: "If everyone follows the global best, what happens? What if each particle trusts only its own history? What if particles keep their old direction?"
Exam wordingBehaviorExplore / Exploit
High old-velocity / inertia influence (alpha large) Particles keep their own previous directions. Swarm stays spread longer. Exploration / diversification
No old-velocity / inertia influence (alpha = 0) No independent drift. Movement depends only on personal best, informants, and global best. More guided, less independent drift
High personal-best influence (beta large) Each particle keeps returning toward its own best history. Separate hill climbers
High informants / neighborhood influence (gamma large) Particle follows its local social group strongly. Local exploitation, some diversity
High global-best influence (delta large) All particles race toward global best. One big hill climber / bully
No global-best influence (delta = 0) No global-best pull. Swarm relies on personal and informant memory. More exploration
No movement step (epsilon = 0) Velocity may be computed, but position does not change. Frozen
Huge movement step (epsilon huge) Particles overshoot good regions and oscillate. Too jumpy
No influence from old velocity, personal best, informants, or global best No meaningful direction is produced. Degenerate / stuck
Exam wording map: old direction means inertia; my own memory means personal best; my local group means informants; everyone follows the same best means global best; no actual position change means step size is zero. Answer using exploration/exploitation first, then mention the symbol only if needed.

5. Informants and Topology

The doctor emphasized three memory levels: myself, my neighborhood, and the whole swarm.

Best typeQuestion it answersRisk if dominant
Personal best x* Where was I personally successful? Particles ignore others and become separate local searches.
Informants' best x+ Where did my current local group do well? Local group may over-focus, but less severe than global collapse.
Global best x! Where is the best-known point in the whole swarm? Everyone follows the same point and prematurely converges.

Global topology

Every particle treats the whole swarm as its neighborhood. This makes x+ similar to x! and increases exploitation.

Local topology

Each particle has a smaller informant set, often chosen randomly each iteration. This preserves multiple search directions.

Exam answer: Informants are a middle layer. They give communication without forcing every particle to chase the global best immediately.

6. Why a Particle Leaves Its Own Best

A common confusion is: if a particle already found its personal best, why is it not still there? Because PSO keeps moving. Other forces can pull the particle away from its own best.

StateMeaning
Current position x Where the particle is now.
Personal best x* The best place this particle has ever visited, which may be behind it.
Velocity v The direction/speed inherited from previous movement and current pulls.

The particle may have drifted away because informants or global best pulled it elsewhere. Later, the personal-best term pulls it back toward what it personally knows was good.

Why not everyone chase global best? Because the global best might be only a local optimum. If every particle goes there immediately, exploration dies. Personal best and informants keep alternative directions alive long enough to possibly find something better.

7. Per-Dimension Stochasticity

Subtle but important: The transcript spends time on whether random weights are drawn inside or outside the dimension loop. This is a likely conceptual detail because it changes exploration.

Random weight outside the loop

One value is used for all dimensions.

b = 0.3 once all dimensions use 0.3*(x* - x)

The particle moves along the same direction, only shorter or longer. Less exploration.

Random weight inside the loop

Each dimension gets a different random value.

dim 1: b = 0.2 dim 2: b = 0.7 dim 3: b = 0.1

The vector can tilt sideways. This creates more exploration because the particle is not restricted to the same line.

DistributionEffectExam wording
Uniform over a range Higher variance inside the allowed interval. More exploration.
Gaussian with low variance Most values stay near the center. More exploitation / guided movement.
Wider variance More possible directions and step strengths. More exploration.
Do not just say "random": Say stochastic, and mention the distribution. Uniform, Gaussian, and per-dimension sampling do not produce the same search behavior.
Raw-Otter detail: With a fixed step, a particle can bounce back and forth around a good region. Stochastic step components can sometimes create smaller or tilted moves, which helps the swarm approach the region instead of only oscillating.

8. PSO on Bin Packing

Important correction: In BPP, each item is not a swarm. Each particle is a complete candidate solution. The dimensions may correspond to items if you use random keys, but the particle itself represents the whole packing.

Random-Key PSO

Position is a real vector with one key per item. Sort keys to get item order, then decode using First Fit.

particle position = [key_A, key_B, key_C, ...] sort keys -> item order -> First Fit -> packing

Velocity is a real vector that changes the keys.

Discrete PSO

Position is a packing or permutation. Velocity can be interpreted as a list of swaps, item moves, or feature-copy operations.

velocity = pending moves/swaps pull toward pbest = copy some features from my best packing pull toward informant/global = copy some features from their packing

This is more native to BPP but requires repair and careful operator design.

PSO conceptBPP meaning
ParticleOne full candidate packing, or one random-key vector that decodes to a full packing.
PositionCurrent packing or current key vector.
VelocityKey changes, or a list of swaps/moves.
Personal bestThe best packing this particle has ever produced.
Informants' bestThe best packing among this particle's local group.
Global bestThe best packing found by the whole swarm.

9. Plot Behavior

Plot signatureLikely PSO diagnosisReason
Current best is noisy while BSF improves occasionally. Swarm still explores. Particles can move away from good locations, but memory keeps BSF.
CB quickly approaches BSF and then both plateau. Global best pull too strong. The swarm collapses into one large hill climber.
CB moves but BSF stays flat. Particles are moving, but not finding better positions. Could be too much inertia/drift, too little useful pull, or random-key encoding noise.
Many particles stop improving separately. Personal best pull too strong. Swarm fragments into separate hill climbers.
BSF goes in the wrong direction. Plot or implementation error. Best-so-far must be monotonic in the correct direction.

10. Population Size vs Iterations

For PSO, swarm size controls coverage and information sources; iterations let communication and velocity updates actually work.

SetupBehaviorRisk
Large swarm, few iterations Many starting particles and broad coverage. Not enough time for personal, informant, and global memory to reshape motion.
Small swarm, many iterations More time to refine current directions. Few informants and low diversity; swarm may collapse quickly.
Balanced Enough particles to cover different regions and enough iterations for communication. Usually safer for exam reasoning.
Exam sentence: PSO needs both spread and time. A large swarm gives exploration, but iterations are needed for the velocity terms to turn discoveries into movement.

11. HW#5 Story

The important HW#5 story is not exact parameter values. It is the behavior created by random-key encoding and the exploration/exploitation balance.

HW-style answer: In HW#5, PSO did not clearly dominate DE because both methods were constrained by the same random-key representation. PSO's velocity update moved keys, but the packing quality depended heavily on how sorting and First Fit decoded those keys.

12. DE vs PSO

AspectDEPSO
Core move d = a + alpha*(b-c), then crossover. Velocity update from inertia, personal best, informants, global best.
Population dynamics Parent can be replaced by trial. Same particles persist.
Selection Yes, child vs parent. No.
Memory Population positions only. Personal, local, and global best memory.
Automatic step adaptation Yes, through population spread in b-c. Less direct; controlled by velocity, epsilon, and stochastic coefficients.
BPP weakness Subtraction is not native. Velocity is not native.
HW#5 outcome Close results because random-key encoding dominated both.

13. Common Exam Prompts

Q: What is PSO in one sentence?

PSO keeps a static swarm of particles and moves each particle using velocity influenced by its own memory, informants, and global best.

Q: Does PSO use selection?

No. Particles do not die or reproduce. They persist and move.

Q: What happens if global best weight is huge?

All particles chase the same point. The swarm becomes one large hill climber and may prematurely converge.

Q: What happens if inertia is high?

Particles continue their own directions, increasing diversification and exploration.

Q: What happens if personal best weight is high?

Each particle focuses on its own previous best and the swarm can split into separate hill climbers.

Q: Why are informants useful?

They provide local communication, balancing personal search and global-best collapse.

Q: Why draw random weights per dimension?

Per-dimension randomness lets the velocity vector tilt and explore. One random value for all dimensions only scales the same direction.

Q: How do we apply PSO to BPP?

Use random keys and decode to a packing, or redefine velocity as swaps/moves/features between complete packings.

Q: What was the HW#5 observation?

PSO and DE were close because both were limited by random-key encoding.

Q: Is each item a particle in BPP?

No. Each particle is a complete candidate solution. With random keys, each item is only one dimension inside that particle.

Q: Why can a particle leave its personal best?

Because it is also pulled by inertia, informants, and global best. It remembers its personal best, but it does not stay there permanently.

Q: Where is the reward in PSO?

The reward is the fitness improvement. Better positions update personal/global memory; worse positions are not stored as bests.

14. Final One-Paragraph Answer

Particle Swarm Optimization is a static population method: particles do not die or reproduce, they move. Each particle has a position, a velocity, a personal best, an informants' best, and a global best. Its velocity is updated by combining inertia, personal memory, local social memory, and global swarm memory. High inertia promotes exploration; high personal pull creates separate hill climbers; high global pull turns the swarm into one big hill climber and risks premature convergence. For bin packing, a particle is a complete packing or random-key vector, not a single item. In HW#5, PSO and DE behaved similarly because both were limited by random-key encoding.

← Hub