ABSTRACT

The particle swarm optimization (PSO) algorithm is the second oldest algorithm after the ant colony optimization (ACO) algorithm which started a new algorithms family called swarm intelligence algorithms. In this chapter, we will provide an introduction to the PSO algorithm. We will present the original global version of the PSO algorithm in the pseudo-code form and its source-code in Matlab, and in C++ programming language. Also, we will briefly discuss the local version of the PSO algorithm. We will present two types of neighborhood (geometrical and social) which are used in the local version of the PSO algorithm. We will end this chapter by presenting a step-by-step numerical example of the global version of the PSO algorithm, which could help aid the understanding of potential readers and enable them to carry out their own implementation of the global version of the PSO algorithm in any programming language. Finally, the conclusion section will be shown.