I have an optimization problem that I am trying to solve with a genetic algorithm. Basically, there is a list of 10 related real variables (-1 <= x <= 1), and I need to maximize some function of this list. The catch is that there can only be up to 4 variables in the list! = 0 (condition of the subset).
Mathematically speaking: For some function f: [-1, 1] ^ 10 → R min f (X) ST | {var in X with var! = 0} | <= 4
Some background on f: the function is NOT similar to any knapsack object function, such as Sum x * weight or something like that.
What I have tried so far:
Just a basic genetic algorithm over the [-1, 1] ^ 10 genome with a 1-point crossover and some Gaussian mutation in variables. I tried to encode the subset condition in the fitness function using only the first 4 non-zero (zero, as if sufficiently close to 0) values. This approach does not work so well, and the algorithm gets stuck in the first 4 variables and never uses values that go beyond that. I saw some kind of GA for the 01-backpack problem where this approach worked well, but apparently this only works with binary variables.
What do you advise me to try next?
source
share