Author Topic: Purple Swarmer (F2)(PY)-23.02.05  (Read 2746 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Purple Swarmer (F2)(PY)-23.02.05
« on: February 23, 2005, 03:56:33 PM »
Code: [Select]
' Purple Swarmer
' Experiment in behaviour patterns
' Fun and remarkably good little F2 bot by PY



' Setup
'*****************
def newmom 50
def counter 51
def counter2 52

' Initialize
'***********
cond
*.robage 0 =
start
.tie inc
stop

cond
*.robage 1 =
start
.deltie inc
0 .fixpos store
stop

cond
*.robage 2 =
start
20 .sx store
stop

cond
*.robage 12 =
start
20 .dx store
10 .up store
stop

' Search and avoid conspecs
'*********************************
cond
'*.eye1 *.eye9 !=
*.eye3 *.eye7 !=
*.robage 15 >
start
 *.eye1 *.eye3 add *.eye7 *.eye9 add sub 2 div .aimsx store
stop

cond
*.eye4 *.eye6 !=
*.refeye *.myeye !=
*.robage 10 >
start
*.eye4 *.eye6 sub 2 div .aimsx store
stop

cond
*.eye5 0 >
*.eye5 50 <
*.refeye *.myeye !=
start
20 *.vel sub .up store
0 .counter store
stop

cond
*.eye5 0 =
*.refeye 0 =
*.vel 20 <=
start
5 .up store
stop

cond
*.refeye *.myeye =
*.robage 15 >
start
600 rnd 150 sub .aimsx store
.counter inc
stop

cond
*.eye5 0 >
*.refeye *.myeye =
*.robage 15 >
start
400 rnd 150 sub .aimsx store
.counter inc
stop

cond
*.counter 50 >
start
0 .refeye store
0 .counter store
stop

cond
*.refeye *.myeye !=
start
.counter inc
stop

' Reproduce
'**************
cond
*.newmom 0 >
start
.newmom dec
628 .aimsx store
0 .fixpos store
stop

cond
*.nrg 5000 >
*.pleas 10 >
start
628 .aimsx store
60 .repro store
.newmom inc
1 .fixpos store
stop

' Hunt
'********
cond
*.eye5 40 >
*.refeye *.myeye !=
*.refpoison 0 =
start
-1 .shoot store
1 .fixpos store
stop

cond
*.eye5 40 >
*.refeye *.myeye !=
*.refpoison 0 !=
start
-6 .shoot store
1 .fixpos store
stop

' Miscaleneous
'******************
cond
*.nrg 500 >
*.shell 200 <
start
10 .mkshell store
stop

cond
*.pleas 10 >
start
10 .strbody store
stop

cond
*.nrg 1000 >
start
10 .strbody store
10 .strvenom store
stop

cond
*.pleas 1 <
*.fixed 0 !=
start
0 .fixpos store
stop

cond
*.tiepres 0 !=
start
*.tiepres .deltie store
50 .mkslime store
stop


end
« Last Edit: May 09, 2014, 12:42:20 PM by Botsareus »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D