Welcome To Darwinbots > Newbie
Hello...
(1/1)
Tj3:
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: ---'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
--- End code ---
Ammeh:
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: ---cond
*.totalmyspecies 99 >
*.nrg 5000 >
start
25 .mrepro store
stop
cond
*.nrg 5000 >
*.totalmyspecies 100 <
start
25 .repro store
stop
--- End code ---
Houshalter:
try this:
--- Code: ---cond
nrg 200 <
*.robage 200 >
start
99 .mrepro store
stop
--- End code ---
And this makes your bot poisoness:
--- Code: ---cond
*.ploc .shoot !=
start
.shoot .ploc store
stop
cond
*.poison 100 <
*.nrg 1000 >
start
100 .strpoison store
stop
--- End code ---
Hope it works
Tj3:
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.
bacillus:
It looks cool. Pity I haven't got a version of DB on me to test it
Navigation
[0] Message Index
Go to full version