Is it possible to use a different fitness function for certain population members in the Genetic Algorithm?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am using the genetic algorithm to solve a integer (binary) problem with linear constraints.
Because the solution space is so large (~400 binary solution vector) and I do not have a lot of time to run the algorithm, I inject a handful of strategic solutions into the initial population. This way the GA is refining those solutions rather than starting randomly (and hence, better solutions are found quicker).
The problem is that the fitness function is a bottleneck on run time. The initial generation takes upwards of 30 minutes to evaluate 500 random feasible solutions. After the first generation, crossover turns the population mostly infeasible (and infeasible solutions are not evaluated by the fitness function - so the generations progress much more quickly). Over time, feasible solutions begin to emerge and the population becomes (almost) completely feasible.
(Note: The mathworks documentation on this is currently incorrect. Crossover DOES produce infeasible solutions in certain uses of the GA).
Since the random solutions are uniformly "fit" after the first generation, I don't want to waste precious time running each of them through the fitness function in the initial generation.
Is there a way to tell the fitness function to ignore certain population members? Such as population(100:end,:) if Generation < 1? As far as I can tell, there's no straightforward way to pass which population member is being evaluated to the fitness function. (Even if you can pass other parameters).
My other thought it to use the output function to change the fitness function. For the first generation, it could use a very simple function. Then after the first crossover, I can use the output function to inject the strategic solutions into the population and switch over to the better fitness function.
Does anyone have any thoughts on this?
댓글 수: 2
Matt J
2018년 10월 5일
Why not just remove the members you don't want to process from the initial population altogether?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!