Open fredcallaway opened 5 years ago
Looking at the code more, lots of stuff won't make sense with negative objective values. Is this just a standard assumption for genetic algorithms? (I'm no expert!)
I guess it is because the selection methods need to sort the population basing on the fitness. So the ga method should take in input a max/min parameter to drive the sorting phases. Maybe this is a limitation of this first version.
You need to rewrite your problem to fit the package.
This package performs an objective function minimization by maximizing its inverse. Shape your problem to fit the package behavior.
OK sure that's fine. But I think it would be good to include the constraint that the objective function be positive in the documentation.
Also, it's worth noting that taking the inverse has scaling effects that may be undesirable. In particular, for values near 0, very small differences in the objective function will lead to large differences in the inverse objective function, which could reduce population diversity if using selection functions such as roulette or SUS.
Example:
I think this is because you maximize the inverse of the provided objective function. Is there a reason to do this rather than just directly minimizing the function? (Or I guess, maximizing the negation of the function)