How to avoid an invalid search space in a genetic algorithm?

I am developing GA for a school project, and I noticed that when evaluating my fitness functions, an individual is equivalent to the opposite.

For example, a set is (1, 1, -1, 1)equivalent (-1, -1, 1, -1). To compress my search space and achieve a more efficient solution, how can I avoid my crossovers from searching in this second half of the search space?

+3
source share
3 answers

Cut the gap in half. Require that the first element be non-negative, then if you have (x_1, .., x_n) and its inverse (-x_1, .., -x_n), only one will be in the search space. (if x_1 = 0, then they are the same) By the way, what is the problem that you are solving?

+2
source

Try rewriting the health function to assign the scales to the appropriate people - not sure about the problem you are trying to solve, or how the weight can be reassigned. Remember that the most suitable people should be in the pool and most likely will be chosen for the crossover - you do not want a pool full of dummies to have the same suitability as good solutions that defeat the purpose of the genetic algorithm

+1
source

, - . 1- , >= 2:

If the children created through the crossover / mutation are reverse, ignore them and generate another child until he becomes a “good” child.

+1
source

Source: https://habr.com/ru/post/1732958/


All Articles