[R] optim() does SANN, why not genetic algorithm (genoud)

From: Ajay Narottam Shah <ajayshah_at_mayin.org>
Date: Thu 09 Jun 2005 - 19:13:13 EST

It is a very nice touch that optim() offers SANN (simulated annealing) as a random search algorithm.

The R community already has genoud - an implementation of a genetic algorithm for search.

Wouldn't it be neat if optim() would additionally offer method="GA" where it internally uses code from genoud?

I glanced at the code and I find the work is all being done in

   res <- .Internal(optim(par, fn1, gr1, method, con, lower, upper))

Should we do it as:

   if (method == "GA") {
     # insert genoud calls here.
   } else {
     res <- .Internal(optim(par, fn1, gr1, method, con, lower, upper))    }

Who wrote optim, and who maintains it?

Ajay Shah                                                   Consultant
ajayshah@mayin.org                      Department of Economic Affairs
http://www.mayin.org/ajayshah           Ministry of Finance, New Delhi

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 09 19:23:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:27 EST