Author Topic: South Pacific Sim  (Read 3126 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« on: April 07, 2006, 02:46:17 PM »
Looking for stress and stability bugs in 2.42.1, I needed to construct long running sims (> 1M cycles) at the largest field size where I could have complex bots with lots of mutation evolve indefintly without runaway selection or other short-sighted adaptations causing the entire sim to go extict - a common occurance in some of my previous evo sims where bots evolved to kill off all the plants or became canibalistic, forgot about plants, and killed each other off.

I also wanted to try to keep the bot population somewhere around 1000 or so; low enough to keep things moving fast and not bump up against the artificial 5000 bot limit but high enough to get some real population variation and mutation in different directions.  Additionally, I wanted population isloation.  That is, to set up an evironment where speciation would occur.  I wanted enough isolation that it was difficult, but not impossible for bots to migrate from one local ecosystem to another without using walls.

The solution was to create a veggy "chain of islands" not unlike the Pacific Ocean Island chain.  What I did was use a small number of very high energy, stable, fixed veggies - no more than 25 or so for the largest sim size and strung them out across the screen.  Each "island" provided essentially infinite food, but physical access to that resoruce is limited by space.  Each island is far out of sight form the other, so bots have to balance staying put and competing for a limited resource versus venturing out into the blue and taking their chances on finding a new undiscoverred resourse in some random direction.

I wanted to favor DNA complexity, so I removed all the costs on DNA operations so that having a longer DNA or executing more genes is not in and of itself disdvantageous.  But I had to tax something to provide selective pressure so there is a body upkeep cost of 0.1 per cycle as well as costs on things like venom and shell.  This way, DNA complexity can evolve and selection favors action effeciency.  They have to eat, they to have to find food and compete for limited resources or they will die.  The genes they use to do that can be as many or as complex as they need.  Generally a bot with typical energy can live long enough to reach the next island if they happened to set out in the right direction, but if they didn't, leaving your island tends to be fatal.

The limited number of veggy islands, the restrictiosn in physical access to these resources and the body upkeep cost tends to keep the population between 1000 and 15000, about where I want it.  (I actually had to increase the body upkeep cost over the first few 100,000 cycles as bots got more effecient.)  Sometimes a population spike or fall off will occur as a bot evolves cannabalistic tendencies or some other new short term strategy that gives individuals massive advantage in the short term, but if such an adaptaion is disadvantagous for the species and ecosystem (will leads to extinction relatively quickly) it won't spread to all the islands due to the time and cost it takes to do so.  Island populations can go extict, but they get resettled eventually by populations from surviving islands which did not develop the fatal adaptation.   Thus, the sim as a whole never seems to die.  Things change, sub species change and evolve, and go extinct, but the sim as a whole lives on.

The Settings file is attached.  I'd attach the sim, but even zipped, its 818k...

-Eric
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
South Pacific Sim
« Reply #1 on: April 07, 2006, 03:09:12 PM »
Nice idea, I think that's how other Alife sims tend to tackle similar problems.  As long as you're shuffling the island populations from time to time it should help keep the bots from suiciding.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
South Pacific Sim
« Reply #2 on: April 07, 2006, 03:23:45 PM »
Did you try running this in zero-momentum mode?
I have been getting good results when trying to restrict movement by doing that lately.

BTW. Where do I get the robots? They aren't in the zip.



Hey Num!

What's the deal with the monkey?
« Last Edit: April 07, 2006, 03:28:01 PM by PurpleYouko »
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« Reply #3 on: April 07, 2006, 03:31:00 PM »
Quote
Did you try running this in zero-momentum mode?

I have not.  I may try that next.  As it is though, it's sufficiently difficult for bots to migrate between islands that each evolves it's own little local sub-species.  I can actually zoom out and see that each islands has it's own unique color of surrounding bots, where the colors of islands in close proximity are more similar than those far apart!  Way way cool.

Quote
Hey Num!

What's the deal with the monkey?

He went extinct.  His avatar got populated from an adjacent island.  
Many beers....

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
    • http://community.webshots.com/user/objack2
South Pacific Sim
« Reply #4 on: April 07, 2006, 03:34:47 PM »
no doubt I'll have to decrease the field size.
I'll try to compensate by scaling down the pop of veggies and starting bots
and see if it's still works and is interesting.

I'm always tring to find was of isolating populations ...
using gravity and selective placement windows for veggies up hgh
or along one edge.
I wonder if it possible to have mulitple placement windows for veggies?
I've tried having more than one species of veggie ...
but seems the prog ends up only doing repop events for one of them.

ok
more ideas to play with.

Eric ...
are you retired, independantly wealthy with time on your hands ...
or do you do all this in you 'spare' time.
hmmmm ....
or perhaps locked up somewhere in a correctional facility with
only a computer and internet connection.

whatever ...
glad you're doing it.
« Last Edit: April 07, 2006, 03:36:13 PM by Griz »
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« Reply #5 on: April 07, 2006, 03:47:24 PM »
Quote
or perhaps locked up somewhere in a correctional facility with
only a computer and internet connection.
Hey, she swore she was 18.  How was I to know?

Actually, DB is the best way I've found to not work on my novel.  
Many beers....

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
South Pacific Sim
« Reply #6 on: April 07, 2006, 03:50:35 PM »
Quote
I wonder if it possible to have mulitple placement windows for veggies?
I've tried having more than one species of veggie ...

No it isn't currently possible, however you can have multiple identical species that have different locations.

Quote
but seems the prog ends up only doing repop events for one of them.
Yup. That it does.
It should be pretty easy to change that though. Just randomize the species on a re-pop event and do it again if you get a non-veg.
One of the simpler parts of the code.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
South Pacific Sim
« Reply #7 on: April 07, 2006, 05:29:37 PM »
Quote from: EricL
Actually, DB is the best way I've found to not work on my novel.  

Amen.  Hehe.

Quote
Hey Num!

What's the deal with the monkey?

Since I had to upload a new avatar anyway, I went for one that was actually new.
« Last Edit: April 07, 2006, 05:30:24 PM by Numsgil »

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
    • http://community.webshots.com/user/objack2
South Pacific Sim
« Reply #8 on: April 07, 2006, 08:00:45 PM »
Quote
Quote
but seems the prog ends up only doing repop events for one of them.
Yup. That it does.
It should be pretty easy to change that though. Just randomize the species on a re-pop event and do it again if you get a non-veg.
???
are you talking about recoding?

I guess currently the first veggie species is locked in ...
so that needs to be randomized ...
and then checked to see the species selected is a veg ...
if not,  randomize again?

if this is so ...
then it could be a different species, yes ...
as long as it was recognized as being a veg?

can you point me to where?
and a hint at the code?
« Last Edit: April 07, 2006, 08:02:46 PM by Griz »
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
South Pacific Sim
« Reply #9 on: April 07, 2006, 08:09:11 PM »
Quote from: Griz
can you point me to where?
and a hint at the code?

Check in the vegs module.  I don't remember the function name, but it's not a large module so it shouldn't be too hard to rat it out.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« Reply #10 on: April 08, 2006, 12:29:29 PM »
Just FYI, I'm approaching 1M uniterupted cycles on this sim.  Populations still surprisingly steady between 1000 and 1500.  Average bot has over 100 cumulative mutations now.  Average DNA length has actually fallen a few percent from the starting organism (still around 361bp though).  Hmm.  I would have expected it to rise.  I'll have to check the mutation percentages.  

The range of bot colors is amazing, from deep purples and dark blue in the upper left corner through light blue and light green in the middle, to dark green and brown in the lower right.  Amazingly cool.
« Last Edit: April 08, 2006, 12:30:49 PM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
South Pacific Sim
« Reply #11 on: April 08, 2006, 12:46:45 PM »
How uniform are the colors in each of the little islands?  Personally I try to create settings that limit diversity in environments, sicne, as my reasoning goes, if you have as many different colors as you have bots you must not be strongly selecting or mutation rates are too high.

I have no idea how valid that thinking pattern is though.

As to DNA lengths, generally the first things bots mutate effectively are deletions or inactivations.  You'd be surprised at how mnay things we give our bots to be "better" seem to be the first to drop off.

Whereas insertions of new matterial is quite dangerous, since it could really be anything.  So maybe there's a selective pressure against the insertion of new code, which is why your bots aren't growing in DNA length.

Just a thought, agian, this is really a grey area.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« Reply #12 on: April 08, 2006, 01:00:59 PM »
I have 25 islands.  In 15 or so, all the bots around an island are the same color.  Each island is very uniform, though colors between islands can be quite different.  Colors for bots around islands near each other are more similar than islands far apart.  In the other 10 cases, there are multiple colors.  In some cases, the colors are extremenly close, so I think it's just recent mutations.  In a few others though, there seem to be multiple species co-existing.  I'll try to attach an image...

Hey, it worked.  The image on the left shows an island with multiple colors.  There are only a few of these though they seem pretty stable.  This one has been showing multiple colors for at least 100k cycles.  The image in the middle gives an example of what most islands look like though each has it's own color.  The image on the far right shows that some island populations have evolved very visible traits such as spewing shots though in general, most island populations seem to favor ties over shots.
« Last Edit: April 08, 2006, 01:13:58 PM by EricL »
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
South Pacific Sim
« Reply #13 on: April 08, 2006, 01:17:53 PM »
Here's an image of the whole sim.

Damn, it's too big.  I'll try a clipped view of just part of the sim.  Let's see if the colors are visable at this resolution...

This represents the upper left quadrant of the sim.  Note that some of the islands have been pulled out of place.  They used to form a nice little chain but the bots seem to be able to tug them around at least a little bit and maybe even get one to no longer be fixed.  Memory shot maybe?
« Last Edit: April 08, 2006, 01:22:46 PM by EricL »
Many beers....

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
South Pacific Sim
« Reply #14 on: April 08, 2006, 05:11:56 PM »
Yeah, I got that when I was doing an evo sim. Somehow, the bots find a way of unfixing all the vegs