Usually the particles will follow the current best particle and get the optimal solution through generationally searching many times in
the end. In every generation, the particle will follow two extreme values: one is the found optimal solution of particle itself so far, the other is a found optimal solution of whole population so far. Suppose a group consisted of M particles move in a certain speed in the D-dimensional space. At t, the position of particle i is t and the best position of particle moving is the individual extreme p .
The best position of the group moving is the global extreme p and the velocity is v .Therefore, through Eq. (5) and Eq. (6) the velocity and position of particle at t+1 is updated: