Darwinbots Forum

Bots and Simulations => Simulation Emporium => Topic started by: jknilinux on April 22, 2009, 04:36:17 PM

Title: caterpillar simulation
Post by: jknilinux on April 22, 2009, 04:36:17 PM
Hey guys,

I'm trying to get a working evolution simulation of peter's caterpillars, but I'm kind of a newb to long-term evosims. Practically every sim I make seems to die out in like 10 kilocycles. So, I was wondering if someone might be able to help me with some suggestions and, if possible, a working evosim with caterpillars. I've looked at all the other threads on the topic, but nothing really seems to work...

Thanks!
Title: caterpillar simulation
Post by: Numsgil on April 22, 2009, 08:22:35 PM
Can you tell why they die?

If they run out of food, consider keeping the veggy population higher (or costs lower).  If there's food but they don't seem to be able to reach it, you need to tweak the genome to add some chance of exploration.  If one goes on a genocidal rampage and kills everyone else, you need to make the field bigger and/or add some shapes (assuming caterpillar is shape aware).
Title: caterpillar simulation
Post by: jknilinux on April 24, 2009, 01:17:09 PM
Well, they seem to kill themselves in a lot of creative ways...

Some caterpillars seem to lose their ability to contract, so they just keep lengthening, and eventually become immobile bars.
Others seem to have reproduction problems, and keep dividing until they become a huge ugly ball of fungus. Then they sit there in a unicellular cluster and do nothing...

Still others seem to break their tie-forming code, and form a pretty cool-looking "spider web", snatching any caterpillars that pass by and getting them tangled in it's mess. These guys not only kill themselves, but kill any caterpillars in tying range as well... which is annoying...

I guess these signs mean that the genome is too fragile? How do I make a genome more durable? I can't just make it have five copies of every gene, can I?

TY!
Title: caterpillar simulation
Post by: Numsgil on April 24, 2009, 02:01:51 PM
You could try 5 copies of every gene.  But mostly I'd suggest lowering the mutation rates by quite a bit.  The default rates were really just picked randomly, and are in now was a "suggestion" as to what a proper rate actually looks like.
Title: caterpillar simulation
Post by: jknilinux on April 24, 2009, 03:08:49 PM
Woohoo, got up to 27 kCycles before they all died!

I had to make a caterpillar with 5 copies of every gene, turn mutation rate down to 1/32x, and they still ultimately died because their movement genes broke...

Perhaps caterpillar is just innately too fragile? Kinda like trying to evolve Vermis P.?
Title: caterpillar simulation
Post by: Numsgil on April 24, 2009, 03:19:29 PM
Just keep lowering the rates.  You can edit the rates of the species individually to very low numbers.  Try 1 in 50000.
Title: caterpillar simulation
Post by: jknilinux on April 24, 2009, 03:24:16 PM
OK, I think I got it working...

I disabled point and major deletion. Everything left is 1 in 50000, except copy error and minor deletion, which are 1 in 5000. Still using the hardened caterpillar and 1/32x mutations.

I think what was really killing them was the point mutations... they reproduce slowly, so they'd get over 10 mutations before they had any kids... maybe that was it...

I'll keep you posted.
Title: caterpillar simulation
Post by: jknilinux on April 24, 2009, 04:55:31 PM
Ok, I have good news and bad news... I just passed the 50 kCycle mark, so now it looks like they've overcome their suicidal tendencies, but the bots are averaging just 5 mutations each...  Is it supposed to be this slow?
Title: caterpillar simulation
Post by: Numsgil on April 24, 2009, 05:29:36 PM
Yes.

For most bots I try to aim for no more than 1 mutation per 2 generations.  But a larger genome can usually withstand some higher rates.
Title: caterpillar simulation
Post by: jknilinux on April 24, 2009, 09:04:47 PM
OK! Thanks numsgil! This is the first time I've reached over one megacycle with anything... and the caterpillars are still going strong!

In case anyone's interested, they're still forming coherent MB's and no cannibalism (yet XD).
Title: caterpillar simulation
Post by: Prsn828 on April 24, 2009, 11:06:24 PM
Hmm, yes, I am never so patient.
I do think point mutations serve an important role before a bot is able to reproduce, but other than that, it is pointless, just a wrench in the plans of good evolution.
Title: caterpillar simulation
Post by: jknilinux on April 25, 2009, 01:31:12 AM
Update:

Passed 2 mC, still looking good...  And absolutely NO CANNIBALISM! Isn't conspec usually one of the first things to go? What's going on?

Average mutations = 60. Movement is still very good, even though it requires teamwork. Size 3 arena, 5-10 algae, 20-80 bots (10-40 organisms). 0% movement efficiency.

So anyway, are these results unusual? Is the population going to be prone to genetic drift with these levels? KTHXBAI
Title: caterpillar simulation
Post by: Numsgil on April 25, 2009, 02:54:34 AM
How many generations?
Title: caterpillar simulation
Post by: jknilinux on April 25, 2009, 03:53:21 AM
Sorry, dumb question... How do I check that? I didn't turn on any graphing for utmost speed.

Right now, 27000 born, 2.9 mC, still no cannibalism, though they are now tying with everything in sight again, forming big ugly globs...

Average mutations = 80
Title: caterpillar simulation
Post by: Numsgil on April 25, 2009, 11:38:28 AM
There should be a counter when you look at a typical bot's info.
Title: caterpillar simulation
Post by: jknilinux on April 25, 2009, 01:55:52 PM
well they all died again for unknown reasons, just reverted back to last save @ 1 mC, average generations = 200.
Title: caterpillar simulation
Post by: Numsgil on April 25, 2009, 02:24:08 PM
Looks like your mutation rates are about spot on or a little low.  If they're still dying it's probably not from mutations.
Title: caterpillar simulation
Post by: Endy on April 25, 2009, 06:38:38 PM
Some of it's genes aren't all that good for evolution, like the retaliation one. Any sort of accident/mutant can cause them to start attacking each other. Most of the defensive genes could also be left out.
Title: caterpillar simulation
Post by: ikke on April 26, 2009, 01:43:44 PM
Quote from: Endy
Some of it's genes aren't all that good for evolution, like the retaliation one. Any sort of accident/mutant can cause them to start attacking each other. Most of the defensive genes could also be left out.
There are no bad genes for an evolution sim. Just see what happens in the sim.
Title: caterpillar simulation
Post by: Endy on April 29, 2009, 04:23:04 PM
It's not really that they're bad, it's just it'll make it more likely to have one bot start a chain reaction. Each bot giving tit-for-tat until they inadvertently wipe themselves out.

Poison and venom are just kind of pointless in evo sims, since they don't impact their own species.
Title: caterpillar simulation
Post by: Prsn828 on April 30, 2009, 10:13:01 AM
Quote from: Endy
It's not really that they're bad, it's just it'll make it more likely to have one bot start a chain reaction. Each bot giving tit-for-tat until they inadvertently wipe themselves out.

Poison and venom are just kind of pointless in evo sims, since they don't impact their own species.

If I may, I would like to correct you on some things.

First, a chain reaction would only occur if the mutation rates were really high, or you had really bad luck, but since the mutation rates are always pretty high, unless you want to risk an overflow error, luck has nothing to do with it, you simply can't prevent it, except by disabling point mutations.

Second, nothing is useless in an evo-sim.  Evolution has the inherent property that it will make use of anything and everything at its disposal.  Even weakness is often embraced by evolution in favor of a way to specialize.

But I do understand what you were thinking.  DB2 has a poor system for evolving things, so it is hard to understand where things go wrong.  Just remember, evolution never tries to destroy itself; that is why humans still exist
Title: caterpillar simulation
Post by: Peter on July 13, 2009, 12:55:40 PM
Interesting,  the keeping of conspec rec. is not normal in evo. sims. Especially after I looked back the dna of caterpillar, the conspec is a pretty specific check(comparing refkills with in6). Meaning with no cani-bots, there are 2 genes being unaffected.
Only reason I can find for that is the retaliation gene. Problem of that one is one mutated bot can start a chain and kill everything, like Endy said.
That random bot has a high change of being killed at once, due to the agressive retaliation gene. But if it survives long enough it can put up multiple bots "defending" against each other instead of the aggresor.

The stopping to retract, obvious comes from a broken tie moving gene, that isn't fixing or unfixing. I think that could be fixed(less affected by mutations) by having the multiple genes in a nifty formula in one gene instead of indepentant genes.

Tieing to everything, is a broken born and connect to original gene. Extra condition and it shouldn't happen. (unless the not always needed condition mutates out first)

Problem overall with hand-made bots. They didn't came out of a evolved bot, there are parts that can't handle mutations well, or in this case also an overreactive defence system that can't handle others mutating well.

Can you upload a sim-file, if you still got it? I'd like to see what happened.
Title: caterpillar simulation
Post by: jknilinux on July 13, 2009, 09:58:28 PM
sorry peter, I haven't been doing much DB at all lately, so I don't have it. But, I'd like to see the results other, more experienced users can do with the caterpillar. If I do get back into DB, it'll almost certainly be after at least 6 months. Good luck!