Comments (6)
Indeed, the current implementation mutates elite population, and this is unconventional to the common practice of elitism implementation. It's worth considering to copy elite individuals intact.
from evolutionary.jl.
Also ran into this issue with the DE()
algorithm at #112 , guess with the GA
the results from previous iteration (which contain the actual minimizer) can be overwritten by later iterations, possibly somewhere
Lines 92 to 97 in cf3f2fb
for the GA.
from evolutionary.jl.
Would the test result at commit timholy/ScheduleMeetings.jl@1dae62f
Iter Function value
0 14
* time: 0.00019502639770507812
1 14
* time: 0.018580913543701172
2 14
* time: 0.018917083740234375
3 14
* time: 0.01920604705810547
4 14
* time: 0.01949787139892578
5 14
* time: 0.019734859466552734
6 14
* time: 0.019989013671875
7 14
* time: 0.02025890350341797
8 14
* time: 0.020509958267211914
9 14
* time: 0.02074599266052246
10 14
* time: 0.020987987518310547
11 14
* time: 0.0212399959564209
12 14
* time: 0.021517038345336914
Evolutionary.minimum(result) = 14
f(perm0) = 14
Evolutionary.minimizer(result) = [1, 2, 3, 1, 2, 3]
perm0 = [1, 2, 3, 1, 2, 3]
in agreement with what you expect? Got the result above when changing the minimize logic here
Lines 93 to 94 in cf3f2fb
with
if (minfit < state.fitness)
state.fittest = offspring[fitidx]
state.fitness = state.fitpop[fitidx]
end
to avoid the result being overwritten by later iterations when it's not actually the optimized minimizer
from evolutionary.jl.
In the main
branch I've modified the test to be a little more challenging (that solution is optimal, but it's also the initial guess). You could try your code patch with the current test?
from evolutionary.jl.
You may want to play with a mutation rate (decrease) or population size (increase) for more stable performance. Plus, instead of the default tournament
selector, you could use more aggressive susinv
to drive a population of low fitness permutations up.
I also found that the best permutation is [2, 2, 3, 1, 1, 3]
with the fitness value 21
, and it isn't possible to get such permutation with your mutation function swap2blocks
as it only swaps numbers within a block. So, the starting permutation [1, 2, 3, 1, 2, 3]
appears to be an optimal choice.
from evolutionary.jl.
In #108 I raised the question of whether it would make sense to provide an option to preserve the best-so-far individual ("elite" individuals are still subject to mutation, and hence they can be degraded as well as improved). Perhaps a copy could be made before mutation, so that you'd be sure to avoid any worsening? I'd defer to @wildart who knows much more than I about such matters.
from evolutionary.jl.
Related Issues (20)
- Defining intitial value for parameters as a vector for each parameter HOT 1
- "maximization context"? HOT 2
- Zero-index bug in recombination operators that use `inmap` HOT 1
- Cannot modify trace HOT 3
- Default for `recombination` in `ES` causes error due to `rng` kwarg
- DE returns most recent population info, rather than the minimizer HOT 2
- Function with binary and real inputs HOT 1
- ES selection strategies HOT 3
- differential evolution does not honour the parallelization option HOT 1
- Access the population during GA evolution HOT 1
- Crossover functions not working as intended for integer sequences?
- Not being able to parallelize.
- Evolutionary.jl fails to solve simple task that analogous simple python script solves without any problem. HOT 4
- Examples in documentation fail HOT 1
- Symbolic regression examples not working in version 0.11.1 HOT 1
- Cannot get examples MLP to work HOT 3
- DE rastrigin tests sometimes randomly fail
- Default `GA` and `DE` don't seem to work in v0.11.1 HOT 6
- Integer Problem with MILX and MIPM HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evolutionary.jl.