# Step Monitor option in DifferentialEvolution

Using the "Step Monitor" option what exactly do I read? Does it show me the "best solution" for each population? Or does it show me each search point in the population? Also is there an integrated "mutation" algorithm in DifferentialEvolution? I happen to see that in the "Step Monitor" it often repeats the same set of points of my design space.

## 1 Answer

Mutation is according to the classical rand/1 scheme.

NMinimize does not (or, at least, did not used to) save the function value it obtains at each point, and so reevaluates the objective function when candidate solutions are propagated unchanged through more than one generation. This accounts for the multiple evaluations at each point. I think that this is a simple oversight, although one can argue that this behavior is preferable if it is used to minimize stochastic functions (otherwise, a wrong solution will almost certainly result).

You can find out more about the internal workings of NMinimize by requesting debug output, as shown here. For anything remaining unanswered even then, you could consult the source code--differential evolution is implemented as top-level code in OptimizationNMinimizeDumpCoreDE. This can show you, for example, that the step monitor function receives only the best candidate solution at each generation, and not the entire population.

Note that Mathematica's differential evolution is not fully consistent with the paper of Storn and Price. The sense of the crossover probability is reversed, and the selection of "parent" vectors from which to produce mutants is done with replacement.

• Oleksandr do you perhaps know how to set the number of generations? May 11, 2016 at 7:43
• @MirkoAveta that will be MaxIterations. If you want to set an exact number rather than a maximum, you may have to find a way to trick NMinimize into it. May 11, 2016 at 10:56
• Thanks. Easy to say, almost impossible to do :D May 11, 2016 at 11:47