← Back to CoursesEvolutionary Programming

Neuroanatomy Explorer

Drag to rotate · scroll to zoom · click regions to explore

View
Loading 3D model…

Click a region
to explore it

Memory Deck

Flip each card and rate whether you knew it. Your score is saved.

Term
Definition

Deck complete — score saved.

Match the Pairs

Match each term to its definition. Finish the board to earn your score.

All matched — score saved.

Concept Constellation

Every key idea in this course, mapped as an explorable 3D constellation. Drag to rotate, scroll to zoom, click a node.

Click a node to read its definition.

Swarm Intelligence I: Particle Swarm Optimization

Manual: General · Subject: Evolutionary Programming

Learn how particles coordinate through social and cognitive behavior to solve optimization problems.

Particle Swarm Optimization

PSO Concept

Particle swarm optimization is a swarm intelligence method where each particle moves through the search space using its own experience and information shared by the swarm. It is especially useful for continuous optimization.

PSO State Variables

Position x\mathbf{x}
Current candidate solution
Velocity v\mathbf{v}
Direction and speed of movement
Personal best p\mathbf{p}
Best position found by the particle
Global best g\mathbf{g}
Best position found by the swarm

Update Equations

A common PSO update is v←wv+c1r1(p−x)+c2r2(g−x)\mathbf{v} \leftarrow w\mathbf{v} + c_1 r_1(\mathbf{p}-\mathbf{x}) + c_2 r_2(\mathbf{g}-\mathbf{x}) and then x←x+v\mathbf{x} \leftarrow \mathbf{x} + \mathbf{v}, where ww is inertia, c1c_1 and c2c_2 are learning factors, and r1,r2r_1, r_2 are random numbers in [0,1][0,1].

PSO Pseudocode

  1. 1

    Step 1: Initialize particle positions and velocities.

  2. 2

    Step 2: Evaluate particle fitness.

  3. 3

    Step 3: Update each particle's personal best.

  4. 4

    Step 4: Update the swarm's global or neighborhood best.

  5. 5

    Step 5: Update velocity using inertia, cognitive, and social terms.

  6. 6

    Step 6: Update positions and repeat.

PSO Tuning Roles

Inertia weight $w$

  • Encourages momentum
  • Higher values support exploration
  • Lower values support exploitation

Cognitive term

  • Pulls particles toward personal best
  • Encourages individual learning

What does the personal best in PSO store?

What do the cognitive and social terms influence in PSO?

PSO is most often applied to which kind of problem?

⚠️

Parameter Sensitivity

PSO can converge too quickly or oscillate if inertia and learning factors are poorly tuned.

Neighborhood Variants

Some PSO variants replace the single global best with neighborhood bests, which can preserve diversity and reduce the chance of premature convergence.