Amazing AlgorithmsFor Solving Problems in SoftwareBarry S. StahlSolution Architect & Developer@bsstahl@cognitiveinheritance.comhttps://CognitiveInheritance.com |
Favorite Physicists
Other notables: Stephen Hawking, Edwin Hubble |
Favorite Mathematicians
Other notables: Daphne Koller, Grady Booch, Leonardo Fibonacci, Evelyn Berezin, Benoit Mandelbrot |
|
|
|
|
|
initialize n fireflies to random positions
loop maxEpochs times
for each firefly i
for each firefly j
if intensity(i) < intensity(j)
compute attractiveness
move firefly(i) toward firefly(j)
update firefly(i) intensity
end for
end for
sort fireflies
end loop
return best position found
initialize the amoeba with n (size) locations
loop maxEpochs times
calculate new possible solutions
contracted - midway between centroid and worst
reflected - contracted point reflected across centroid
expanded - beyond reflected point by a constant factor
if any solution is better than the current
replace worst value with best value from new solution
else
shrink (multiple contract) all lesser nodes toward the best
increment epoch count
end loop
return best position found
Predict the unknown values in a linear equation
|
|
|