Question

I am working on discrete optimization problem and I want to plot the search space. Actually I would like to see mutation and crossover operations visually in the search space. I haven't got any idea on that!

Can someone tell me how to plot search space for a discrete optimization problem for Genetic Algorithm in MATLAB?

  • I don't use any toolbox.
  • An example for such an optimization problem is traveling salesman.
Was it helpful?

Solution

It's difficult since, obviously, GAs search high-dimensional spaces.

You might try Chernoff faces but I've never been fond of them.

One visualization that I've tried is to track the metric entropy of genes across the population. If you map that value (which ranges from 0..1) into a color-range, you can visualize the entropy of the entire population as a row of colored boxes (one for each gene). Put the next generation's row immediately below (or above) that, making your Y axis represent time.

The resulting image visually shows the areas of rapid convergence (metric entropy going towards 0) versus the areas where the search took more time and does, I think, deliver at least a small amount of value into the dynamics of the search.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top