
The Never-Ending Story ◾ 269
• e constants c
1
and c
2
determine the inuence of personalbest and
globalbest, respectively. e larger c
2
, the larger the inuence of the
particle’s “private” data, whereas the larger c
1
, the larger the inu-
ence of the whole population on the behavior of each particle (the
social inuence). Initially, one could use c
1
= c
2
= 2.
• rand() is a random number between 0 and 1. Note that a dierent
random value is used for each dimension (to simplify notation this is
not reected in the formula above).
e calculation of the velocity in each dimension is done separately
and takes into account the corresponding