Slide 17 of 18.
If you are using GAlib, just do ga.maximize() or ga.minimize() (you do not to make any transformations to your objective function)