Genetic Programming in 24 Hours

I don’t know why I named it “Tide Pool”; there aren’t any tides. Oddly enough though, the creatures learn to move as if there were.

Tide Pool screenshotYesterday I decided to play with some genetic programming. Though I found a neat GP resource, I decided to work from scratch and build a simulated tide-pool with algae/plants and animals of indeterminate form. Truth be told, I’m not even sure what I did really “counts” as genetic programming because the only evolved feature is the behavior for the animals. Regardless, I wrote the thing in a single day and got some neat emergent behavior and a screen-saver-wannabe. Green dots are “plants” and yellow/white/red/black are “animals”.

The code and runnable Jar are here. Everything is public domain, though I humbly request you don’t try to pass the work off as your own. The pulsing brightness is supposed to be day & night. The source code is really sloppy, so keep in mind that this was a quick, shoot-from-the-hip sort of project and please have forgiveness.

Controls:
Minus/Underline = Slower
Plus/Equals = Faster

This entry was posted in Code and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>