Author | Message |
---|---|
sdo8
Posts: 54
|
Posted 00:33 Nov 29, 2019 |
From my understanding of genetic algorithms, the mating pool size comes from a randomly selected sample of the population (Assuming we are using tournament selection). Finally, we set a chance for mutation for each individual in the children and repeat the process for n many generations. I'm having trouble determining the best combination of population size, elite size, and mating pool size to solve the problem. How long should it take for a GA for, let's say.. a 5x5 Nurikabe take to solve? After attempting some GA problems, I'm starting to feel like calculating Fitness for some problems was like writing heuristics for Pac-man.
Thanks & Happy Holidays! |
rabbott
Posts: 1649
|
Posted 11:54 Nov 29, 2019 |
Population size, tournament size, etc. are all somewhat arbitrary. The best sizes will depend on the problem. An important consideration is that you want to maintain diversity in the population. Given a diverse population, what's important are the evolution operators (crossover and mutation). You want to select or create operators that have a good chance to move an individual (or a pair of individuals) toward a solution. You also want your fitness function to identify important features so that individuals that have those features are likely to be included in subsequent populations. As long as you continue to generate some individuals with improved qualities, don't worry about generating other individuals with low fitness. They will just fall out of the population. |
rabbott
Posts: 1649
|
Posted 13:09 Nov 29, 2019 |
To ensure diversity, the Population selects its next generation by selecting a certain percentage the usual way, e.g., tournament selection, and the rest as random new individuals. You can specify what percentage will be random. See one_max_2D. If you make select_pct_random=0.9 (as it's currently set), evolution almost always find a solution. If you set it to select_pct_random=0.1 it often fails to find a solution. Last edited by rabbott at
13:10 Nov 29, 2019.
|