Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Tuesday, December 09, 2008

Drawing the Mona Lisa with a Genetic Algorithm

I know I haven't posted much lately, but this is something that just really caught my attention.

A guy wanted to play around with genetic algorithms so he set out to try and recreate an approximation of the Mona Lisa using only 50 polygons, and he did a fantastic job!

If you are unfamiliar with genetic algorithms either you can read up on them here, you can read my description at the end, or you can simply not care and just check out the cool pictures!

You can read about it, as well as see an image from a select set of iterations, here.

The term Genetic Algorithm basically just describes a programming technique in which the developer takes an initial population or data set as the starting DNA pool, then essentially just allows the population to reproduce. This is done by various methods to include "cross over" and "mutation". In cross over, part of the DNA from one member in the data set or population, is combined with part of the DNA from another member, just as in human reproduction. The result is two new members of the next generation, each comprised of parts of their parents. Mutation generally occurs after cross over and is similar to a human birth defect in that the offspring's DNA is not merely comprised of its parents. This resulting mutation may or may not be beneficial to the survival. Once the new generation is formed, each member of the population is run through a fitness function. This takes those members that most closely approximate the desired end result and allows them to breed. This process continues until either you reach a maximum number of generations, or you have achieved your goal.

Friday, November 30, 2007

Job well done?

Hmm, well maybe. Yeah, so I wrapped up my week at noon today with over 45 hours in for the week. Ok, maybe that's not a lot to some people, but hey I don't get any benefit from working long hours. The software company I work for does offer an engineering bonus, but first off its only available to employees that have been with the company for over six months. Next the project is being sponsored by my company, which makes it an internal project, so not externally billable. The bonus program is only applicable on billable hours. So I get screwed all the way around. Anyway, my boss did a demo of the application to our first users today, and I got word that it went really well. So I got a thanks for the hard work. Umm yeah that makes the time away from my wife worth it. NOT!

Monday, November 26, 2007

Checking for Bugs

Ok, so the project I am working on has now started the testing phase. I must tell you, I absolutely hate taking over a project. I am sitting here being asked why such and such was done this way. Umm, how the hell should I know, I didn't have anything to do with that! So anyway, there are only a few issues with my portion of it, and they are due to issues with adding functionality to the existing code.

Anyway, it has been a hard day, not a hard day of work, but I hard day of staying awake! After leaving early last Tuesday and taking the rest of the week off I feel like I need another vacation!