Author Topic: Caterpillar(Peter)(F2_MB)04-11-08  (Read 2140 times)

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Caterpillar(Peter)(F2_MB)04-11-08
« on: November 04, 2008, 05:15:20 AM »
My new MB, kind of in development. Still pretty tough for an MB.

Code: [Select]
'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

'the end
end
Oh my god, who the hell cares.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Caterpillar(Peter)(F2_MB)04-11-08
« Reply #1 on: November 04, 2008, 10:52:58 PM »
It seems to be a good bot, but I did find one massive problem: When attacking on long-range, the eyes become inaccurate, so 10% of the time they actually hit. The best way to avoid this is to wait until the food is closer.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Caterpillar(Peter)(F2_MB)04-11-08
« Reply #2 on: November 05, 2008, 10:10:55 AM »
Yes, I did already found that problem. Sometimes it doesn't move and shoots at a veggie it just can't hit. Sometimes it just miss the fact there is lieing a veggie at all.

The main problem I have with the bot isn't shooting, but move the lack for fast reactive turning. Normally you can just turn and go in the direction you chose. Here it goes much much slower, if anything at all. That is an example that is good seen in thick fluid conditions. The bot sees something on the left, it goes left. It keeps going left, and you'll see in the end that it will made a circle around a veggie-colony without reaching it, and still it keeps going left.

In what conditions did you try the bot, normal league conditions or did you use thick fluid conditions. I behaves a little different in both conditions, altrough I tried to get it more simeraly.
Oh my god, who the hell cares.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Caterpillar(Peter)(F2_MB)04-11-08
« Reply #3 on: November 07, 2008, 06:04:49 AM »
Update: This one should for real beat MB(and become 11# in F2). Isn't using any venom and it has got some bugs so finaly it will become better.
Oh my god, who the hell cares.

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: Caterpillar(Peter)(F2_MB)04-11-08
« Reply #4 on: June 17, 2014, 01:55:16 PM »
Can there be a caterpillar with more than two bots in it?
Hubba Jubba Lollywash!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Caterpillar(Peter)(F2_MB)04-11-08
« Reply #5 on: August 02, 2014, 10:15:23 AM »
I guess there can be  :P 'Project Sea Snake EVO' results soon.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: Caterpillar(Peter)(F2_MB)04-11-08
« Reply #6 on: November 22, 2014, 03:32:12 PM »
It'd be REAL nice if the code was slightly better explained...Maybe just a short sentence explainign what each gene (and set of genes) do...
I mean, I love testing my bots against it, but I think I might have come up with a bit of a interesting usage for this type of movement?
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.