Differential Evolution Algorithm (Rainer Storn) from http://www.icsi.berkeley.edu/~storn/code.html -------------------------------------------------------- runs.m (sequential de with simple interface) run0.m (easy to use interface) run.m (detailed interface) ofunc.m (objective function) devec2.m (differential evolution optimizer) -------------------------------------------------------- runs.m is a variant that calls de sequentially and that I found useful in exploring functions; the other routines are from the above server. The following is from the original web page: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Now the DE strategy is available in MATLAB code. The vectorized programming, necessary to make MATLAB code reasonably fast, lead to a DE approach which differs from the original idea in some important aspects (see code for details). Choice of parameters: -------------------- If you are going to optimize your own objective function with DE, try the following settings for the input file first: Choose method DE/rand/1, set the number of parents NP to 10 times the number of parameters, select F=0.8 and CR=0.5. [This is the default in devec2.m.] Make sure that you initialize your parameter vectors by exploiting their full numerical range, i.e. if a parameter is allowed to exhibit values in the range [-100, 100] it's a good idea to pick the initial values from this range instead of unnecessarily restricting diversity. If you experience misconvergence you might have to increase the value for NP or play with the values for F and CR. F and CR are both generally in the range [0.5, 1.]. Keep in mind that different problems usually require different settings for NP, F and CR (have a look into the techreport tr-95-012 to get a feeling for the settings). If you still get misconvergence you might want to try a different method, like method DE/rand-to-best/1 or DE/best/2. Choose NP, F and CR like above. Think about the initial parameter setting and also check your choice of objective function. There might be a better one to describe your problem. Don't give up too early!