Thanks for your reply.
Actually, in my project, I have to use pseudo random numbers generated by C lib functions, e.g. srand(). Therefore, the seeds which is used to set the random number generator (rand(seeds)) will be regarded as the gene for the
parents. However, I can't figure out whether the cross-over can make the springoffs have some behaviors of the parents, since if you set the different seeds, the random number generated by C will be totally different (AFAIK).
Thus, in my case I don't use cross-over, the whole evolution relies on the mutation, e.g. 100%, and I keep the number of population in each iteration as fixed number, which may not lead to your mentioned sparse population. What's your comment on it?
However, I may not follow up your reply about Mutation. e.g. "- To high a value and you're better off just running a randomizer in a loop and wait for it to magically stumble upon the answer." Do you mean the problem can't be
Another question is about your introduced tournament selection mixed with elitism. For the elitism part, do you mean to pick the best chromosomes in first iteration / initial population, then keep them in the rest iterations, or keep the best ones which can be survive in the number of iterations, e.g. 3 or 5 times iterations?
Can I realize the mutation will try to have a good global solution space, whereas the crossover will find the local optimum?
Sorry for many questions,
Thanks in advance,
It depends on your application, but generally:
- To low a value and you may end up with a stagnant population
- To high a value and you're better off just running a randomizer in a loop and wait for it to magically stumble upon the answer.
- To low a value and you reduce your genetic diversity
- To high a value and you end up stagnating some of your population (wasting)
The values you specified are typically the "defaults", though really you must experiment with it. Sometimes I like to assign a high mutation rate as it can get me to the result quicker, but at the trade-off of having a sparse population (ie: good for short-term, bad for long-term).
Roulette wheel in my opinion is not a good selection scheme. There's the possibility you could end up taking a bunch of worthless chromosomes that only set you back a couple generations. The chances of this happening frequently is also equally possible.
It's been a while, but I recall using tournament selection mixed with elitism provided good results. This guarantees you keep at least some of your best chromosomes (elitism), and maintain genetic diversity (tournament). With elitism you pop off the best of the best from your list. With tournament, you randomly loop N times, keeping the best of the randomly selected chromosome.