Genetic Algorithm Progress

Well, finally another update concerning the genetic algorithm. I have changed it significantly, so it is actually looking like a business card generator. I have discovered that the fitness function really is the holy grail here. It needs to be able to lead the algorithm to an optimal solution.

Initially I was just awarding points for meeting specific criteria. So for the word one, it awarded points only when the word was in the dictionary. This meant that it was very difficult to progress to better solutions when the words got longer (7 or 8 characters) since the density of words at that length is much smaller than at say 4 characters.

For the business card generator, I was initially rewarding a bunch of points for creating a solid background (square at 0,0 with size 100%,100%). This didn’t seem to change the output of the algorithm though, the reward was having no effect on the outcome. I realized that what I needed to do was reward points based on how much area of the business card an element covered. In this way, the larger an element was, the more points it would get. This would encourage larger elements, and most highly reward an element that completely covered the card.

There is still a long way to go, but please play around with the current iteration. Be patient while the applet initializes to a generation of acceptable quality. If it takes longer than a minute or two to initialize, feel free to reload the applet to re-start the process.

Once cards start showing up, you click on either the right or left card to select which one you prefer. After every 10 choices the program will breed a new generation and let you vote on those.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.