Closed TheMEGuy closed 3 years ago
The fitness function is ill-defined. There is no variation in the resulting value it always +1 (the chance of getting -1 is close to 0 in the real domain).
So after the couple iterations the difference between previous and current fitness values is 0 which is less then the tolerance threshold, so the algorithm going to stop. There are additional 10 iterations of the optimization on successful tolerance condition, controlled by successive_f_tol
option.
You may want to try the following fitness function fit(x) = abs(4.0 - sum(x))
julia> fit(x) = abs(4.0 - sum(x))
fit (generic function with 1 method)
julia> Evolutionary.optimize(fit,lowerbound,upperbound,indiv,CMAES(),Evolutionary.Options(iterations = 1000))
* Status: success
* Candidate solution
Minimizer: [2.2801910167618544, 1.719808983238146]
Minimum: 0.0
Iterations: 478
* Found with
Algorithm: (15,30)-CMA-ES
Hi,
thanks for the cool package.
I recently started to do some research within the field of Evolutionary Strategies.
I have a question regarding a very simple problem:
I do not understand why the Algorithm yields infeasible solutions, returns the status "success" and always stops after 12 Iterations.
Another question:
Is there a way to mutate the genotype, so that the mutation is a multiple of a certain step/number? The Mutations should do something like this: step = 0.25 :[1.495763498,1.23478634] --> [1.75,1.23478634]. Is there such an Algorithm in this package?
I really hope I was able to explain my problems understandably.
Thanks