?

Log in

No account? Create an account
Greg [entries|archive|friends|userinfo]
Greg

[ website | gregstoll.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| * Homepage * Mobile apps (Windows Phone, Win8, Android, webOS) * Pictures * LJBackup * Same-sex marriage map * iTunesAnalysis * Where's lunch? ]

adieu genetic Mona Lisa [Mar. 9th, 2009|10:58 am]
Greg
[Tags|]
[Current Mood |chipperchipper]
[Current Music |The Lonely Island - "I'm on a Boat"]

That project I was working on? Yeah, not so much. After running it overnight, here's what I got:
The target imageA bunch of colored polygons
Um, so it seems to have figured out the image is mostly pink. Hooray?

Things I did learn:
- I originally tried crossover for breeding (specifically cut and splice) and that was just terrible. I think the algorithm really needs lots and lots of new polygons to be tried, and the weakness of crossover is that you're just combining existing ones.
- Originally I had a generation size of 500, and I implemented the image difference calculation in Python. This took around 500 seconds, which is way way way too long. After some optimizing, I got it down to around 280 seconds.

I had planned to wait until I had things working to write a C module for Python to do the difference, but I figured I couldn't really make progress until I could actually do the difference in a reasonable amount of time. After writing it in C (not even with MMX or anything) the total time went down to 1 second. Win!
- The best results seem to come from having a very small generation size and randomly mutating, which is pretty much what the original guy did.

Wanna see something else cool? Virgil did these: Books that make you dumb and Music that makes you dumb by correlating popular books and music at universities (found on Facebook) with average SAT scores. Obviously correlation is not causation but it's still pretty interesting. Guster, Ben Folds, and Radiohead fans should feel good, I suppose :-)
LinkReply

Comments:
[User Picture]From: destroyerj
2009-03-09 04:29 pm (UTC)
While the result image only slightly resembles the original (and prolly only if you know what you're looking for), I think it looks pretty awesome in its own right. You should print it on a canvas and sell it for $10,000!
(Reply) (Thread)
From: spchampion
2009-03-09 04:38 pm (UTC)
So the "makes you dumb" links are truly ridiculous but still entertaining. I'm kind of perplexed by the music link, though. Smart people only listen to Beethoven? I don't think he has enough data.
(Reply) (Thread)
[User Picture]From: gregstoll
2009-03-09 04:41 pm (UTC)
You can look at the breakdown by artist - here's Beethoven's. Only 12 schools are listed - since you only get the top 10 from each school there probably isn't enough data.
(Reply) (Parent) (Thread)
[User Picture]From: medryn
2009-03-09 04:52 pm (UTC)
It's every graphics nerd's favorite playboy pinup!
(Reply) (Thread)
[User Picture]From: onefishclappin
2009-03-09 05:08 pm (UTC)
What's up with that - I remember that as always being the example graphics picture from back when I in college. I hope she gets a penny every time some prof makes everyone in the class alter that pic in some way.
(Reply) (Parent) (Thread)
[User Picture]From: medryn
2009-03-09 05:11 pm (UTC)
(Reply) (Parent) (Thread)
[User Picture]From: onefishclappin
2009-03-09 05:12 pm (UTC)
Once again, I answer my own question:
http://en.wikipedia.org/wiki/Lenna
Thank you wikipedia. And no, she doesn't get a penny for every use of that picture, but apparently, she (and Playboy) are ok with that.
(Reply) (Parent) (Thread)
From: abstractseaweed
2009-03-09 10:58 pm (UTC)
It's ironic that her turn-off is "Men who wear shorts with white socks and black shoes." Classic nerd attire.
(Reply) (Parent) (Thread)
[User Picture]From: omega697
2009-03-09 07:01 pm (UTC)
I like it.
(Reply) (Thread)