Author Topic: Setting up a Darwinbots Aquarium  (Read 3524 times)

Offline MylesONeill

  • Bot Neophyte
  • *
  • Posts: 1
    • View Profile
Setting up a Darwinbots Aquarium
« on: March 24, 2014, 01:22:55 AM »
Hi all, I'm messaging here looking for some help and tips for a project of mine.

I'm in the process of buying a new laptop and am planning on setting up my old laptop as a 24/7 ALife Simulation machine. Essentially an aquarium, with the idea being that you can come by and check it out over time and watch things change.

So some of the features I'm looking at trying to achieve to set this up:
  • A simple starting population with lots of scope to evolve and change over time
  • An environment set up which encourages interesting evolution and ideally avoids wipeouts
  • Ideally an environment that is somewhat dynamic and changes over time so stable solutions never evolve

For the most part I'm much more interested in tweaking environments and seeing what creatures evolve than I am about inventing or coding species from scratch.

Do you guys have any tips on setting this sort of thing up?

PS. A couple of other notes:
1. My old computer is a Macbook Pro, I'm going to trying to get Darwinbots to run on it using WINE. I'll let you know how I go with that.
2. I work in Biology/Computer Science research and ALife is a long term passion of mine, its great to see the work you've done on this and I hope you keep it up into the future.
« Last Edit: March 24, 2014, 01:27:54 AM by MylesONeill »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Setting up a Darwinbots Aquarium
« Reply #1 on: March 27, 2014, 01:57:41 AM »
I'm surprised no one responded, so I will :D

There are some competing factors here that will make things a bit tricky.  Larger sims (spatially, and in terms of number of bots) will produce more stability.  It will end up less likely that you'll get a total wipe.  But they'll also run quite slowly.  Especially on something like a laptop that might not be the fastest thing under the sun.

In terms of getting interesting evolution, that's a bit of an open question.  Or rather, everyone has their own idea about how to best go about it.  I had a good sim maybe 8 years ago that used Enitor Comesum as an animal (it's cannabilistic, so its population is self limiting, and it's designed to hunt out food in a large environment) with a cancerous version of alga minimalis.  If you don't mind respawning veggies you can use whatever plant species you want really.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Setting up a Darwinbots Aquarium
« Reply #2 on: March 27, 2014, 06:49:26 PM »
Quote
so stable solutions never evolve

One interesting thing to point out here, if you have Point and Point2 mutations enabled then a stable solution will never evolve.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Re: Setting up a Darwinbots Aquarium
« Reply #3 on: April 09, 2014, 03:53:24 AM »
One interesting thing you could do is continue an existing ZBot, since you would be following up on the evolution of a bot that started with nothing but zeros.

I dug up this old thing I had:
Code: [Select]
326 stop
 store
 store

''''''''''''''''''''''''  Gene:  1 Begins at position  5  '''''''''''''''''''''''
 start
 sqr .tie dec
 59 << *.robage 192
''''''''''''''''''''''''  Gene:  1 Ends at position  12  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  2 Begins at position  13  '''''''''''''''''''''''
 start
 overbool
 .shoot dec
 ceil >> rnd << << ++ store
 store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  25  '''''''''''''''''''''''

The issue with using this one would be that all the bots tie to each other, which makes the sim rather slow. It handles mutations well though, since it was evolved with mutations at a high setting.

Another thing you could do if you want to start from scratch and get some faster results is start with a bot where you just toss in random command and values all over the place, and put some store and inc/dec commands at the very end of the gene. Then maybe use medium or few mutations.
That should quickly try to make the best of the mess you made. (You may want to make sure it can survive and reproduce from the beginning though, or at least just reproduce, thats often the first hurdle for a zero bot.)

And of course a Zbot is also an option, but that requires some tinkering with the environment usually, unless you're very patient.

As for sim settings, I recommend larger sims, with a population as high as your computer can handle. I would usually try to regulate sim settings to keep around 800-1000 bots. It's slow, but far more stable. You don't want to go bellow 200, unless you have virtually no mutations enabled.
High mutations tend to do more harm than good, then can quickly produce some results, and then quickly unravel them again with more mutations.
Remember your dna in DB is rather short and explicit, and therefor not nearly as robust against mutations as real dna.

But part of the fun is tinkering with this. When you check in on your bots try to change the environment a bit. Maybe make the sim bigger with less veggies, to encourage bots to horde the veggies rather than consume them immediately. Or add some shapes.
In my experience bigger sims with less alge get more interesting results. You may need to start with a small sim with lots of veggies, then slowly increase the size of the sim and reduce the veggy count.
That's what I used to do anyway.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Re: Setting up a Darwinbots Aquarium
« Reply #4 on: April 09, 2014, 08:39:19 AM »
If you want to generate some starter bots fast, here's a quick and dirty perl script that'll make a random bot.
You may want to insert some gene at the end to make sure it can reproduce/grow, and maybe create chloroplast and such. Or you can just create hundreds of them and see if any of them gets lucky. (Or you can just have low or no costs on (Maybe just age costs), small sim, tons of alge, medium to high mutations, and repop on your bot maybe)
Default as you can see it just 5 bots generated with 500 values each.

Code: [Select]
use strict;
use warnings;

my $amount = 5;
my $size = 500;

my @opps = (">","<",">=","<=","=","!=","%=","!%=","~=","!~=","add","sub","mult","div","ceil","floor","mod","sgn","abs","angle","dist","sqr","pow","pyth","anglecmp","root","logx","sin","cos","~","&","|","^","++","--","-","<<",">>","clear","clearbool","drop","dropbool","dup","dupbool","swap","swapbool","over","overbool","true","false","and","or","not","xor");
my @comm = ("store", "inc", "dec");

for(my $a = 1; $a <= $amount; $a++)
{
open (MYFILE, '>>TestBot' . $a . '.txt');
print MYFILE "start\n";
for(my $i = 0; $i < $size; $i++)
{
my $randomType = rand(100);
if($randomType < 69)
{
my $randomVal = rand(1000);
my $randVal = int($randomVal);
if($randomType < 15)
{
print MYFILE "*$randVal ";
}
else
{
print MYFILE "$randVal ";
}
}
elsif($randomType < 79)
{
my $randComm = int(rand(3));
if($randComm != 3)
{
print MYFILE $comm[$randComm] . " ";
}
}
elsif($randomType < 98)
{
my $arraySize = scalar (@opps);
my $randOpp = int(rand($arraySize));
if($randOpp != $arraySize)
{
print MYFILE $opps[$randOpp] . " ";
}
}
else
{
print MYFILE "\nstop\n\nstart\n";
}
}
print MYFILE "\nstop\n";
close (MYFILE);
}

print "Done\n";
my $line2 = <STDIN>;

And normally you would start with little or no costs and then slowly increase costs towards F1 or more, and generally make it tougher to survive (Fluid thickness, env size, lack of food, obstacles, less light, maybe switch the food source to something harder to eat, stuff like that)
« Last Edit: April 09, 2014, 08:48:34 AM by Moonfisher »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Setting up a Darwinbots Aquarium
« Reply #5 on: April 09, 2014, 01:30:10 PM »
I suspect he isn't going to respond. He may also not know how to run perl scrips. :p

I'd opt for connecting the sim with IM, btw. :)
Oh my god, who the hell cares.