- Dec 29, 2013Hi all,Now that I have the concept of a CPPN understood, I will move onto starting to build a population and evolve it so that I can reproduce the basic example of finding a large square on a grid where a smaller square is also visible.First I will generate a grid that contains a large filled square object and a smaller filled square object. The output grid contains the same number and configuration of pixels as the input grid. For each input grid location (pixel) I will feed that into a CPPN, and the output of the CPPN will become the weight that connects the input pixel to the output pixel. Once I have processed each input pixel, the output pixel is simply calculated by multiplying the input pixel value (scaled from 0/255 to -1/1) by the weight to generate the output value. To locate the larger square I am simply looking for the output pixel with the highest value.To evolve this problem, I first need a population. As a starting point, my population will all contain the same number and type of functions and the connections will all be the same. The difference between each population member will simply be the weights between the connections.For example, in my population of 100, the CPPN for each member is exactly the same and will contain 2 sigmoid functions, a sine function and 2 gaussian functions. With the population all containing the same function structure, the DNA genes are simply the weights between the connections of each CPPN function. So for my example CPPN where I have 5 functions, I may (for example) have 25 interconnections that will need to be evolved. Using a standard GA I can easily evolve the population and I may achieve a reasonable result. However I do not believe that this is how Neat works.My understanding of Neat is that each population can have a different genetic makeup, eg each CPPN can have a different number and type of functions and different connections with each CPPN. Thus with the different populations you can evolve to effectively find the optimal CPPN for the problem.So I guess my next question is how does the logic of this work. If you have a population with all the same structure, to evolve that population is simple, how do you evolve a population where all the connections and functions are different.As a starting point for how I would imagine this could be done, I imagine that you need multiple populations, with members of each population having the same structure. For example I could have 10 populations of 100 members. For each population the CPPN could be completely different to the other populations, but the same as other members of the same population. This way I could evolve each population individually.Taking this a step forward, as part of the evolution process, each population can mutate so that the CPPN includes a new function, the an interconnection changes etc, This mutation would produce a new population that could then be evolved on it's own etc. I imagine that from a 10 starting populations of 100 members, it would be easy to end up with 100 populations of 100 members quickly, I would assume that the weakest populations die out after a certain evolution count (life time) so that the total population does not continue to grow too large.I still do not think that this is how neat works, because basically no real evolution is occurring, just mutation.Any tips on how I have misunderstood this concept would be appreciated.Thanks,Simon
- Next post in topic >>