SLIDE 13 Explain the algorithm
As can be seen in algorithm 4 (lines 7-8), between two points, the point with the best performance value absorbs the other point. Conversely, a point that is worth performing worse will repel another (lines 9-10). Because xbest has the least amount of
- bjective performance, it acts as an absolute point of attraction,
meaning it attracts all other parts of the population.
1: for i =1 tom do 2: π_π = (βπ (π(π¦^π ) β π(π¦^(πππ‘π’)))/( _(π = 1)^πβγ(π(π¦^π γ)
β π(π¦^πππ‘π’))) )
3: Fi β 0 4: end for 5: for i =1 tom do 6: for j =1 tom do 7: if f(xj) < f(x i) then 8: ππ β π¦π β π¦π
ππππ π¦πβ π¦π 2 {Attraction}
9: else 10: ππ β π¦π β π¦π
ππππ π¦πβ π¦π 2 {Repulsion}
11: end if 12: end for 13: end for
Electromagnetism-likeMechanism