Darwinbots Forum
Bots and Simulations => Bestiary => Veggies => Topic started by: Botsareus on May 30, 2014, 11:06:27 AM
-
One would expect it to move with ties, but it doesn't.
Yes, I know.
Although Lovebot mod was cool, try something like caterpillar. ;)
I am looking for a properly OP vegy here.
-
You mean one that doesn't cheat and take over everything because it gets infinite energy?
-
Well, I tried it, I made the caterpillar a plant. It's not very interesting, but here's the code:
'Caterpillar
'Moves by extending and retracting ties.
'V0.1 kind of in development. That is also the reason the bot is also filled with useless genes, and ineffiecient.
'If anyone is interested in the way it moves it is under the head "'moving with ties, yes with ties."
'It will win the MB-league, but having much trouble doing it. Some changes broke the original design, I don't know what changes yet.
'Made by Peter
'Made 04-11-08
def time 100
def head 101
def move 102
def Mvel 971
def maxlengh 972
def stiftie 973
def phycics 974
def angle 104
'Split MB
cond
*.nrg 5000 >
*.body 2000 >
start
.deltie inc
stop
'first ever bot
cond
*.maxlengh 0 =
start
1000 .maxlengh store
100 .stiftie store
stop
'reproduce
cond
*.numties 0 =
*.robage 0 !=
start
50 .repro store
1 .head store
1 .tout3 store
stop
'birth turn
cond
*.trefage *.refage =
*.robage 2 >
start
628 .aimdx store
stop
cond
*.robage 0 =
start
.shoot .ploc store
.tie inc
14 .time store
628 .angle store
-30 .eye1width store
157 .eye1dir store
-30 .eye9width store
-157 .eye9dir store
stop
'I'm old and no MB, strange.
cond
*.robage 1 >
*.numties 0 =
start
100 .aimdx store
stop
'Head-change
cond
*.edge 1 =
*.refkills 1 add *.in6 =
*.eye5 0 !=
and
or
*.reftype 1 =
or
*.head 0 !=
and
start
500 .aimdx store
'0 .head store
'0 .tout3 store
stop
cond
*.99 0 !=
start
.99 dec
stop
cond
*.robage 2 >
*.tin3 0 =
*.head 0 =
start
1 .head store
1 .tout3 store
10 .99 store
stop
'MB-sharing stuff
cond
*.numties 1 =
*.trefage *.tin1 =
start
.tienum inc
*.stiftie .stifftie store
50 .sharenrg store
stop
cond
*.eye1 0 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
start
'*.angle
628 .fixang store
stop
cond
*.head 1 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
start
0 .move store
0 .tout2 store
*.eye1 0 !=
400 .aimsx store
-350 .angle store
*.eye9 0 !=
*.eye1 0 =
and
-400 .aimsx store
'350 .angle store
'200 .maxlengh store
'*.maxvel *.phycics ++ 2 sub .dx
stop
'direction
cond
*.eye5 0 =
start
*.eye2 0 !=
45 .aimsx store
*.eye8 0 !=
-45 .aimsx store
*.eye3 0 !=
30 .aimsx store
*.eye7 0 !=
-30 .aimsx store
*.eye4 0 !=
15 .aimsx store
*.eye6 0 !=
-15 .aimsx store
stop
'moving with ties, yes with ties.
'second step body
cond
*.move 1 !=
*.head 0 =
*.trefage *.time mod *.time 2 div >
start
*.maxlengh .fixlen store
1 .fixpos store
stop
'second step head
cond
*.move 1 !=
*.head 0 !=
*.trefage *.time mod *.time 2 div >
start
0 .fixpos store
'*.eye9 *.eye1 sub 2 mult .aimdx store
stop
'first step body
cond
*.move 1 !=
*.head 0 =
*.trefage *.time mod *.time 2 div <
start
1 .fixlen store
0 .fixpos store
stop
'second step head
cond
*.move 1 !=
*.head 0 !=
*.trefage *.time mod *.time 2 div <
start
1 .fixpos store
stop
'Different phycics section
'just a try to let it survive in F1-conditions
'It stays bad with weak phycics, it needs friction for stability.
cond
*.tielen 1000 >
start
1 .phycics store
'10 .stifftie store
stop
cond
*.phycics 1 =
start
200 .maxlengh store
50 .stiftie store
stop
cond
*.phycics 0 =
*.eye1 0 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
start
1000 .maxlengh store
stop
'Shooting section
cond
*.reftype 0 =
*.eye5 0 >
*.eye5 40 <
*.refkills 1 add *.in6 !=
start
100 .maxlengh store
*.refxpos *.refypos angle .setaim store
-10 .shootval store
-6 .shoot store
0 .tout2 store
0 .move store
'1 .fixlen store 'added line
stop
cond
*.eye5 45 >
*.refeye 0 =
*.pain 100 <
and
start
1 .fixpos store
1 .fixlen store
stop
cond
*.eye5 39 >
*.refkills 1 add *.in6 !=
*.reftype 0 =
start
100 .maxlengh store
1 .tout2 store
1 .move store
*.refxpos *.refypos angle .setaim store
8 .shootval store
*.refpoison *.refshell =>
-6 .shoot store
*.refpoison *.refshell <
-1 .shoot store
stop
'Did you, did you just shoot at me.
cond
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
25 .shootval store
0 .shflav store
*.refpoison *.refshell =>
-6 .shoot store
*.refpoison *.refshell <
-1 .shoot store
stop
'body
cond
*.nrg 500 >
*.nrg *.body >
start
100 .strbody store
stop
cond
*.nrg 200 <
start
100 .fdbody store
stop
'?onspec
cond
start
*.kills 1 add .out6 store
.tout1 inc
*.tin2 .move store
stop
'let it move, for now.
cond
'*.eye1 0 =
'*.eye5 0 =
'*.eye9 0 =
'*.refkills 1 add *.in6 =
1 1 =
'or
start
0 .move store
0 .tout2 store
stop
'Sight communication
cond
*.edge 1 !=
*.refkills 1 add *.in6 !=
or
*.reftype 1 !=
or
*.head 0 =
and
*.eye5 0 !=
start
*.eye5 .tout4 store
stop
'order body
cond
*.head 0 =!
start
*.aimsx .tout5 store
stop
'body move
cond
*.head 0 =
start
*.tin5 .aimsx store
stop
'defence
cond
*.vloc .shoot !=
start
-2 .venval store
.shoot .vloc store
stop
'poison reloading
cond
*.numties 0 !=
*.poison 400 <
*.nrg 1100 >
start
100 .strpoison store
stop
'increasing shell
cond
*.numties 0 !=
*.shell 250 <
*.nrg 1500 >
start
100 .mkshell store
stop
cond
*.numties 1 >
start
*.tiepres .deltie store
stop
'look veggie, waste.
cond
*.waste 100 >
*.refeye 0 =
*.reftie 0 =
start
*.waste .shootval store
-4 .shoot store
stop
cond 'new gene from Botsareus and Panda
*.chlr
*.light
<
start
160 .mkchlr store
stop
'the end
end
-
That is a harsh word 'infinite energy.'
I like to think of it as an advantage over not being able to move very well.
Also, if you studied your lovebot mod, you will note that at higher populations the robots actually begin to lose energy.
Chloroplasts where not my idea, it was a long demanded feature that no one except me and Panda got to develop.
Also, if you can limit very large plants a.k.a. BigBirthas from being deadly by going to 'cheating prevention' in the global settings.
-
Here is the Phd who helped us develop the idea. link (http://forum.darwinbots.com/index.php/topic,3721.msg1384721.html#msg1384721)
-
That's interesting. I think I'll just stick with swapping genes around for now instead of writing them from scratch. I'm particularly interested in bots that work together, or navigate in flocks.
-
I wanted to see what happened if I made the Caterpillar bot a plant, and I got some interesting results. The plant is very efficient at defense, as it shoots and probably consumes almost anything that tries to eat it. Good for providing a challenge to the more successful bots. I take no credit for making any genes. I have only copied and pasted. Also, is there anything like the Caterpillar with more than just 2 bots? I already know of Seasnake, but from what I can tell, Seasnake moves all of it's bots at the same time. Caterpillar moves it's bots in sequence. It would be cool to see a bot like the Caterpillar, but with 3 or more bots.
-
As far I know there're no other bots that move this way. I think Caterpillar is the only bot that moves forward by contracting and extending ties. Good to know it still works, I expected changing tie mechanics to break it at some point.
Strong point of Caterpillar is the low movement costs(moving with ties is cheaper, but more complicated). Normally not a big issue, but if movement costs are high. Other bots will spend more on nrg to move and this one doesn't.
-
This bot works pretty well as a plant, too. I believe it's because one bot serves as the "solar panel" and the other one serves as a defense mechanism. As a result, they get a continuous supply of energy to fight off intruders, and they can also eat any intruders too.