Passo X Y Xbest Ybest Φ1 Φ2 gBest-x gBest-y Distância ao alvo

Fórmula utilizada para cada passo:

Φ1 = Random (0,0 a 1,0) * C1

Φ2 = Random (0,0 a 1,0) * C2

----------------------------

vNova = (pBest - pCurrent) * Φ1 + (gBest - pCurrent) * Φ2

posiçãoNova = posiçãoAntiga + vNova

----------------------------

X-new =(Xbest - Xcurrent) * Φ1 + (Xglobal - Xcurrent) * Φ2

Y-new =(Ybest - Ycurrent) * Φ1 + (Yglobal - Ycurrent) * Φ2