Intellipaat Back

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

E.g. I have two random representatives

1 6 8 9 0 3 4 7 5

and

3 6 5 7 8 5

What are the ways to crossover them?

Add some empty numbers (or operations or sth) at the end of every genotype so they will have the same size?

3 6 5 7 8 5 -1 -1 -1

where -1 means nothing?

Or copy a few numbers from the first genotype and some from the second?

What is the way you use it?

1 Answer

0 votes
by (108k points)

This link introduces variable chromosome lengths (VCL) in the context of a genetic algorithm (GA). This concept is implemented on structural topology optimization but is also suitable for a broader class of design problems.

If you already have variable length chromosomes, then it shouldn't matter how you do it, you just need to select a crossover point for each of them, and then crossover as normal.

For example, on your chromosomes, I have selected two points (.) at random:

1 6 8 9.0 3 4 7 5

3 6.5 7 8 5

With resulting chromosomes:

1 6 8 9.5 7 8 5

3 6.0 3 4 7 5

If you wish to learn the Genetic Algorithm and Genetic Programming then visit this Artificial Intelligence Course.

Browse Categories

...