Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AI and Deep Learning by (50.2k points)

I'm building my first Genetic Algorithm in javascript, using a collection of tutorials.

I'm building a somewhat simpler structure to this scheduling tutorial, but I've run into a problem with breeding.

I get a population of 60 individuals, and now I'm picking the top two individuals to breed, and then selecting a few random other individuals to breed with the top two, am I not going to end up with a fairly small amount of parents rather quickly?

I figure I'm not going to be making much progress in the solution if I breed the top two results with each of the next 20.

Is that correct? Is there a generally accepted method for doing this?

1 Answer

0 votes
by (108k points)

One problem with your approach is that you are killing diversity in the population by mating always the top 2 individuals. That will never work very well because it's too greedy, and you'll actually be defeating the purpose of having a genetic algorithm in the first place.

For more information regarding Improving Genetic Algorithm with Fine-Tuned Crossover and Scaled Architecture, refer to the following link:

If you wish to learn about Genetic Algorithm or Genetic Programming then visit this Artificial Intelligence Course.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories