Author Topic: Ways to increase natural selection?  (Read 16747 times)

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Ways to increase natural selection?
« on: May 01, 2008, 06:54:24 PM »
Average fitness of species depends on two factors. Mutations mostly reduce fitness by breaking and mutation DNA and natural selection increases fitness, favoring those whose genomes survive better. In basic DB sim the enviroment isn't very complicated and doesn't encourage very complicated behaviour. What I'm hoping for is some simple or not-so-simple ways to encourage evolution of more interesting bots.

Off the top of my head, I can think of enabling corpse mode with low enough decay rate, adding some shapes that bots can see, running non-toroidal sim or running a sim in internet mode. Of course, creating a stable ecosystem with two or more species co-evolving would be the ultimate goal, but that's a tad hard to archieve.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Ways to increase natural selection?
« Reply #1 on: May 01, 2008, 07:11:05 PM »
I have managed to get Animal Minimalis and Enitor Comesum co-evolving in an evo sim.  The alga was being fed per veggy instead of per kilobody (this was before I added the per kilobody option), so it evolved to be cancerous.  The enitor comesum just couldn't eat the veggies faster than they could reproduce.  Each veggy tended to have very little nrg, usually around 2 or 3, so the bots had a really hard time gathering enough nrg to stay alive.

Ultimately the sim died when the alga evolved a vibrating wiggle that made it difficult for the enitor comesum to keep the veggies visible.  The population for the enitors dropped to a few dozen, which wasn't enough to prevent deadend mutations and I gave up the sim.

Moral of the story is that you can get co-evolution, but you have to be willing to start with something that is evolutionarily stable.  Cancerous veggies and cannibots aren't very aesthetically pleasing, but they play well together in an evo sim, if you can afford to have 10x the number of veggies as animals.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Ways to increase natural selection?
« Reply #2 on: May 02, 2008, 07:30:47 AM »
Another way of favoring natural selecting is having a low amount of food, saw someone has evolved a very interesting bot behavior this way, can't remember wich topic.
Anyway I tryed running a similar sim, using the newest neural network base I managed to put together (Thanks to a lot of sugestions).
It only uses point mutations, and not too often, oscilating between 16 and 1/16 mutations. (Only spending a short time with 16* mutations)
I've slowly reduced the mutations and food over time.
It's a size 13 field and it has a veggy repop of 25 with 1 veggi spawning and a lower max veggy... basicaly there's always 25 veggies...
I have normal F1 costs, but I had to reduce the movement costs to next to nothing, also cut the code execution costs and set age costs to set in at 5000 cyles and increase slowly.
Everything else is standard F1 settings...
It seems like the bots have evolved a very starnge behavior when eating an alge, it spends most of the time firing in any other direction than the alge, and only feeds on the alge when it has a different speed (So if another bot is trying to "steal" the alge it tryes to kill it).
The alge doesn't last forever this way, but it does manage to get a lot more energy from the alge than if it has just eaten it right away.
It also uses reproduction as a defence mechanism... whenever it's in pain or getting shot or something (Not sure exactly whats going on) it starts to spawn several new offspring.
It also seems like some of them make a very large child if they're getting realy big while eating an alge, leaving the small parent to start over on the alge while the large child takes off... I'm guessing this makes the alge last longer as the shots from a smaller bot are weaker...
And it actualy managed to evolve balanced shell, as I had hoped. It looks like it's triggered by getting shot, it does sometimes end up eating some of the shell... but it looks like it only happens outside of combat...

The point is that the low food favors clever bots, so it promotes more interesting behaviors...
I was running a simpler version of the network (Only 4 outputs) earlyer in a sim with plenty of food, it didn't take long for almost everything to break, it was suddenly going in one dirrection at all times, traveling at max speed and shooting constantly... Oddly enough this worked very well because of the abundance of food and worked as a sort of conspec since the bots never ran into eachother...
It basicaly just formed larger waves of bots traveling side by side.
So having too much food can promote a very simple behavior...
And I would imagine a lot of the other setting you mentioned won't have a nearly as noticable effect if the food is abundant...

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Ways to increase natural selection?
« Reply #3 on: May 10, 2008, 08:09:05 AM »
Quote
Cancerous veggies and cannibots aren't very aesthetically pleasing, but they play well together in an evo sim, if you can afford to have 10x the number of veggies as animals.

Had an evobot that actually regained their conspec recognition to a degree. Had to become a full canni to get there though... I think that randomly shooting a fellow member is okay in the bot's world, but deliberatly hunting is the more destructive behavior.

Uses the oddball *.eye5 *777 *.in2 ~= to ID older species members(in2 is randomly increased, 777 is zero). I'm still trying to figure out exactly how it's working so we can make use of it. I think it might just be because of the veggies' *.in2 being zero, but I've yet to test it.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Ways to increase natural selection?
« Reply #4 on: May 12, 2008, 01:28:45 PM »
It definately seems like it's a sort of vegan conspec
Still nice though, in the bots world it's the only difference it needs to reconize at that point.

The bots in my sim don't seem to have a conspec, but they all move in more or less the same direction wich seems to make confrontations rare.
They rarely fight over anything other than an alge, since the bots recently got very good at keeping the alge alive it seems to be getting more important to be able to "steal" an alge from another bot since all the alge are usual occupied.

But what I'm realy hoping for is a predator that feeds mostly on other bots. I've seen a few bots grow big and travel in the oposite direction to harves oncoming bots. I even saw one that seemed to actualy reproduce... but they've always had some problems, usualy they just don't reproduce, and the one I saw who did had it's aim broken and shoot comands broken.
The whole neural network structure is slowly being broken down, so I'm not sure how much further I can take this thing.
I think amplification could make it more interesting, but I still think I need to make a mod to actualy generate the network gradualy if I realy want to get somewhere.

Offline Gantolandon

  • Bot Neophyte
  • *
  • Posts: 8
    • View Profile
Ways to increase natural selection?
« Reply #5 on: September 09, 2008, 01:28:58 PM »
It seems that having more than two species increases natural selection.

My first simulation had somewhat mean algae (veggies, which tried to eat everything approaching), modified animal minimalis (eating body instead of energy, and growing) and a parasite. Improvement of this third species was my goal.

First I made it to attach to an organism which was turned back. Well... it weren't very successful, but a random mutation made it effective at least against the algae. Swirling in one place seemed to be a better strategy somehow, as it allowed to use the host as a morgenstern. I kept the mutated version, as it was clearly better than the original one. It still couldn't do much against animal minimalis, until I added a calming venom. It allowed to spray any organism in front of the parasite, making it not to attack this species.

Then the thing gone interesting. One particular mutation I remember was making the parasite attach not only to one organism, but virtually to anything, including their own siblings. They still sucked energy from the last organism they were attached to. A poor alga or animal minimalis couldn't do anything, as they were tied by multiple parasites. This net (or rather glue) made them unable to do almost anything. Veggies still could harness energy from the sun, but tied predators were doomed.

Then animal minimalis changed. They evolved into cannibots. Holding glue became a nice source of food for a short time, and they still could eat plants. Their reproduction slowed somewhat, but it were not a problem, as I somewhat castrated them earlier (in other simulations they were annoying me with rapid growth, so I culled their reproduction to 50 specimens). Parasites were in peril again.

Unfortunately, it was not a stable ecosystem. When I were in the kitchen, the plants somewhat eliminated everything. I still don't know how they did it...  

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Ways to increase natural selection?
« Reply #6 on: September 09, 2008, 02:07:25 PM »
Welcome to the forum.

Making stable sime with more then 2 species is kind of hard. Mostly after a time, one of the two species will extinct.
I gues this is becouse of that the enviroment in most sims is pretty simple and there is only one food source. Good you managed to do so.
The only reason algea could kil the others could be that they became carcerous. If you're using a sim where every algea gets a certain amount of nrg instead of kilobody, they could get as a group more energie this way and it means that it will get harder for preditors to get more nrg.
Oh my god, who the hell cares.

Offline Gantolandon

  • Bot Neophyte
  • *
  • Posts: 8
    • View Profile
Ways to increase natural selection?
« Reply #7 on: September 09, 2008, 04:34:23 PM »
Thanks for the welcome

Nope. I used the sun model. I have seen cancerous algae only once. It's animal minimalis which become cancerous very often (which make me furious).

I certainly would like to know how to do a stable simulation... Even with two species the plants usually live only because of forced respawn...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Ways to increase natural selection?
« Reply #8 on: September 09, 2008, 06:32:00 PM »
Welcome Ganto...

I tend to be a broken record on this subject, but part of the problem is our notion of "species".  Hand-authored bots of the same "species" only respect one another (presenting the illusion of a species) because they are coded to do so, but in reality, they are not a species in the sense that we use that term for sexually reproducing organisms, even on the first cycle when they all have the same exact genome.    Recognition of likeness for the purposes of reproduction is meaningless in asexually reproducing populations.   There is no gene flow between them except for direct line of descent.  It's little wonder that hand-coded bots in an evo sim go cannibalistic in short order.  Selection favors this since it conveys such a huge advantage to the first bot to violate the fragile and artificial (from selections point of view) conspec code.  

In evo sims, after a while, what appears to be a single species is in fact several (or better yet, hundreds) as the hand-coded conspec code breaks down and new systems evolve.  In an asexually reproducing population, the whole notion of species is suspect and may not even be relevant.  Sure, it helps to be able to recognize your offspring and not eat them, but families do not tend to group or otherwise remain in proximity and there are much easier ways for selection to avoid eating your young than conspec code.   One common way is simply not to eat (or not to be very effective at eating) heterotrophs at all.   There is no need for conspec recognition at all in a population of asexually reproducing herbivores.  All that is necessary is autotroph recognition and even then, it need not be explicit.  It could be as simple as just being a really really bad feeder when it comes to feeding upon others of similar genomes.  You may try to shoot or tie feed off your offspring or parents, but because you are so ineffective at it (they have slime or shell or similar) at least when you try it against others of similar genomes, the only things you end up really feeding off of are dumb plants.

Our genomes are too simplistic, our sims too small, our environments too simple.  There is little need for coordination between individuals and thus little reason for a bot to recognize others it might be related to as long as there is some mechanism at work, no matter how crude (like being a bad feeder) that serves to favor others of similar genomes.  

So, in most evo sims, I suspect there is more diversity then one might expect.  I have seen larger sims maintain independent families or "lines of descent" (a better term IMHO than "species" in asexually reproducing populations) for 100's of thousands of cycles.

You might try forking the species (use the Make New Species option) occasionally starting with the "Best Bot" and see how long the different families co-exist.  Family lines will eventually die out at some point as they get competed, even if families do not directly prey on one another, but you might find this takes much longer than you think.  These different families, while they co-exist, can be thought of as different species if you like since there is no gene flow between lines of descent (absent viruses).  

FYI, I will likely automate species forking in a coming version.
« Last Edit: September 09, 2008, 06:39:46 PM by EricL »
Many beers....

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Ways to increase natural selection?
« Reply #9 on: September 10, 2008, 07:54:06 AM »
I gues that if you hava a big enough sim you can keep multiple species for a long time. I zerobot-sims I had it have happening multiple times that there came multiple zerobots at some idea of 'reproducing'. It is somewhat annoying that they almost always just randomly write in their memory till they hit .repro.
Oh my god, who the hell cares.

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Ways to increase natural selection?
« Reply #10 on: September 10, 2008, 08:49:51 AM »
Quote from: Peter
It is somewhat annoying that they almost always just randomly write in their memory till they hit .repro.
Evolution is about probabilities of succes: out of all the possible combinations of BP that allow for reproduction how many include .repro? Empirical answer is that the proportion of .repro in the total space of possibilities is small

Quote from: EricL
FYI, I will likely automate species forking in a coming version.
Like the idea. Would it (ideally or eventually) include .myspecies or just the interface?

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Ways to increase natural selection?
« Reply #11 on: September 10, 2008, 12:10:58 PM »
Quote from: EricL
FYI, I will likely automate species forking in a coming version.
Well, I like the idea, if I am not wrong this was on your list for quite some time. Is there a global timeline for when anything what you stated is on the list could be finished. I believe you're pretty much filled in with suggestions and bug-fixes.
Oh my god, who the hell cares.

Offline Gantolandon

  • Bot Neophyte
  • *
  • Posts: 8
    • View Profile
Ways to increase natural selection?
« Reply #12 on: September 10, 2008, 03:32:21 PM »
Quote
FYI, I will likely automate species forking in a coming version.

That would be a great idea.

Quote
One common way is simply not to eat (or not to be very effective at eating) heterotrophs at all. There is no need for conspec recognition at all in a population of asexually reproducing herbivores. All that is necessary is autotroph recognition and even then, it need not be explicit. It could be as simple as just being a really really bad feeder when it comes to feeding upon others of similar genomes. You may try to shoot or tie feed off your offspring or parents, but because you are so ineffective at it (they have slime or shell or similar) at least when you try it against others of similar genomes, the only things you end up really feeding off of are dumb plants.

Sounds good. It's just hard to do this, when the population begin to die out too fast. I tried divine interventions, but there were not much I could do. And the plants doesn't have any chance to evolve into something really useful, as they doesn't have to with their veggie state.

Perhaps it would help if there vere a command to turn off/on veggie state in the organism? It would require a gene to harness energy from the background. Having it as an option seems to reduce the plants' potential.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Ways to increase natural selection?
« Reply #13 on: September 10, 2008, 03:42:00 PM »
Quote from: Gantolandon
Sounds good. It's just hard to do this, when the population begin to die out too fast. I tried divine interventions, but there were not much I could do. And the plants doesn't have any chance to evolve into something really useful, as they doesn't have to with their veggie state.

Perhaps it would help if there vere a command to turn off/on veggie state in the organism? It would require a gene to harness energy from the background. Having it as an option seems to reduce the plants' potential.
Veggies if they tend to survive depending on your sim(if they are just inside the sim becouse a repop it won't), they tend to evolve ways to escape their attackers. In IM there where some good examples of that.

Edit:
Oh, jep my point. If they get the chance veggies evolve too. Evolution just stears them another way.
In some situations I could see some use from of repoping of heterotrophs.

How possible would it be to add another tab to DB where hetrotrophs can repop when they died out?

Anyway, if I recall there where some ideas to make the line between veggie/normal bots some blurrier. So veggies would be able to evolve into bots and the reverse. That came into multiple practical problems.
« Last Edit: September 10, 2008, 03:51:11 PM by Peter »
Oh my god, who the hell cares.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Ways to increase natural selection?
« Reply #14 on: September 10, 2008, 04:02:24 PM »
Quote from: Gantolandon
Sounds good. It's just hard to do this, when the population begin to die out too fast. I tried divine interventions, but there were not much I could do.
Attempting to create a stable, mature, multi-species evo-sim using hand-coded bots as a starting point is the very definition of intelligent design and creationism.  It should not be surprising that it doesn't work.  Complex eco-systems are the end result of long long long periods of evolution and co-evolution.  It extremely difficult if not impossible to create something sophisticated and balanced like this out of thin air using authored organisms.  

Evolving a balanced evo-sim takes lots of time.  If you start with anything other than zero-bots, then the sim has to get simpler before it can get more complex.  What I mean by that is that all that useless, hand-authored logic (useless in the eyes of selection) has to be evolved away before selection can really begin to evolve real complexity and diversity of species.

Many beers....