Hacker News new | past | comments | ask | show | jobs | submit login
Creatures – A simple evolution simulator (github.com/thopit)
49 points by ScottWRobinson on June 15, 2015 | hide | past | favorite | 23 comments



A.K. Dewdney wrote an article in his column "Computer Recreations" called "Simulated Evolution: wherein bugs learn to hunt bacteria" (Scientific American, May 1989, pp 138-141) describing a simple algorithm for virtual bugs to evolve movement patterns where they would find increasingly efficient ways to find "food". A lot of people put this into code and had fun playing with it. I think it influenced quite a few peoples' perception of genetic algorithms because it was just so easy to understand, implement and tweak. We had fun adding "predators" and all sorts of other things into it.

Looks like there is a website dedicated to it here: http://www.simulatedevolution.com/


That was probably the seminal article in my computer career. It was the first serious program I wrote, in 1989. The pseudocode for the essential routines were relatively straightforward for me to translate into Commodore BASIC on my C64, but getting acceptable speed to see evolution happen was a challenge. I started out by using the standard tricks I knew (e.g. "." in place of "0", because it's significantly faster in CBM BASIC) but ended up using one of the BASIC compilers for a really big speed boost.

I let it run overnight, and when I woke up in the morning and turned on the monitor (a CBM 1701), there they were: Bugs traveling in straight lines to efficiently gather microbes/food. It blew my mind. At that point I decided I could write any program I thought of! It only took me a couple more months to realize that wasn't true.

I ended up majoring in Computer Science, taking a class in AI, going to the University of Chicago's Ph.D. program in AI, dropping out of grad school to work on natural language interfaces for NASA robots, and I've been in and out of AI since then and am currently working on a speech interface for drones: http://lemondronor.com/blog/indexphp/2013/3/electric-familia...

I feel like I owe a lot of the fun and satisfaction I've gotten from programming to A. K. Dewdney and his lucid and compelling Computer Recreations articles.

(For A. K. Dewedney's spiritual successor, see Brian Hayes' Computing Science articles for American Scientist magazine.)


Simulatedevolution.com is actualy my site and I wrote this program based on that article. In 2009 I was actually contacted by Mike Palmiter who the original article was all about. He has since retired and is still working on related projects such as one called “Darwin’s Aquarium”. -John Nash


The mating process looks like it is a mathemetical average of various statistics of the mother and father. It wasn't the kind of cool dna I envisioned, where the food search algorithm is a little program that the creatures execute.

If you're interested in writing software that genetically writes other software, check out this amazing book by Koza[1]. It's one of my favorite books that I have on my shelf. Armed with this book and a computer, you can have a ton of fun.

In that book, the author dedicates a chapter to virtual ants, and evolves programs for the ants that control where they move and what search strategies they use based on sensor inputs. And that's by far not the most interesting type of program he evolves. It's a thick book, and there are things like evolving a program to drive a tractor trailer and back it into a loading dock.

As a little bonus, this book was how I ended up understanding the vital importance of AST's, and it's how I first "groked" LISP. LISP isn't a pre-requisite to understanding the book, but you'll understand the big concepts by the end.

[1] http://www.amazon.com/Genetic-Programming-Computers-Selectio...


Thanks for this recommendation... I will definitely check out the book myself. I went off the rails a bit and tried something complex in my final year of university with a sensor input based system using emotions to try control behaviour.

https://medium.com/@dshields/working-with-emotional-models-i...

I really want to get back into it and finish off the project properly so this chapter on virtual ants sounds like a good place to start.


I just read your fascinating and fun paper. Your interest expanding your model using genetic algorithms will be well-served with his book. Last time I checked, a good amount of Koza's work was available online if you want to take a peek earlier, but it's been a few years since I looked.


Koza's text is good, but, depending on the student, may be a little deep to start with. I's suggest A Field Guide To Genetic Programming [1] as a better start for most programmers, and then follow up with Koza's books.

[1] http://www.amazon.com/Field-Guide-Genetic-Programming/dp/140...


Hi, I'm the author of the program, I just saw this post.

The evolution process here is about inheritance and variation of static attributes of the creatures like speed, vision range, etc...

Evolution of behavior is a very fascinating subject but was not something I originally planned to include in this project, so I hope I didn't disappoint anyone ;)

If there are any questions, feel free to ask.


There were some fine games like this in the 90es: https://en.wikipedia.org/wiki/Evolution:_The_Game_of_Intelli...


I was thinking about the series, even earlier (Commodore 64): https://en.wikipedia.org/wiki/Creatures_%28video_game%29


Reminds me of the beginnings of an open source version of this: http://speciesgame.com/

Unfortunately Windows only, but it's a pretty neat little evolution simulator.


NetLogo: agent-based programming language http://ccl.northwestern.edu/netlogo/


Related: http://swimbots.com/

Similar evolution simulator with more complex 'physical' phenotypes.


Any chance of an OS X port?


Author here: I tested it on Windows and Linux, but it should work on OS X, too.


I have tried to run it on OS X and it doesn't work! I do not have time now for further research, but I am trying again later


Did you build it with gradle or run the release jar? (It's built on Windows with Java 8) If you get an error message or find the problem it would be cool if you message me.


it's plain java - should be no problem.


Awesome - always was excited by evolution simulation


This is how it begins...


How what begins?


It!


Let me tell you a story about Skynet...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: