Particle swarm optimization (PSO) comes from the pioneering work of Kennedy and Eberhart [1, 2]. PSO algorithms mimic the social behavior patterns of organisms that live and interact within large groups, such as swarms of bees. This optimization technique is used to find the minimum of the following 2D test function (the Rosenbrock banana function):
. For the global minimum of
, perfect agreement is found using either the Mathematica
built-in command NMinimize
(the blue dot at
) or PSO (the red dots). You can vary the number of iterations as well as the swarm size. However, notice the complementary effect of these parameters. Here, the problem is two-dimensional, but extension to multidimensional problems using the program is straightforward.