Particle Swarm Optimization (PSO)
Particle swarm optimization is a heuristic algorithm that is somewhat similar to a genetic algorithm in that the system is initialized with a population of random solutions. Unlike other algorithms, however, each candidate solution (called a particle) is also assigned a randomized velocity and then flown through the problem hyperspace. Each particle searches for better positions in the search space by changing its velocity according to rules originally inspired by behavioral models of bird flocking. In this algorithm, a swarm of particles can move in the solution domain and search for the optimal solution over a spread region.
b = 1
For each particle i = 1, …,n
Initializw particle(i) with positionXiand velocityVi= 0
//randomly initiate n particles in the solution domain
If f(particle(i)) < f(particle(b)) than b = i
// find particle(b) as the best known solution
Do until maximum iterations or particle(b) is good enough
For each particle i =...