Thursday, January 5, 2012

Genetic Algorithm for Image Evolution

4 comments:

  1. you said each image in the population get 1 random polygon, but not each evolution a polygon is added. when does the algorithm decide to add a new polygon instead of just changing the existing?

    ReplyDelete
  2. hello. when a new offspring is created by combining 2 parents through crossover, there is also a chance that the offspring will be mutated. there is a 45% chance that the mutation will result in a change in colour of one of the offspring's polygons, 45% chance that a polygon will move, 5% chance that a polygon will have an edge added or removed and finally, a 5% chance that a polygon will be added or removed from the offspring. you can view the (sorry a bit messy) code here http://parasec.net/evolve2/evolve.js if you are interested. thanks.

    ReplyDelete
    Replies
    1. thank you i will take a look^^. so you just add a poly randomly?

      Delete