Bots and Simulations > Evolution and Internet Sharing Sims

First Evosim

<< < (2/4) > >>

Testlund:
What you can do is to start a sim with just one Animal Minimalis and then tweak the costs to make it die within a certain number of cycles. Then you get an idea how long a bot can survive without feeding when it's constantly spinning. Then you can add other costs too and balance it for day/night cycles if you want.
The sim I'm running right now is balanced for the magic number 32 in DB. You can check it out if you want to see how I have set the costs. This sim hasn't been running long enough for anything interesting to appear. Note that you have to go and change the CostX to 1 every time you load it. Day/night cycles are set to 32000.  

The_Duck:
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?

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.

What's your #mutations / #generation ratio?

Testlund:
Hello. I don't know if anybody cares, but because I got the numbers wrong I need to correct it.

Putting the number 0.635 into the Rotation field will cause Animal Minimalis to die after 64000 cycles.

Putting the number 0.495 into the Voluntary Movement field will cause R Fisannis to die after 32000 cycles.

...if none of the bots find food before then.

Ok, so what's the point? Well, if you have day/night cycles set to 32000 this means that a veggie that happens to evolve constant swimming will make it just barely through the night, probably it will die before the next morning. It should have a selective pressure on bots to not evolve to swim around like crazy. Of course it's a matter of taste how aggressively you want to tax such behavior. I just think these numbers are fun, to have costs based on 32000.  

I also discovered that despite that R Fisannis is both turning and swimming at the same time it appears that only costs for swimming are applied, like movement costs override rotation costs. Could be a bug or design, I don't know.

Numsgil:
I'd say that might be a bug.  Rotation costs should work independantly of movement costs.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version