-2

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(x1,x2,x3,...,xNVar)

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.

trincot
  • 211,288
  • 25
  • 175
  • 211
Rai Re
  • 45
  • 4

1 Answers1

0

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.

trincot
  • 211,288
  • 25
  • 175
  • 211