Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

A while ago I made Conway's Game of Life. I'd like to make something similar (in C++), where each cell would exhibit behaviours such as:

  • Movement
  • Reproduction
  • Killing of other cells (moving onto another cell, for example)

Over time, the cells would 'learn', and I'd (hopefully) end up with a set of behaviours that are beneficial to the ecosystem as a whole, rather than the individual cell.

I'm 100% sure that this isn't new, but I don't know:

  1. What technical terms cover what it is I'm trying to do (what keywords cover my aim such that I can search for other implementations),
  2. Resources, preferably online, although dead-tree style is also good, which would be beneficial reading for this type of programming.
  3. How I should implement this (#2 would help with this); I can modify my cells to do some things (moving, for example), but I'm not sure how I should implement the learning; should I be using a genetic algorithm or is some other type of evolutionary algorithm better suited?
share|improve this question
Related: Have you looked at .NET's Terrarium game? It's similar to what you describe. –  Steve Evers Mar 9 '12 at 20:03
I haven't - I'll look into it. Thanks :) –  simont Mar 9 '12 at 20:21
hooray for Spore(tm)! –  Muad'Dib Mar 9 '12 at 23:16
Not quite the same but interesting and close: en.wikipedia.org/wiki/Core_War –  James Youngman Mar 10 '12 at 0:42

1 Answer 1

up vote 1 down vote accepted

What you seem to be looking for is the science of cellular automata. A good introduction you may find in the wiki. A common way but not the only one to implement these is by using finite state machines. You cab certainly choose genetic algorithms to implement learning, but first try to figure out what exactly you want. With these concepts you should be able to find resources and books.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.