Author Topic: Hello...  (Read 3587 times)

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Hello...
« on: March 12, 2010, 10:22:54 PM »
Hi.... I just got darwinbots and it's great. I just made my first bot. Its just a basic bot, but it is actually pretty good. Here's the code. If you could help me make it better that would be great!

Code: [Select]
'Animal_Simpilisis
'A basic but powerful animal bot.
'It will find food and reproduce.

def speciesid 101

' Gene 1 Species ID
cond
*.robage 0 =
start
99 .speciesid store
.speciesid .memloc store
stop

' Gene 2 Follow food
cond
 *.eye5 0 >
*.memval *.speciesid !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

' Gene 3 Find food
cond
*.eye5 0 =
*.memval *.speciesid =
or
start
157 314 rnd sub .aimdx store
10 .up store
stop

' Gene 4 Eat food
cond
 *.eye5 50 >
*.memval *.speciesid !=
start
-1 .shoot store
 *.refvelup .up store
stop

' Gene 5 Eliminate waste
cond
*.waste 100 >
start
1 .backshot store
-4 .shoot store
*.waste .shootval store
stop

' Gene 6 Reproduction
cond
*.nrg 20000 >
*.eye5 50 <
start
25 .mrepro store
stop

end

Offline Ammeh

  • Queen of the Internets
  • Bot Destroyer
  • ***
  • Posts: 169
    • View Profile
Hello...
« Reply #1 on: March 13, 2010, 06:15:55 AM »
hey

just wondering why you're using mrepro for reproduction? The chances are that you'll just get broken bots instead of useful mutations.

Personally what I would do is:

Code: [Select]
cond
*.totalmyspecies 99 >
*.nrg 5000 >
start
25 .mrepro store
stop

cond
*.nrg 5000 >
*.totalmyspecies 100 <
start
25 .repro store
stop

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hello...
« Reply #2 on: March 13, 2010, 09:40:22 AM »
try this:
Code: [Select]
cond
nrg 200 <
*.robage 200 >
start
99 .mrepro store
stop

And this makes your bot poisoness:
Code: [Select]
cond
*.ploc .shoot !=
start
.shoot .ploc store
stop

cond
*.poison 100 <
*.nrg 1000 >
start
100 .strpoison store
stop

Hope it works

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Hello...
« Reply #3 on: March 13, 2010, 02:10:14 PM »
Thanks! The poison worked great, and gave it a huge advantage.
And the idea to only mrepro with over 100 population was a really smart idea! Im really glad the community is so helpful here.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Hello...
« Reply #4 on: March 13, 2010, 03:15:11 PM »
It looks cool. Pity I haven't got a version of DB on me to test it  
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan