0

I was wondering if anyone knew of a source which provides 2D model search spaces to test a GA against. I believe i read a while ago that there are a bunch of standard search spaces which are typically used when evaluating these type of algorithms.

If not, is it just a case of randomly generating this data yourself each time?

Edit: View from above and from the side.

Hans Rudel
  • 3,433
  • 5
  • 39
  • 62

2 Answers2

1

The search space is completely dependent on your problem. The idea of a genetic algorithm being that modify the "genome" of a population of individuals to create the next generation, measure the fitness of the new generation and modify the genomes again with some randomness thrown is to try to prevent getting stuck in local minima. The search space however is completely determined by what you have in your genome, which in turn in completely determined by what the problem is.

There might be standard search spaces (i.e. genomes) that have been found to work well for particular problems (I haven't heard of any) but usually the hardest part in using GAs is defining what you have in your genome and how it is allowed to mutate. The usefulness comes from the fact that you don't have to explicitly declare all the values for the different variables for the model, but you can find good values (not necessarily the best ones though) using a more or less blind search.

EXAMPLE

One example used quite heavily is the evolved radio antenna (Wikipedia). The aim is to find a configuration for a radio antenna such that the antenna itself is as small and lightweight as possible, with the restriction that is has to respond to certain frequencies and have low noise and so on.

So you would build your genome specifying

  1. the number of wires to use
  2. the number of bends in each wire
  3. the angle of each bend
  4. maybe the distance of each bend from the base
  5. (something else, I don't know what)

run your GA, see what comes out the other end, analyse why it didn't work. GAs have a habit of producing results you didn't expect because of bugs in the simulation. Anyhow, you discover that maybe the genome has to encode the number of bends individually for each of the wires in the antenna, meaning that the antenna isn't going to be symmetric. So you put that in your genome and run the thing again. Simulating stuff that needs to work in the physical world is usually the most expensive because at some point you have to test the indivudal(s) in the real world.

There's a reasonable tutorial of genetic algorithms here with some useful examples about different encoding schemes for the genome.

One final point, when people say that GAs are simple and easy to implement, they mean that the framework around the GA (generating a new population, evaluating fitness etc.) is simple. What usually is not said is that setting up a GA for a real problem is very difficult and usually requires a lot of trial and error because coming up with an encoding scheme that works well is not simple for complex problems. The best way to start is to start simple and make things more complex as you go along. You can of course make another GA to come with the encoding for first GA :).

Matti Lyra
  • 12,828
  • 8
  • 49
  • 67
  • so its basically a "no" then. So when you were 1st testing GA's did you just randomly construct a search space up in excel? – Hans Rudel Aug 20 '13 at 07:33
  • Thanks for the edit. Yeah i had already run into the problem of encoding the chromosomes and decided to stick with permutation encoding as it seemed easier slightly easier for my problem. Changing the crossover or mutation rate on my 1st project didnt seem to generate very different results, hence why i was enquiring about search spaces as mine was only a 2d array or 37x36 elements, which im assuming is too small to observe any real dif in changing the above inputs. Would you agree? – Hans Rudel Aug 20 '13 at 08:33
  • So the search space is all functions over the 37x36 matrix. Depending on what values you have in that matrix the search space can be quite big, for instance positive reals are infinite which means that your 37x36 matrix is in fact a very big search space as there are lots of functions that describe the relationships between the variables in the matrix, if however the values are binary or even RGB values (0-255) you could just do a brute force search. – Matti Lyra Aug 20 '13 at 09:11
  • See edit. Its a pretty simple search space and i was just trying to find the peak, which is at 1. – Hans Rudel Aug 20 '13 at 10:11
  • So you're not trying to produce the shape, but just find the highest peak. If that's the case then just do a brute force search. If you're trying to create the shape then that's a very big search space 9**(37*36) assuming that you try 9 different values for each cell, bigger if you allow more values. – Matti Lyra Aug 20 '13 at 10:38
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/35846/discussion-between-hans-rudel-and-matti-lyra) – Hans Rudel Aug 20 '13 at 13:23
1

There are several standard benchmark problems out there.

  • BBOB (Black Box Optimization Benchmarks) -- have been used in recent years as part of a continuous optimization competition
  • DeJong functions -- pretty old, and really too easy for most practical purposes these days. Useful for debugging perhaps.
  • ZDT/DTLZ multiobjective functions -- multi-objective optimization problems, but you could scalarize them yourself I suppose.
  • Many others
deong
  • 3,820
  • 21
  • 18