Reflection/Expansion
Basic reflection/expansion (r0)
We combine four individuals, xbest, xworst2, wworst, and the current xi that has to be moved. The idea is that a move from xworst to xworst2 is probably a good one, so, on the contrary, the same move applied to xbest is probably a bad one, i.e. it tends to deteriorate the position. But on the other hand, it also gives a chance to escape from the attraction basin of xbest.
Of course, for a unimodal landscape, this is a waste of time, but for multimodal ones, it may be useful. Moreover, this move is not applied on all dimensions, but only on some of them, according to the probability estimated at the end of the selection phase. So, finally, the formulae to define the new point xe are, for each dimension d:
if (rand(0,1)<p)
xr,d=xbest,d+(xworst2,d−xworst,d)
else
xr,d=xi,d
If xr is better than xi, decrease the population cost C←C−f(xi)+f(xr)
If xr is better than the best ever found (i.e. Best), set Best=xr.
.