thiagogps
thiagogps

Reputation: 469

Q: initialization of Genetic Algorithm

I have a function with a very big search space, so I wanted to use Genetic Algorithms to get somewhat close to the optimum, and then use other method such as BFGS to find the optimal point. I'm using R to do that.

The problem is that my function has 12 parameters and is invalid at most points. When I give maximum and minimum parameter values to the GA and it tries to generate a population, sometimes the whole population is formed by NaNs (and therefore, the algorithm is not able to continue).

Since I don't know much about GAs, I'm struggling to find a solution to this problem. The only thing I thought about is choosing a very big population size (something like 10e5), so it could find some valid values to start. That's not a very good solution though, as being able to initialize the algorithm with a normal-sized population would be much better.

Do you have any suggestions? Anything about GAs I'm missing?

Thank you

Upvotes: 2

Views: 701

Answers (2)

Hypnotic
Hypnotic

Reputation: 39

You can use FI-2Pop GA.

"It is one of the virtues of the FI- 2Pop GA that it can be initialized with an empty feasible population and run with the prospect of eventually finding feasible solutions."

Upvotes: 0

redtuna
redtuna

Reputation: 4600

If most of your parameter space is invalid, then GA may not be the best approach. The risk is that as you cross algorithms, you may get an invalid parameter combination.

Another way of thinking about this is that GA is a search algorithm. It works best when what it tries ends up a little bit better or worse than what it started from; if most tries are invalid then there isn't much guiding the search.

My suggestion would be to try to parametrize the problem differently, so that more points are valid (though perhaps low-fitness). You didn't describe the function so it's hard to be more specific, but sometimes it's possible to accept an "invalid" input and just quantify how far from "valid" it is. Then that's something you can run a search on.

Upvotes: 2

Related Questions