liveBook · Manning

Particle swarm optimization

Particle swarm optimization is a population-based optimization method in which candidate solutions adjust their positions using individual and collective search information.

How 3 Manning books explain it

Optimization Algorithms: AI techniques for design, planning, and control problems

Particle swarm optimization is a population-based optimization algorithm in which candidate particles adjust their movement using individual and collective experience.

How it is used
Uses cooperative, population-based search to tackle continuous and discrete optimization problems.
How deep it goes
Explains particle movement, best-known positions, tuning factors, and an implemented routing example without developing a formal proof.
Examples
Works through a Python implementation for a 20-city traveling salesman problem and names function optimization and neural network training as applications.
What you can do after
Applies it via PySwarms to evaluate and print a traveling salesman route.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains particle swarm optimization →

Evolutionary Deep Learning: Genetic algorithms and neural networks

Particle swarm optimization is a population-based optimization algorithm in which candidate solutions move through a search space according to collective-swarm behavior.

How it is used
Applies population search to function parameters and automatic hyperparameter optimization.
How deep it goes
Works through DEAP particle generation, fitness evaluation, best tracking, velocity updates, and a complete swarm loop.
Examples
Uses cannon-shot velocity and angle to hit a target distance, plus loss-driven neural-network hyperparameter search.
What you can do after
Apply it via DEAP to optimize function inputs or map particle vectors to model hyperparameters.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains particle swarm optimization →

Grokking AI Algorithms, Second Edition

Particle swarm optimization is a swarm-intelligence optimization technique in which particles adjust candidate solutions using collective and individual search information.

How it is used
Finds good solutions in large or high-dimensional search spaces without testing every possible value.
How deep it goes
Walks through initialization, fitness evaluation, repeated particle movement, stopping, and returning the best position; treats movement details as a further step.
Examples
Uses a drone’s aluminum–plastic mix and a mountain-peak analogy, then identifies electrode configuration and neural-network weights as applications.
What you can do after
Build it from scratch: initialize particles, evaluate fitness, repeat position updates, and return the best solution found.

Read how Grokking AI Algorithms, Second Edition explains particle swarm optimization →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.