Author Topic: Best thing ever  (Read 7153 times)

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Best thing ever
« on: June 28, 2012, 12:25:13 PM »
After looking at various programming game/organic things, I ran into this, and have been extremely excited so far. I have no real experience with stack languages, so I'm trying to piece together an understanding from the Wiki - is there a more cohesive step-by-step tutorial? I've been running a simulation for about 4 hours now - whoever made Callidus apparently knew what they were doing.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Re: Best thing ever
« Reply #1 on: June 28, 2012, 12:34:07 PM »
You'd be hard pressed to find anything more comprehensive than the wiki.  Have you looked at the tutorials yet?

But really it won't make sense until you try to write a bot and debug it.

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #2 on: June 28, 2012, 01:25:03 PM »
You'd be hard pressed to find anything more comprehensive than the wiki.  Have you looked at the tutorials yet?

But really it won't make sense until you try to write a bot and debug it.

It's not really a lack of information - clearly a lot of work has been put in - it's just a bit tricky to figure out what to do in what order to learn. Obviously, its an encyclopedia, not a tutorial. The bot tutorials are very helpful, and what I'm trying to go through. But I'm not totally sure what the next step should be.

Maybe I should outline what I'm thinking and get advice. The two ideas that have popped into my head watching sims are:

1. I'd like to do some experiments with sustainability. Using default levels of photosynthesis, develop a way for a population of very basic veggies and single bots to start with random values and through mutation reach a sustainable level of consumption as quickly as possible.

2. Just try and get meaningful evolution as quickly as possible.

That's not terribly specific, but they're the projects I'd like to work on. Any thoughts?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Re: Best thing ever
« Reply #3 on: June 28, 2012, 01:55:05 PM »
If you're looking to create a stable ecosystem your best bet is to write a bot that will also cannibalize other bots.  That's a great way to have the population be self limiting, and it's an evolutionarily stable strategy.  Try starting with animal minimalis and start tweaking it's conspec code.  The easiest is just to have no conspec check at all.  But you could also try more sophisticated strategies such as not trying to feed from children or parents.  (You could use in/out pairs to broadcast unique IDs for parents and children).

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #4 on: June 28, 2012, 02:10:37 PM »
If you're looking to create a stable ecosystem your best bet is to write a bot that will also cannibalize other bots.  That's a great way to have the population be self limiting, and it's an evolutionarily stable strategy.  Try starting with animal minimalis and start tweaking it's conspec code.  The easiest is just to have no conspec check at all.  But you could also try more sophisticated strategies such as not trying to feed from children or parents.  (You could use in/out pairs to broadcast unique IDs for parents and children).

Thank you very much! What exactly does conspec stand for? Is there a way to run two simulations at once?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Re: Best thing ever
« Reply #5 on: June 28, 2012, 02:18:28 PM »
It's short for conspecies.  Or more specifically, conspec recognition.

You'll need to run two instances of Darwinbots at the same time, but yeah, you can run more than one simulation at the same time.  That's actually the only way to use more than one core if you have a multicore machine.

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #6 on: June 28, 2012, 03:06:28 PM »
It's short for conspecies.  Or more specifically, conspec recognition.

You'll need to run two instances of Darwinbots at the same time, but yeah, you can run more than one simulation at the same time.  That's actually the only way to use more than one core if you have a multicore machine.

Again, thank you. A few more random questions:

1. After a simulation has been running for a while, how do you copy the code of an evolved bot?
2. Veggies are spontaneously appearing - how do you turn that off? Veggies can reproduce right?
3. Is there any methodology that allows bots to mix their code to form an offspring?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Re: Best thing ever
« Reply #7 on: June 28, 2012, 04:29:58 PM »
It's short for conspecies.  Or more specifically, conspec recognition.

You'll need to run two instances of Darwinbots at the same time, but yeah, you can run more than one simulation at the same time.  That's actually the only way to use more than one core if you have a multicore machine.

Again, thank you. A few more random questions:

1. After a simulation has been running for a while, how do you copy the code of an evolved bot?

If you double click on a bot in the sim, you can open up a properties page and view its DNA.  From that I usually just copy+paste.

Quote
2. Veggies are spontaneously appearing - how do you turn that off? Veggies can reproduce right?

Look for "veggy repop" in the options.  There's a whole slew of ways to tweak it.

Quote
3. Is there any methodology that allows bots to mix their code to form an offspring?

There's a form of sexual reproduction, but I don't know if it's currently working.  Here's the article on it.  It's not very well described beyond that, unfortunately.

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: Best thing ever
« Reply #8 on: June 28, 2012, 04:41:08 PM »
After looking at various programming game/organic things, I ran into this, and have been extremely excited so far. I have no real experience with stack languages, so I'm trying to piece together an understanding from the Wiki - is there a more cohesive step-by-step tutorial? I've been running a simulation for about 4 hours now - whoever made Callidus apparently knew what they were doing.
for programming look up de bots in this F3 thread: http://forum.darwinbots.com/index.php/topic,2969.0.html
in the zipfile look for shoot, defence etc.
I used these to start Gimmick, my F3 /F2 bot

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #9 on: June 28, 2012, 05:29:34 PM »
Quote
3. Is there any methodology that allows bots to mix their code to form an offspring?

Like Nums said.
You could have it shoot sperm randomly when it sees something, and then .sexrepro when it is fertilized.

Code: [Select]
'Put this after your -1 .shoot store gene
cond
*.eye5 40 >
20 rnd 1 =
start
-8 .shoot store
stop

cond
*.nrg 10000 >
*.fertilized 0 >
start
30 .sexrepro store
stop

This would work for a cannibot also.  ;)

Quote
2. Just try and get meaningful evolution as quickly as possible.

An advanced way of evolving fast is to have only important values in the bot change as it reproduces.  You can do this by using Racial Memory that lets the bots pass down the values they used with a chance to change them. http://wiki.darwinbots.com/w/Racial_memory

Code: [Select]
'Define names for the variables
def repronrg 971
def distance 972

'How far away to start shooting
cond
*.eye5 *.distance >
start
-1 .shoot store
stop

'How much nrg for repro
cond
*.nrg *.repronrg >
start
30 .repro store
stop

'Randomly change the values when young
cond
*.robage 100 <
10000 rnd 1 =
start
'Randomly add subtract up to 5 from value
*.distance -5 10 rnd add add .distance store
*.repronrg -5 10 rnd add add .repronrg store
stop

'Set the first values
cond
*.distance 0 =
*.repronrg 0 =
start
50 .distance store
10000 .repronrg store
stop

For that ^ you should have mutations disabled (in options).  Then when they get better, you look at the best bot's memory at 971 and 972.  :happy:

Quote
Is there a way to run two simulations at once?
Page 5 here has a nice tutorial on how to set up connect sims. (I havent had a chance to try it though) http://forum.darwinbots.com/index.php/topic,486.60.html

p.s. Hope I wrote the code right nums.
Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #10 on: June 28, 2012, 05:38:23 PM »
For the last time I will thank you for your excellent and generous help.

I'm having trouble getting my plants to reproduce. I built a vegetable that will run away slowly:
Code: [Select]
' Rolling Moss
' by: southpointingchariot
' Vegetable
'
' A scared plant

cond
  *.nrg
  6000
  >
start
  50
  .repro
  store
  15
  .aimdx
  store
stop

' Gene 1 Food Finder
cond
 *.eye5 0 >
start
 *.refveldx .dx store
 *.refvelup -5 add .up store
stop

' Gene 3 Avoiding Family
cond
 *.eye5 0 =
start
 314 rnd .aimdx store
stop

' Gene 4 Reproduce
cond
 *.nrg 1000 >
start
 10 .repro store
stop
end

But often bots with 32000 will just sit there and not reproduce. What can I do to fix this?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Re: Best thing ever
« Reply #11 on: June 28, 2012, 05:58:14 PM »
Can you tell if there's anything in front of the veggy?  That's the most common cause of a bot not being able to reproduce.

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #12 on: June 28, 2012, 06:07:28 PM »
Quote
' Gene 4 Reproduce
cond
 *.nrg 1000 >
start
 10 .repro store
stop
end

 FYI You have two reproduce genes, the first needs 6000 nrg but the second only needs 1000, so the first will not turn on.
The first turns the bot to make sure it has room.

I agree with Nums, there probably are bots in the way.

You could have it turn it the gene you want to use. Most likely the second repro gene.

Edit: Your moss is very interesting to watch, it forms little clumps that run away/follow at a distance predators.
« Last Edit: June 28, 2012, 06:14:24 PM by Tilthanseco »
Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #13 on: June 28, 2012, 06:13:30 PM »
I seemed to have fixed my earlier problem - I had to deactive the veggy repopulation effect. I'm now working on:

1. Telling the Taxxons not to eat their parents or children.
2. Introducing sexual reproduction.
3. Maximizing adaptation.

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #14 on: June 28, 2012, 06:24:51 PM »
FYI You have two reproduce genes, the first needs 6000 nrg but the second only needs 1000, so the first will not turn on.
The first turns the bot to make sure it has room.
Yeah, I just stole a couple methods and forgot to take one out.
Quote
Edit: Your moss is very interesting to watch, it forms little clumps that run away/follow at a distance predators.

Thanks :). I think it makes the process a good bit more interesting.