# Maximizing the fitness function problem

**URL:** <https://discourse.mcneel.com/t/maximizing-the-fitness-function-problem/163535>\
**Category:** Wallacei\
**Tags:** windows\
**Created:** [August 1, 2023, 9:23pm UTC](https://discourse.mcneel.com/t/maximizing-the-fitness-function-problem/163535 "2023-08-01T21:23:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Büşra](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/b%C3%BC%C5%9Fra/32/482936_2.png) [@Büşra](https://discourse.mcneel.com/u/B%C3%BC%C5%9Fra)\
**Post date:** [August 1, 2023, 9:23pm UTC](https://discourse.mcneel.com/t/maximizing-the-fitness-function-problem/163535/1 "2023-08-01T21:23:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mmakki\_10](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mmakki_10/32/485577_2.png) [@mmakki\_10](https://discourse.mcneel.com/u/mmakki_10)\
**Post date:** [August 1, 2023, 9:41pm UTC](https://discourse.mcneel.com/t/maximizing-the-fitness-function-problem/163535/2 "2023-08-01T21:41:37Z")

</div>

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.
