In January 2013, I started working on an evolution simulator, but I never finished it. The simulator lay dormant for two and a half years. Until now! Just this week I have resurrected it, and it’s time to see the (almost) finished product! Since there are no creatures yet, create 1000 creatures. They will be randomly created and also very simple. Wait, before we get started, I should tell you what a creature *is*. Every creature has an internal clock, like a heartbeat, except that it never changes speed throughout the creature’s life. This is a node. Nodes can vary in friction, from white being very low friction, to black being very high friction. Nodes collide with the ground, but they don’t collide with each other. Two nodes can be connected with a muscle. Muscles have many more traits than nodes. They have an extended length and a contracted length. They also have an extended time and a contracted time. which are based off of the internal clock. Finally, muscles have strength. Basically, a muscle is rarely exactly the length it’s trying to be. It’s always trying to push or pull its two nodes so that it reaches its target length. How hard can it push or pull? That’s its strength. The higher a muscle’s strength is, the more opaque it appears. Okay, so who gets to determine all these traits, like how friction-y nodes are, or what muscles’ contract times are? Well, at the beginning, it’s just random chance: They’re randomly generated. So, here are our 1000 randomly generated creatures. Their goal is to run as far as possible to the right in 15 seconds. They don’t know that yet, but it’s true. To start off, let’s do a step-by-step generation, to see what’s going on behind the scenes with every generation that happens. Here is our first creature! It’s got just 15 seconds to prove how well it can move to the right. But it’s not doing very well. It’s just getting up and then collapsing, and then getting up and collapsing. I mean, it is going right, which was the goal, but it’s not going very fast. 0.86 meters — Can the next creature do any better? Unfortunately, when all nodes hit the ground at the same time, that’s pretty much it for the creature, because at that point, there’s really nothing to push or pull against, so the creature just can’t move anymore. So this collapsed triangle gets a measly negative nine millimeters. We’re going to speed up the playback right now, so we can get through all 1000 creatures in time. Also, look how symmetrical this creature is! But it still moved backward. Our fourth creature has what looks like a sail sticking up in front, but it’s not catching any wind. Because these creatures were randomly generated, I think it’s fair to say that about half will go left and about half will go right. That is, if you don’t count the ones that don’t move at all! Oh, I forgot to mention that a creature’s position is determined by the average position of their nodes. So a creature can’t just fling one of its nodes really far forward and get an unfair advantage that way. Now we’ve seen 10% of the creatures. But don’t worry, it’s going to speed up really fast from here. All 1000 creatures have been tested. You can see creature 1 in the upper left — that’s the one that kept collapsing and getting up again. And here’s the rest of the first four. Well, anyway, let’s sort them all, from fastest to slowest. Going backward is considered very slow. Here’s our first creature. Despite all of its stumblings, it still managed to rank 26th out of 1000 which puts it in the top 3%. I guess it’s not hard to do well, when your competition is all randomly generated! Creature 195 managed to do the best out of all 1000, traveling almost 2 meters in just 15 seconds. Just watching it, though, you can tell that improvements can be made. Who was the slowest creature? Well, that’s creature #331, who traveled even further than the fastest creature, but backwards. Ok, let’s kill the 500 slowest creatures. Boop! To be specific, there’s a slight gradient, allowing some lucky slow creatures to survive, and some unlucky fast creatures to die. But overall, the faster you are, the more likely you are to survive. Hooray for creature 1, who, as expected, survived, and gets to pass on their genes! Creature 2 and 3 died, though; they were too slow. And creature 4, right around the middle, survived also. As we reproduce, you can see how the gene pool slightly improved, due to this killing of the slow and spreading of the fast. Also, the new offspring are slightly mutated from their parents, again randomly. Nodes might become more or less friction-y, and muscles might gain or lose strength. Less frequently, bigger changes will happen, such as losing or gaining nodes or muscles entirely. But those are rare, and again, are determined randomly. Reproduction here is asexual, so there’s no mixing of the genes. I know that could be a major setback for the creatures., but I’m sure they’ll still get by fine.

Tagged : # # # # # #

Dennis Veasley

100 thoughts on “Evolution Simulator (Part 1/4)”

  1. If I were you I would determine the fastest based on absolute value instead of regular value, because at 4:17, the last place creature actually moved the farthest, just in the wrong direction.

  2. Fuck, one of my creatures formed a sort of neural network out of it's muscles and now it wants to take over the world!!!

  3. This is dope! You can improve the accuracy by making the random depend on dominant and recessive traits

  4. This guy sounds like Big Gay Al from South Park. Especially when he said, "Here's our first creature!" at 1:46.

  5. I would have thought that if you took the "slowest" few (i.e. the ones who were fastest going backwards), and reversed them, they'd be among the fastest going forwards.

    So a better algorithm (in the early generations at least) might be to take the modulus of the distance gone, and reverse the ones with a negative distance.

  6. Moving towards negative distance was actually more distance than the ones moving positively. But you killed them

  7. Evolution is mindless chaos, why are you assigning it parameters? Why are you directing Evolution? When did Evolution get Parameters? From Whom? Why not do TRUE Evolution and not give any parameters and no materials? You are inconsistent with what you believe.

  8. What if you took the creatures that moved backward and reversed their structures so they go the right direction?

  9. Sorry to burst your bubble here.. The DESIGN of the creatures ie the specific parameters which define what they can or cannot be, was an intelligent choice. All the simulation does is optimize those parameters toward a specific objective. Conceding fitness for survival is a guiding principle toward greater fitness in a given environment and random mutations happen the real problem is the Second Law.

    By that law the creation of order must be accompanied by a greater increase in disorder in the surroundings. In all evolution models random change or mutation is the mode of 'DESIGN' (creation of new information). Disorder is measured by a change in entropy which is a change in the number of ways a system of particles can be arranged. So the increase in disorder in the surroundings is proportional to the number of changes (mutations or generations) it has to perform to reach any goal.

    This introduces the problem of SCALE. The number of mutations is NOT proportional to the size (number of ordered particles say N) of the system it is an EXPONENTIAL function of N. For anything like the size of the average protein molecule this number is truly incomprehensible meaning there is not enough time in the whole universe to 'evolve' even a basic protein.

  10. Not evolution if its completely random from generation to generation, you'd have to allow creatures to pass on traits that work. And traits that dont work dont survive, as in "natural selection". Love the idea though Professor Wilson- "Awesome dont change a thing, add to then continue! Shit this isnt my class!"

  11. You should take the absolute value, because travelling backwards is travelling. So actually, the "slowest" creature was actually fastest.

  12. This is not a needed simulator. The principle of evolution is very simple and we all understand it, no need for a simulator. That is also why evolution is a philosophical trap: there are no known mutations that we can see that increase the information in the genes, it all takes place in the mind.

  13. This simulation have rules which make the game create creatures that fits the game. It is more like a God above creating rules and make the creatures evolve around the rules, with no imaginative freedom at all. The source code makes the creature go right or left, forcing it to learn to go only right or left, that is not evolution, that is selective breeding. This (Natural selection) works, but there are no known mutations that we can see that increase the information in the genes, therefore evolving new kinds of animals is only a fantasy.

Leave a Reply

Your email address will not be published. Required fields are marked *