Maximizing the fitness function problem

Hi, first of all thank you for this awesome wallacei, it made my job a lot easier. Maybe my question has been asked in the forum but I couldn’t find the question. Do we need to use “one over x” to maximize the fitness function? So basically the program is based on minimization?

Hi Busra, yes correct. But I prefer to use -x instead of 1/x to maximise a function. The reason is that using a -x avoids creating a fitness value with a lot of decimal places (which is likely when using 1/x), through my tests I found that grasshopper has a decimal place threshold, where it no longer reads values after a certain decimal place… the safest bet is to use -x.

1 Like