Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - The_Duck

Pages: 1 [2]
16
Evolution and Internet Sharing Sims / Thoughts on speciation
« on: April 07, 2008, 04:03:34 AM »
Quote
Looking at nature I think the trick is population sizes. Right now we have populations in the hundreds, or maybe thousands. But there are millions or even billions of life forms in most ecosystems. The size involved helps create stability, which in turn helps encourage speciation.

[!--quoteo(post=1375405:date=Apr 7 2008, 02:39 AM:name=)--][div class=\'quotetop\']QUOTE ( @ Apr 7 2008, 02:39 AM) [a href=\"index.php?act=findpost&pid=1375405\"][{POST_SNAPBACK}][/a][div class=\'quotemain\'][!--quotec--]I tryed running a larger field with pacifist in it... the whole thing froze somewhere around 9000 bots... and 9000 cells realy isn't much... I have a more exiting eco system going on in my mouth.
Just saying you can't expect the same degree of evolution to arise, and I can't think of any way you could compensate for the fact that evolution is just a lot more stable with 5 gazillion cells than it is with an average of a couple of thousinds.[/quote]

Yeah, I agree; our pathetic processor speeds compared to the machine that the universe runs on make it hard to hope to evolve the same complexity. But I think we can probably handle more than a 2-species ecosystem.

17
Evolution and Internet Sharing Sims / Thoughts on speciation
« on: April 07, 2008, 01:31:27 AM »
Disclaimer: I'm new to this, so take the below with as many grains of salt as you think prudent.

As I understand it, the steady state of pretty much all evosims, when run long enough, is one with exactly two species: one heterotroph and one autotroph. There's simply not enough diversity in the environment to support many species: two heterotroph species or two autotroph species are always competing for the same resources, and one of them will be better at getting them, and will win out. This is a bad thing if we want complex ecosystems to evolve.

We can create some diversity in the environment by running several sim instances connected by teleports. We can even create a "frontier" by making a bunch of sims in a row with gradually changing settings, ranging from easy-living to extreme unlivable conditions. Someone should try this; I think it will induce speciation as organisms emerge that can survive farther and farther into the frontier.

However, this is not enough; while a frontier like this might induce speciation, the two species won't mix; they will stick to their own habitats, to which they are best adapted, and repel intruders. We want to get two species to coexist stably in the same sim.

OK, how about looking at real life. In nature, animal species always differ in certain key areas, or they would compete too fiercely with each other and one would die out. Species distinguish themselves by things like
-what they eat
-where in the habitat they live (I.e., tree-dwellers and ground-dwellers)
-the size scale they live on (I.e., insects do not really compete with mammals, even though they may live in the same places and eat the same stuff)
-any other important stuff?

If two species do not share all of the above characteristics, they can probably coexist peacefully.None of these really work in DB, though (maybe pond-mode and/or gravity allows species to specialize in certain areas of the habitat?). The habitat is pretty homogenous, there is only one food (the veggie), and all bots are pretty much the same size. Perhaps we could create some diversity in food sources, though. Can an environment be created in which several significantly different autotroph species stably coexist? The competition between autotrophs is at least as fierce as that between heterotrophs: the species that is best at not being eaten will be the sole survivor.

Perhaps I simply don't understand how to set up a stable predator-prey environment in DB. In the sim I'm running I got frustrated trying to get a predator-prey equilibrium and took an easy way out by forcing total sim energy to remain constant, eliminating population spikes and crashes. This method, though, won't work if there are multiple autotroph species; one of them will still outcompete the other. However, if you have, say, two different veggie species and two different heterotroph species that each eat different veggies, it should be possible for each food chain to reach a predator-prey equilibrium. But I foresee problems arising when a heterotroph emerges that can eat more than one kind of veggie at least moderately well: it will hunt one veggie to extinction before its population crashes, and then you have lost the diversity in food sources and the whole sim will collapse to a two-species sim.

So why doesn't this happen in nature? Well, different plant species occupy different parts of a habitat; for example, there are different plants at different heights in a rainforest. This can't be all that keeps plant species from outcompeting each other though; how is it that many plant species coexist on the forest floor? I don't know.

So I guess what I'm thinking is that it should be possible to arbitrarily vary the sim settings at different areas in the sim, providing sub-habitats suitable for distinct species of autotrophs and heterotrophs. This is pretty much what inter-sim teleporters provide, but it is hard and ugly to set up teleporters to create many distinct subsims and gradually varying conditions.

Is it possible to modify the new bucket code to allow for different sim settings in different buckets? It would be especially neat if the settings could change over time.

Is the code at http://opensvn.csie.org/DarwinbotsVB/ current?

</rambling>

18
Suggestions / disable different shot types
« on: April 06, 2008, 05:47:57 PM »
What about an evosim where heterotrophs and autotrophs co-evolve? Autotrophs by definition make their own energy instead of getting it from food; there should at least be an option to disable shooting autotrophs, which will clearly destroy the balance of a coevolution sim.

19
Darwinbots Program Source Code / Perf changes in 2.43.1f
« on: April 06, 2008, 03:05:27 AM »
Very impressive speed improvement: I've gone from 10-15 cycles/sec in 2.43.1e to 40-45 cycles/sec with 2.43.1g!

20
Evolution and Internet Sharing Sims / First Evosim
« on: April 05, 2008, 08:29:49 PM »
Quote from: Numsgil
Animal minimalis has several redundant conspec recognition conditions.  It looks like the code that approaches enemies and turns away from friends are both causing it not to eat friends, even though the middle gene that actually eats stuff would let it.

Ah, that would explain it. Occasionally they do shoot a shot or two at each other before they can turn away.


Quote from: Numsgil
What's your #mutations / #generation ratio?

The generation number on the bot info panel seems not to be working properly; a bot I selected claims to be of generation 9, which is clearly impossible. However average age is currently around 2000, so that gives 2500 generations over 5 million cycles. 50 mutations / 2500 generations = 1/50. I saw something recommending a ratio of 1/2, so I guess I should up the mutation rate?

21
DNA - General / How do they reproduce?
« on: April 05, 2008, 05:05:46 PM »
Quote from: EricL
The integer stack is not cleared from one gene to the next.  So the values pushed on the integer stack buy early genes (1 and 2) get stored to .repro when gene 6 fires.

But I count 22 integers pushed on to the stack while all of the operators/stores before .repro would consume 25 integers.  

22
Evolution and Internet Sharing Sims / First Evosim
« on: April 05, 2008, 04:57:06 PM »
The sim has reached 72 hours and almost 5 million cycles. Maintaining the total energy of the sim at a constant level makes the sim extremely stable, with bot populations in the range of 150-250 and veggie populations in the range 50-100 (I abandoned having a shepherd).

I'm running at an 8x mutation rate, which is perhaps not good for the bots' fitness but makes things go more quickly. Average # of mutations has reached 54, which is about the length of the original Animal Minimalis genome. I wrote a little program to parse .sim files and produce a phylogenetic tree based on mutation histories. Here's the relevant bit of the tree:

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']4415480 (177)
  4427017 (177)
    4470413 (177)
      4571230 (142)           ----------4
         4790644 (138)
           4793476 (138)      ---------87
           4912239 (1)        ----------1
             4871477 (36)     ---------29
             4908262 (3)      ----------3
             4898672 (3)      ----------3
             4914695 (1)      ----------1
           4909370 (5)        ----------5
           4913445 (3)        ----------3
           4913047 (1)        ----------1
           4915105 (1)        ----------1
           4914439 (1)        ----------1
           4914017 (1)        ----------1
           4912645 (1)        ----------1
           4913465 (1)        ----------1
      4636330 (35)
        4776084 (35)          ---------33
          4908424 (1)         ----------1
          4903758 (1)
            4905239 (1)       ----------1

The big numbers are cycles in which mutations occurred. The numbers in parentheses are the number of living bots with that mutation. Numbers after the dashes on the right indicate the number of living bots for whom that mutation was their last mutation. The indentation indicates the "family tree" of the mutations.

As you can see, the most successful genome has 87 living bots. Here's its DNA:

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 start
 *.eye7 *.refeye *.myeye and
 <

''''''''''''''''''''''''  Gene:  1 Ends at position  6  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  2 Begins at position  7  '''''''''''''''''''''''
 start
 *.refveldx .dx store
 *554 70 .up store

''''''''''''''''''''''''  Gene:  2 Ends at position  14  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  3 Begins at position  15  '''''''''''''''''''''''
 cond
 *.eye5
''''''''''''''''''''''''  Gene:  3 Ends at position  16  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  4 Begins at position  17  '''''''''''''''''''''''
 cond
 77 >
 *683 *.myeye !=
 start
 -1 .shoot dec
 *.refvelup .up store

''''''''''''''''''''''''  Gene:  4 Ends at position  29  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  5 Begins at position  30  '''''''''''''''''''''''
 start

''''''''''''''''''''''''  Gene:  5 Ends at position  30  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  6 Begins at position  31  '''''''''''''''''''''''
 cond
 *.eye5 =
 *.refeye and
 *.myeye %=
 or
 start
 371 .aimright store

''''''''''''''''''''''''  Gene:  6 Ends at position  42  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  7 Begins at position  43  '''''''''''''''''''''''
 cond
 >=
 start
 *.nrg 22880 >

''''''''''''''''''''''''  Gene:  7 Ends at position  48  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  8 Begins at position  49  '''''''''''''''''''''''
 start
 dec
 <
 .repro store
 stop
''''''''''''''''''''''''  Gene:  8 Ends at position  54  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  9 Begins at position  55  '''''''''''''''''''''''
 start
''''''''''''''''''''''''  Gene:  9 Ends at position  55  '''''''''''''''''''''''


As far as I can tell it cleans up to

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']start
 *.refeye *.myeye <       'conspec recognition

   *.refveldx .dx store   'match velocities

   70 .up store           'close for the kill

cond
 *.eye5 77 >              'proximity sensor
 *683 *.myeye !=          'broken conspec recognition. why don't they shoot each other?
start
 .shoot dec               'fire away!
 *.refvelup .up store     'match velocities


cond
 -1 *.eye5 = and          'always false, but the "or" saves the day
 *.refeye *.myeye %= or   'conspec recognition; %= essentially functions as =
start
 371 .aimright store      'avoid conspecs

cond
 *.eye7 *554 >=           'apparently, only reproduce when something is in eye7...
start
 *.nrg 22880 >            'keeps bot from going cancerous

 dec <                    'I don't see how anything survives here on the integer stack
 .repro store             'to get stored in .repro but apparently it happens.

stop


It seems to me that conspec recognition for the shooting gene is broken, but I don't observe any cannibalism. Indeed the number of .eye commands has remained constant at 3 since the beginning of the sim. If the bots were cannibals there would be no incentive to maintain matching .refeye's. Perhaps I don't quite understand how cond, start, and stop function in DNA. My though was that "cond" clears the boolean stack except for an implicit "true" value, "start" ANDs up the boolean stack and skips to the next "cond" if it evaluates to "false", and "stop" skips to the next "cond". Also stores only execute when the top value of the boolean stack is "true". Is this correct?

23
DNA - General / How do they reproduce?
« on: April 03, 2008, 12:18:46 PM »
I was looking at the DNA of the bots in my evosim (descended from Animal Minimalis) and to my eye it looks like they should all be sterile. Nevertheless the sim survives; a representative bot is below (I watched it reproduce). Can someone help me understand how they ever store anything in .repro?

Code: [Select]
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 start
 *.eye5 *.refeye *.myeye !=

''''''''''''''''''''''''  Gene:  1 Ends at position  5  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  2 Begins at position  6  '''''''''''''''''''''''
 start
 *.refveldx .dx store
 *627 48 .up store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  14  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  3 Begins at position  15  '''''''''''''''''''''''
 cond
 *.eye5 58 >
 *683 *.myeye !=
 start
 -1 .shoot dec
 *.refvelup .up store
 stop
''''''''''''''''''''''''  Gene:  3 Ends at position  29  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  4 Begins at position  30  '''''''''''''''''''''''
 cond
 *.eye5 =
 *.refeye *.myeye =
 or
 start
 345 .aimright store

''''''''''''''''''''''''  Gene:  4 Ends at position  40  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  5 Begins at position  41  '''''''''''''''''''''''
 cond
 <

''''''''''''''''''''''''  Gene:  5 Ends at position  42  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  6 Begins at position  43  '''''''''''''''''''''''
 cond
 *.nrg 22880 >
 start
 store
 <
 .repro store
 stop
''''''''''''''''''''''''  Gene:  6 Ends at position  52  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  7 Begins at position  53  '''''''''''''''''''''''
 cond
''''''''''''''''''''''''  Gene:  7 Ends at position  53  '''''''''''''''''''''''

24
Darwinbots Program Source Code / Perf changes in 2.43.1f
« on: April 03, 2008, 11:42:27 AM »
Quote from: EricL
It should be considerably faster for larger fields and somewhat faster for smaller fields.  Under no conditions should it be slower.  Would your mind posting your sim?

Here's the sim. I just tried switching from -e to -f again; after maybe 10 minutes -f was running half as fast as -e.

25
Darwinbots Program Source Code / Perf changes in 2.43.1f
« on: April 02, 2008, 08:56:58 PM »
I was running a sim in 2.43.1e at ~4.5 cycles/sec. Saving and switching to 2.43.1f gave an initial speed of ~7 cycles/sec, which has slowed over a period of ~10 minutes to 3.3 cycles/sec. Saving that, closing DB, and opening again in 2.43.1f gave an initial speed of 5.8 cycles/sec which has slowed to 3.4 cycles/sec. Saving and switching back to 2.43.1e gives a consistent 4.8 cycles/sec. So while there is an initial speed boost for -f, it quickly becomes slower than -e.

Are you expecting -f to be faster or slower than -e?

26
Evolution and Internet Sharing Sims / First Evosim
« on: April 02, 2008, 02:16:47 AM »
Thanks for the advice, guys. I've discovered, as shvarz noted, that it's hard to keep 3 species in a sim in balance for a long time. One of them usually dies out; maybe my predator-shepherd just isn't good enough. I decided to leave out the shepherd and just try to get a basic stable sim going, with just Alga Minimalis and Animal Minimalis. I still found it hard to keep things stable, so I decided to use the day/night feature: I give the veggies lots of energy but cut it off when total sim nrg rises is above certain threshold. Essentially this enforces conservation of nrg: any nrg lost to the sim is immediately returned as sunlight. This was inspired by my experiences with Gene Pool, which conserves energy and consistently produces stable predator-prey cycles. I also have a significant nrg tax on the bots just for being alive, which increases with age; this kills off bots that just sit around and provides selection pressure towards better hunters. I have mutations at 16x for 1 cycle out of 10 and 1/16x for the rest. I'll let it run for a while and might try to introduce a predator if things look stable enough.

The sim is attached; if you run it you'll note that in the absence of any friction the whole sim has developed a net momentum in the southwestwards direction. I'll be interested to see if this changes over time. Also, I noticed a few bots at one point with a broken conspec-avoidance gene, but it was the long-distance closing gene, not the shooting gene. I can see though how easy it is to break conspec-recognition with just a single point-mutation. I expect it will happen soon.

27
Evolution and Internet Sharing Sims / First Evosim
« on: April 01, 2008, 12:34:30 AM »
Hi all,

I've started up my first real attempt at a long-term evosim. I'd appreciate any suggestions about parameters and such to encourage evolution.

Details:

-I am trying to evolve Animal Minimalis. Any other suggestions for a simple bot to evolve?

-The food chain is Alga Minimalis -> Animal Minimalis -> Shepherd bot.

-Sim size = 4

-The shepherd is handcoded, virus/mutation immune, omnivorous, and much better than Animal Minimalis; a cond for all genes is "*.totalbots *.totalmyspecies div 4 >" so that it hibernates when it is too large a percentage of the total population.

Shepherd code:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'all genes (except for birth-tie breaking) predicated on .totalbots / .totalmyspecies

cond
  *.robage 0 =
start
  .tie inc
  314 628 rnd add .aimdx store
stop

cond
  *.robage 1 =
  *.numties 0 > or
start
  *.tiepres .deltie store
stop

cond
  *.nrg 4000 >
  *.totalbots *.totalmyspecies div 4 >
start
  50 .repro store
stop

cond
  *.totalbots *.totalmyspecies div 4 >
start
  5 .up store
  *.nrg 4 div .strbody store
  *.body 2 div .fdbody store

  .shoot .vloc store
  0 .venval store

  *.velscalar 40 >
    314 rnd .aimdx store
stop

cond
  *.totalbots *.totalmyspecies div 4 >
  *.nrg 500 >
  *.venom 100 <
start  
  10 .strvenom store
stop

cond
  *.totalbots *.totalmyspecies div 4 >
  *.eye5 0 >
  *.refeye *.myeye !=
start
  *.refveldx .dx store
  *.refvelup 80 add .up store
  *.eye6 *.eye4 sub *.eye4 *.eye6 sub abs div 5 mult .aimdx store
stop  

cond
  *.totalbots *.totalmyspecies div 4 >
  *.eye5 50 >
  *.refeye *.myeye !=
start
  *.refveldx .dx store
  *.refvelup .up store
  *.eye6 *.eye4 sub *.eye4 *.eye6 sub abs div 5 mult .aimdx store
  .shoot dec

  'sometimes shoot venom
  10 rnd 1 =
    -3 .shoot store
    *.venom .shootval store
stop


cond
  *.totalbots *.totalmyspecies div 4 >
  *.eye5 0 =
  *.refeye *.myeye = or
  *.shflav 0 !=
  *.shflav -2 !=
start
  *.shang 314 add .aimdx store
stop

end


------------
I am trying to get smooth, regular predator-prey cycles going between Animal Minimalis and Alga Minimalis. I have veg population capped at 100; Currently the Animals will slowly overpopulate the sim while the Alga population stays stuck to the ceiling; then suddenly the Alga population crashes and the Animal population declines slowly, until suddenly Alga populations surge again, and so on. I want a smoother cycle; I guess the problem is that the delay between Animal and Alga populations is too long. I was thinking a well-tuned constant tax on nrg for Animals might help; it would make the Animals die off more quickly when their food source disappears. Also I might uncap the veg population. Any thoughts?

Actually it looks like the population stabilized with the algae at the population cap and Animal Minimalis at the shepherd in equilibrium. I don't like the veggie population sitting at the cap, so I uncapped it; veggie population is now 1000 and rising. I guess I'll play around with the energy fed to veggies to stabilize them.

A problem with the shepherd is that .totalbots includes veggies, so that it starts playing rough with Animal Minimalis when veggie populations spike. I think this delays the restoring force that would otherwise be applied to spiking veggie populations. Also the shepherd's venom disarms its target for a while, making it harder for Animal Minimalis to control the veggies.

I'd appreciate any help, and I'll report any interesting results here.

28
Suggestions / Very Large Fields in 2.43.1e
« on: March 26, 2008, 01:37:53 PM »
I get "Overflow" errors when I use the largest sim sizes, usually sooner (in cycles) for bigger maps.

29
Evolution and Internet Sharing Sims / Come join the F1 megaverse!
« on: March 22, 2008, 10:07:44 PM »
Hi all,

I just download Darwinbots again today after seeing this thread; I played around with it a little a year or two ago. I hooked up a simple sim the F1 Universe, and eventually some Shrinking Violet came in and wiped out my basic algae, as expected. It was pretty much just Shrinking Violet for about 5 hours, and just as I am writing this post I see a small colony of Preditors has established a foothoold in the sim.

I've got some questions:
-Why is my teleporter sending much more to the internet that it is getting back? Currently, bots teleported out=281, bots teleported in = 96.
-Why does my teleporter teleport Shrinking Violets when I've told it not to teleport autotrophs?
-Why does my Internet log contain so many errors? Is the connection bad?

Quote
3/22/2008 10:00:17 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:00:49 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:01:17 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:01:17 PM: Shrinking Violet 2.txt teleported in from TheDuck
3/22/2008 10:01:18 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:01:22 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:01:25 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:01:45 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:03:00 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:03:00 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:03:01 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:03:05 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:03:06 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:03:20 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:03:48 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:03:48 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:04:53 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:04:53 PM: Shrinking Violet 2.txt teleported in from TheDuck
3/22/2008 10:04:54 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:04:58 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:05:01 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:05:49 PM: Shrinking Violet 2.txt sent to internet.
3/22/2008 10:06:50 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:06:50 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:06:50 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:06:55 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:06:57 PM: Error disconnecting Unable to connect to remote host
3/22/2008 10:07:07 PM: Shrinking Violet 2.txt sent to internet.

Pages: 1 [2]