Skip to content
Prev 181397 / 398502 Next

using optimize() correctly ...

Berend Hasselman wrote:
So if I understand correctly, this method would also yield the same
sort of result (ie non-guaranteed global max or min over the range
-10 to 10).
Yes, I recall reading this.
Agreed, however, I am testing a genetic algorithm's ability to find the
global maximum/minimum and was looking for another independent tool to
verify the results I am getting for f(x) and f(x, y), ie my various
test functions which will be more complex than the one I posted (and
many will be multi-modal since those present a challenge for any
algorithm). Since R has proven to be quite capable in the past I
thought I would check and see if it could easily do this. I was hoping
to avoid having to plot and re-run various functions repeatedly over
various ranges or starting points.

Thanks again for the help/information, much appreciated.

Esmail