简体   繁体   中英

Translating of fitness function from a meta heuristic algorithm [LOA]

Lion Optimization Algorithm (LOA) is a newly proposed meta heuristic algorithm by Maziar Yazdani & Fariborz Jolai.

I'm having problems translating a fitness function in python3 for I had no prior knowledge whether I need import numpy or scipy library or code it manually without such imports.

Here is the function I'm having troubles understanding with:

fitness value of lion = f(Lion) = f( x 1 ,x 2 ,x 3 ,...,x N Var )

I'm wondering if I need to treat it as a function or as a line of code. Any help that would lead me to ideas are appreciated! Thank you.

That line does not provide the definition of the cost function, it merely states the signature (the interface) of that function: it must be provided all coordinates of the Lion for calculating the result.

As this algorithm is supposed to be applicable to different problem statements, the cost function is actually an input to this algorithm. The algorithm itself performs the different "simulations" of hunting, roaming, mating, ...etc, and regularly calls the given cost function to see how well the current "positions" score. The claim is that with such simulations one can find an optimal solution in a reasonable delay.

So what the optimal solution will be depends on the actual problem that needs to be solved, which in turn is expressed as a cost function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM