Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bacillus

Pages: 1 [2] 3 4 ... 6
16
F3 bots / Yura(F3)
« on: October 27, 2008, 11:57:04 PM »
Code: [Select]
'Yura
'An F3 bot by Bacillus
'Uses two tactics, then hopes one of them works
cond
 *.robage 0 =
start
 4234 .out9 store
 -32000 32000 rnd .out2 store
 20 rnd -- sgn 0 floor 999 store
stop

start
 250 *.body sub dup .strbody store - .fdbody store
 10 .up store
 *.in1 .out1 store
 -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop

cond
 *999 0 =
start
 *.nrg *.body sub dup .strbody store - .fdbody store
stop

cond
 *.eyef 0 >
 *.in9 *.out9 !=
 *.in2 *.out2 = or
start
 *.refxpos *.refypos angle .setaim store
 *.refvelup *.velup sub 40 add .up store
 *.refveldx *.veldx sub .dx store
stop

cond
 *.waste 2000 >
start
 *.waste .shootval store
 -4 .shoot store
stop

cond
 *.in9 *.out9 !=
 *.in2 *.out2 = or
 *.eye5 30 >
start
 *.nrg 10 div *.refbody ceil .shootval store
 -6 .shoot store
stop

cond
 *.shflav 0 !=
start
 *.aim *.shang add .setaim store
 *.shflav -1 =
 *.shflav -6 = or
 50 .dx store
 clearbool
 0 .shflav store
stop

cond
 *.nrg 1500 >
 *999 0 != and
 *.body 20000 >
 *.nrg 20000 > and
 *999 0 = and or
start
 50 .repro store
 481 .aimdx store
stop

17
F3 bots / Roto2(F3)(bacillus)
« on: October 20, 2008, 11:56:00 PM »
Code: [Select]
cond
 *.robage 0 =
start
 318 .out1 store
 -32000 32000 rnd .out2 store
stop

start
 40 *.eye5 sub 0 floor 2 mult 5 add *.refvelup 0 floor add *.vel sub

.up store
 350 *.body sub dup *.nrg 3 div ceil .strbody store - .fdbody store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor

mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0

floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0

floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0

floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub

sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult

*.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult

*.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn

mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor

mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor

mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0

floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub

sgn ++ sgn mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub

sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub

sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   

sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9

sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7

sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult

*.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult

add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++

sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0

floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++

sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++

sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn

++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0

floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn

++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn

++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub

sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub

sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult

*.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++

sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++

sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn

mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn

mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop

cond
 *.in1 *.out1 =
 *.in2 *.out2 !=
start
 *.maxvel .dx store
stop

cond
 *.eyef 0 =
 *.in1 *.out1 =
 *.in2 *.out2 != and or
 *.shflav 0 =
start
 .shflav store
 *.shang .setaim store
stop

cond
 *.eyef 0 >
 *.in1 *.out1 !=
 *.in2 *.out2 = or
start
 *.refxpos *.refypos angle *.refveldx sub .setaim store
 *.veldx .sx store
stop

cond
 *.eye5 40 >
 *.in1 *.out1 !=
 *.in2 *.out2 = or
start
 16 *.nrg 15 div ceil .shootval store
 -6 .shoot store
stop

cond
 *.nrg 5000 >
 *.body 350 >=
start
 50 .repro store
 628 .aimdx store
stop
stop

18
F3 bots / Roto(F3)(bacillus)
« on: October 20, 2008, 12:19:05 AM »
I'm not too sure about this one, should be F3:
Should -4 shots be allowed?
Code: [Select]
cond
 *.robage 0 =
start
 32 .out1 store
 -32000 32000 rnd .out2 store
stop

start
 40 *.eye5 sub 0 floor 2 mult *.vel sub .up store
 500 *.body sub dup .strbody store - .fdbody store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor

mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0

floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0

floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0

floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub

sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult

*.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult

*.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn

mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor

mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor

mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0

floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub

sgn ++ sgn mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub

sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub

sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub  

sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9

sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7

sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult

*.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult

add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++

sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0

floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++

sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++

sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn

++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0

floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn

++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn

++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub

sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub

sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult

*.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++

sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++

sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn

mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn

mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop

cond
 *.in1 *.out1 =
 *.in2 *.out2 !=
start
 *.maxvel .dx store
stop

cond
 *.eyef 0 =
 *.in1 *.out1 =
 *.in2 *.out2 != and or
 *.shflav 0 =
start
 .shflav store
 *.shang .setaim store
stop

cond
 *.eyef 0 >
 *.in1 *.out1 !=
 *.in2 *.out2 = or
start
 *.refxpos *.refypos angle .setaim store
 *.veldx .sx store
stop

cond
 *.eye5 40 >
 *.in1 *.out1 !=
 *.in2 *.out2 = or
start
 16 .shootval store
 -6 .shoot store
stop

cond
 *.nrg 5000 >
 *.totalbots *.totalmyspecies sub *.totalmyspecies >=
start
 50 .repro store
 628 .aimdx store
stop
stop

19
Biology / Real-life Mutations
« on: October 10, 2008, 05:26:07 PM »
Over here, we get this invasive bush that flowers bright yellow every year. This year I noticed a red bush in the midst of the yellow bushes, looks exactly the same except for the red flowers. An example of spontaneous mutation?

20
Bot Tavern / MB League Standings
« on: October 07, 2008, 11:13:30 PM »
Sorry, Peter, but Stupido Idiotus is stuck in 15th.

#MB
1 - Tribolisv1.0(F2MB)(Bacillus)5.10.08
2 - Seasnake 1.0(MB)(EricL)-23.04l08
3 - Vermis Bicerebrus (MB)(F2)(Bacillus)-01.09.08
4 - Cerberus 2 (MB)(Eight)-13.09.04
5 - Devious Eraticatorus (MB)(irishguy) - 06.28.07
6 - Duo (MB)(Elite)-16.09.06
7 - H. Devincio Triangulus (MB)(PY)-13.11.03
8 - Animal Multi(MB)(Peter)
9 - Gaesum (MB)(Shen)-29.07.04
10- Botumor (MB)(Spoonkiny)-08.09.05
11- Helios (MB)(Light)-18.12.04
12- Inchworm2(MB)(PY)-26.10.04
13- Hexagonis2 (MB)(PY)-12.08.04, Robot DNA file
14- Oranje bot (MB)(Henk)-24.07.04
15- Stupido Idiotus(MB)(Peter)-23.09.07
16- TierMBt2 (MB)(Endy) 08.24.06
17- Vermis Ettinus 0.15 (MB)(Eight)-28.08.04
18- Shen3(MB)(Shen)-13.08.04
19- Octopus (MB)(Welwordian)-12.10.05
20- Triangulus Versabundus (MB)(Shen)-12.08.04
21- Hed Wig (MB)(Ark)-07.03.06
22- Triangulus P. (MB)(Carlo)-2002
23- Inchy (MB)(Endy)-02.11.04
24- Symboticus 2.5 (MB)(SY)(Shen)-02.11.06
25- Vermis P (MB)(Carlo)-2002
26- Dimacheri (MB)(Shen)-28.08.04
27- EMPTY
28- EMPTY
29- EMPTY
30- EMPTY

21
F2 bots / Hydra(F2MB)(Bacillus)(08-10-2008)
« on: October 07, 2008, 10:49:58 PM »
An attempt to make a multibot that uses more than two ties in an organized fashion, whilst trying to keep it simple and effective. You be the judge if it worked or not   
Code: [Select]
'Hydra
'A multibot by Bacillus
'Uses no steering system, instead relies on fixed cells acting as
'pivot for other bots. Very basic in its workings, basically a
'branching animal multi. Pretty stupid, but can get VERY nasty
'very quickly if it finds a field of veggies.

def type 990

def head 1
def main 2

cond
 *.robage 0 =
start
 .tie inc
 .head .type store
stop

start
 500 *.body sub dup .strbody store - .fdbody store
 10 30 rnd *.vel sub .up store
 333 .out1 store
 333 .tout1 store
 *.type .out2 store
 *.type .tout2 store
 50 .sharenrg store
 50 .sharewaste store
 *.in1 *.out1 sub sgn abs *.eye5 30 sub sgn 0 floor mult .fixpos store
stop

cond
 *.nrg 6000 >
 *.numties 3 <
 *.eye5 30 <
start
 50 .repro store
 .main .type store
stop

cond
 *.in1 *.out1 !=
 *.eye5 30 >
start
 16 .shootval store
 *.refxpos *.refypos angle .setaim store
 -6 .shoot store
 *.velup 2 sub .dn store
stop

cond
 *.in1 *.out1 =
 *.shflav 0 =
start
 314 .aimdx store
stop

cond
 *.in1 *.out1 =
 *.eye5 0 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
 0 .shflav store
stop

cond
 *.type .main =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

22
Suggestions / Making the league reproducable
« on: October 07, 2008, 12:18:48 AM »
This might be a stupid idea, but what if every match had a random seed equal to the round number? That way, everyone could reproduce the result of a certain match.

23
Suggestions / Fixing .fixpos
« on: October 05, 2008, 05:02:36 PM »
I have a split decision on this topic, but I really want .fixpos to change from the way it is now. Here are my two suggestions:
1-Make the bot stop ALL movement. When I'm running my Antbot, the thing that irritates me most is that collisions can still move fixed bots.
2-Make .fixpos act as a tie to the environment. This tie should be harder to break than normal ties, but perhaps allow some degree of motion, and snap it if too much tension exists.

24
F2 bots / Tribolisv1.0(F2MB)(Bacillus)5/10/08
« on: October 05, 2008, 04:27:49 AM »
This version did pretty well in F2, although it got stuck with ZeeBeeDee 2.1 because they kept ramming all the veggies away   . It did raise an issue with my bot, though, so I'll think of a way to fix it in the next version.

Code: [Select]
'Tribolis 1.0
'A multibot by Bacillus
'Updates from previous version:
'LOTS of tweaking

'Issues with Tribolis:
''Branching limbs didn't work properly

'SYSVARS

''Amount to wait before panicking
def patience 997

''Amount of ties last cycle
def prevties 998

''Type of body part
def type 999

'Body to sustain
def sustbody 350

'Defense controls
def sustshell 988
def sustpoison 989

'Body part variables
def head 1
def middle 2
def tail 3

'Velocity Variables
''MinV-minimum velocity sustained by organism
def minv 40
''Acc-scale by which speed increases
''smaller numbers result in big, sluggish worms
''optimum lies between 1 and 4
def acc 1

'IO PORTS
''1-Species conspec
''2-Cell Type
''3-Xpos
''4-Ypos
''5-Shell Info
''6-Poison Info
''8-Worm size
''9-Cell ID

'BEGIN DNA
'Initialize cell
''Form tie, set as head
''Conspec
cond
 *.robage 0 =
start
 2 .tie store
 654 .out1 store
 .head .type store
 654 .tout1 store
stop

cond
 *.robage 1 =
start
 628 .aimdx store
stop

''Init part 2-set cell ID
cond
 *.robage 25 =
 *.numties 0 >
 *.eye5 40 <
start
 *.tin9 ++ .tout9 store
stop

'Start out as head
cond
 *.numties 0 =
start
 .head .type store
stop

'If single cell and big enough, divide and form diatom
''Should become new tail
cond
 *.numties 0 =
 *.nrg 2000 >
 *.eye5 40 <
start
 .tout9 store
 .tail .type store
 60 .repro store
stop

'HEAD DNA REGION

'Head update
''Speed determined by cell ID eg. worm size
''OCULUS II
''Move tie out of the way
cond
 *.type .head =
start
 .minv *.tout9 .acc mult add *.velup sub .up store
 628 .fixang store
 *.tout9 .tout8 store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor

mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0

floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0

floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0

floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub

sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult

*.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult

*.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn

mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor

mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor

mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0

floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub

sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6

sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4

sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2

sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3

*.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3

*.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult

*.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult

add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++

sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0

floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++

sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++

sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn

++ sgn     mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn

0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub

sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub    

sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8

sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6

sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult

*.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++

sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++

sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn

mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn

mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop

'Head seeks food
cond
 *.type .head =
 *.eyef 0 >
 *.in1 *.out1 !=
start
 *.refxpos *.refypos angle .setaim store
stop

'If head sees no food and is under attack, turn
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
stop

'Head feeds; if stunned by tail, feed faster
cond
 *.in1 *.out1 !=
 *.eye5 40 >
 *.type .head =
start
 32 *.reffixed 32 add .shootval store
 -6 .shoot store
 *.veldx .sx store
 *.velup 2 sub .dn store
stop

'BODY DNA REGION

'Update
cond
 *.type .middle =
start
 .tout7 dec
 *.tin8 .tout8 store
 *.tout9 .acc mult *.velup sub .up store
stop

'Body disposes of waste
cond
 *.type .middle =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

'Feed when swimming past food
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
start
 4 *.reffixed 28 mult add .shootval store
 -1 *.refpoison sgn -5 mult add .shoot store
stop

'(Hopefully) dissolve multibots
''TEMPORARY GENE
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
 *.refmulti 0 !=
start
 1 .shootval store
 .deltie .shoot store
stop


'Fix broken organsims
''Patience is needed
cond
 *.type .middle =
 *.numties 1 =
start
 .patience inc
stop
''OK, time to break up
cond
 *.type .middle =
 *.numties 1 =
 *.patience 25 =
start
 0 .patience store
 *.tiepres .deltie store
stop

'TAIL DNA REGION

'Tail sensor
cond
 *.type .tail =
 *.shflav 0 !=
start
 *.shang .aimdx store
stop

'Spin around
cond
 *.type .tail =
 *.shflav 0 =
 *.eyef 30 <
 *.in1 *.out1 = or and
start
 1256 rnd .setaim store
stop

'Tail stuns prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.eye5 30 >
 *.reffixed 0 =
start
 .shootval inc
 .fixpos .shoot store
stop

'Tail forces prey to shed nrg
''Useful for getting the head to locate prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.reffixed 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -2 .venval store
 .shoot .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'Instakill venom
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.refshoot 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -31999 .venval store
 .shootval .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'Tail forces change of direction
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.memval 0 >
 *.eye5 30 >
start
 *.refxpos *.refypos angle 628 add .shootval store
 .setaim .shoot store
stop

'DEFENSE SYSTEM

'Kill off foreign ties
cond
 *.tin1 *.tout1 !=
start
 *.tiepres .deltie store
stop

'Remember shots
cond
 *.shflav -1 =
 *.shflav 0 > or
start
 .shoot .ploc store
 .sustpoison inc
stop

cond
 *.shflav -6 =
 *.shflav -3 = or
start
 .sustshell inc
stop

'Relay shot info
cond
 *.tin5 *.tout5 >
start
 *.tin5 .sustshell store
stop

cond
 *.tin6 *.tout6 >
start
 *.tin6 .sustpoison store
stop

'REPRODUCTION

'Form new cell
cond
 *.numties 1 =
 *.type .head =
 *.nrg 5500 *.tout9 100 mult add >
 *.eye5 30 <
 *.robage 25 >
start
 .middle .type store
 50 .repro store
 314 .aimdx store
stop

'Worm bursts due to attack/tension-create lots of new little embryos
cond
 *.prevties *.numties >
 *.nrg 4000 >
start
 .tout9 store
 .deltie inc
stop

'GENERAL MAINTENANCE

'Every now and then, share shell around
''Not immediately to prevent overproduction
cond
 *.timer 50 mod 1 =
start
 50 .shareshell store
stop

'End of cycle
''Lots of maintenance code
start
 .paralyzed .memloc store
 .shflav store
 40 .stifftie store
 *.sustshell *.nrg 6 div ceil .tout5 store
 *.sustpoison *.nrg 6 div ceil .tout6 store
 *.sustshell 10 add *.shell sub .mkshell store
 *.sustpoison 5 add *.poison sub .strpoison store
 -15 *.type .tail sub sgn abs -- abs mult 100 *.type .middle sub sgn

abs -- abs mult add .eye5width store
 *.type .tout2 store
 *.numties .prevties store
 *.type .middle sub sgn abs -- abs 314 mult *.timer 2 mod 2 mult --

mult dup  .aimshoot store
 .eye5dir store
 50 .sharenrg store
 50 .sharewaste store
 .sustbody *.tout9 10 mult add *.body sub dup .strbody store -  .fdbody

store
 0 .fixpos store
 0 .backshot store
 *.mkvirus .delgene store
stop

25
F2 bots / Tribolisv0.3(F2MB)(Bacillus)-2/10/08
« on: October 02, 2008, 04:11:49 AM »
Code: [Select]
'Tribolis 0.3
'A multibot by Bacillus
'Updates from previous version:
'Tweaked Variables
'Changed defensive scheme
'Introduced patience factor to help split up bots

'Issues with Tribolis:
''Branching limbs didn't work properly
'SYSVARS

''Amount to wait before panicking
def patience 997

''Amount of ties last cycle
def prevties 998

''Type of body part
def type 999

'Defense controls
def sustshell 988
def sustpoison 989

'Body part variables
def head 1
def middle 2
def tail 3

'Velocity Variables
''MinV-minimum velocity sustained by organism
def minv 20
''Acc-scale by which speed increases
''smaller numbers result in big, sluggish worms
''optimum lies between 1 and 4
def acc 3

'IO PORTS
''1-Species conspec
''2-Cell Type
''3-Xpos
''4-Ypos
''5-Shell Info
''6-Poison Info
''8-Worm size
''9-Cell ID

'BEGIN DNA
'Initialize cell
''Form tie, set as head
''Conspec
cond
 *.robage 0 =
start
 .tie inc
 654 .out1 store
 .head .type store
 654 .tout1 store
stop

cond
 *.robage 1 =
start
 628 .aimdx store
stop

''Init part 2-set cell ID
cond
 *.robage 25 =
 *.numties 0 >
start
 *.tin9 ++ .tout9 store
stop

'If single cell, divide and form diatom
''Should become new tail
cond
 *.numties 0 =
start
 .tout9 store
 .tail .type store
 50 .repro store
stop

'HEAD DNA REGION

'Head update
''Speed determined by cell ID eg. worm size
''OCULUS II
''Move tie out of the way
cond
 *.type .head =
start
 .minv *.tout9 .acc mult add *.velup sub .up store
 628 .fixang store
 *.tout9 .tout8 store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn     mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop

'Head seeks food
''Also calls tail
cond
 *.type .head =
 *.eyef 0 >
 *.in1 *.out1 !=
start
 *.refxpos *.refypos angle .setaim store
 *.refxpos .tout3 store
 *.refypos .tout4 store
stop

'No food, stop tail from coming
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
start
 .tout3 store
 .tout4 store
stop

'If head sees no food and is under attack, turn
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
 .shflav store
stop

'Head feeds; if stunned by tail, feed faster
cond
 *.in1 *.out1 !=
 *.eye5 40 >
 *.type .head =
start
 4 *.reffixed 28 mult add .shootval store
 -6 *.refshell sgn 5 mult add .shoot store
 *.veldx .sx store
 *.velup 2 sub .dn store
stop


'BODY DNA REGION

'Relay info
cond
 *.type .middle =
start
 .tout7 dec
 *.tin3 .tout3 store
 *.tin4 .tout4 store
 *.tin8 .tout8 store
stop

'Body moves slower than head
cond
 *.type .middle =
start
 *.tout9 .acc mult *.velup sub .up store
stop

'Body disposes of waste
cond
 *.type .middle =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

'Feed when swimming past food
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
start
 4 *.reffixed 28 mult add .shootval store
 -1 .shoot store
stop

'Fix broken organsims
''Patience is needed
cond
 *.type .middle =
 *.numties 1 =
start
 .patience inc
stop
''OK, time to break up
cond
 *.type .middle =
 *.numties 1 =
 *.patience 25 =
start
 0 .patience store
 *.tiepres .deltie store
stop

'TAIL DNA REGION

'Tail stuns prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.eye5 30 >
 *.reffixed 0 =
start
 .shootval inc
 .fixpos .shoot store
stop

'Tail forces prey to shed nrg
''Useful for getting the head to locate prey
cond
 *.type .tail =
 *.reffixed 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -2 .venval store
 .shoot .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'DEFENSE SYSTEM

'Kill off foreign ties
cond
 *.tin1 *.tout1 !=
start
 *.tiepres .deltie store
stop

'Remember shots
cond
 *.shflav -1 =
start
 .shoot .ploc store
 .sustpoison inc
stop

cond
 *.shflav -6 =
start
 .sustshell inc
stop

'Relay shot info
cond
 *.tin5 *.tout5 >
start
 *.tin5 .sustshell store
stop

cond
 *.tin6 *.tout6 >
start
 *.tin6 .sustpoison store
stop

'REPRODUCTION

'Form new cell
cond
 *.numties 1 =
 *.type .head =
 *.nrg 5500 *.tout9 100 mult add >
 *.eye5 30 <
 *.robage 25 >
start
 .middle .type store
 50 .repro store
 314 .aimdx store
stop

'Worm bursts due to attack/tension-create lots of new little embryos
cond
 *.prevties *.numties >
 *.nrg 4000 >
start
 .tout9 store
 .deltie inc
stop

'GENERAL MAINTENANCE

'Every now and then, share shell around
''Not immediately to prevent overproduction
cond
 *.timer 50 mod 1 =
start
 50 .shareshell store
stop

'End of cycle
''update custom vars and IO ports
''Tie regulation
''Eyes have sharpshooter eyes
''Body regulation - feed of other cells if they
''are too big
''Nrg and waste regulation
''Prevent nasty tricks
''Body parts aim to side
start
 40 .stifftie store
 *.sustshell *.nrg 6 div ceil .tout5 store
 *.sustpoison *.nrg 6 div ceil .tout6 store
 *.sustshell *.shell sub .mkshell store
 *.sustpoison *.poison sub .strpoison store
 -15 *.type .tail sub sgn abs -- abs mult 100 *.type .middle sub sgn abs -- abs mult add .eye5width store
 *.type .tout2 store
 *.numties .prevties store
 *.type .middle sub sgn abs -- abs 314 mult *.timer 2 mod 2 mult -- mult dup  .aimshoot store
 .eye5dir store
 50 .sharenrg store
 50 .sharewaste store
 500 *.tout9 10 mult add *.body sub dup .strbody store -  .fdbody store
 0 .fixpos store
 0 .backshot store
 *.mkvirus .delgene store
stop

26
Multi-Bots / Tribolisv0.2(MB)
« on: October 01, 2008, 07:56:38 PM »
Code: [Select]
'Tribolis 0.2
'A multibot by Bacillus
'Updates from previous version:
'Increased efficiency of body control
'Regenerating tail issue resolved

'Issues with Tribolis:
''Two-headed syndrome still present, although rare
''Quite passive
''Branching limbs didn't work properly
''Body Parts useless
'SYSVARS

''Amount of ties last cycle
def prevties 998

''Type of body part
def type 999

'Body part variables
def head 1
def middle 2
def tail 3

'Velocity Variables
''MinV-minimum velocity sustained by organism
def minv 10
''Acc-scale by which speed increases
''smaller numbers result in big, sluggish worms
''optimum lies between 1 and 4
def acc 3

'IO PORTS
''1-Species conspec
''2-Cell Type
''9-Cell ID

'BEGIN DNA
'Initialize cell
''Form tie, set as head
''Conspec
cond
 *.robage 0 =
start
 .tie inc
 654 .out1 store
 .head .type store
 654 .tout1 store
stop

cond
 *.robage 1 =
start
 628 .aimdx store
stop

''Init part 2-set cell ID
cond
 *.robage 25 =
 *.numties 0 >
start
 *.tin9 ++ .tout9 store
stop

'If single cell, divide and form diatom
''Should become new tail
cond
 *.numties 0 =
start
 .tout9 store
 .tail .type store
 50 .repro store
stop

'HEAD DNA REGION

'Head update
''Speed determined by cell ID eg. worm size
''OCULUS II
''Move tie out of the way
cond
 *.type .head =
start
 .minv *.tout9 .acc mult add *.velup sub .up store
 628 .fixang store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0  

 floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub  

 sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9    

*.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor

 mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub  

 sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6

 sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2  

 *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn    

 mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0  

 floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub  

 sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3  

 *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn  

 mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub    

 sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5

 sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7    

*.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn    

mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    

floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub    

sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    

*.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn    

 mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub    

 sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3  

sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add

.focuseye store
stop

'Head seeks food
cond
 *.type .head =
 *.eyef 0 >
 *.in1 *.out1 !=
start
 *.refxpos *.refypos angle .setaim store
stop

'If head sees no food and is under attack, turn
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
 .shflav store
stop

'Head feeds; if stunned by tail, feed faster
cond
 *.in1 *.out1 !=
 *.eye5 40 >
 *.type .head =
start
 4 *.reffixed 28 mult add .shootval store
 -6 *.refshell sgn 5 mult add .shoot store
 *.veldx .sx store
 *.velup 2 sub .dn store
stop


'BODY DNA REGION

'Body moves slower than head
cond
 *.type .middle =
start
 *.tout9 .acc mult *.velup sub .up store
stop

'Body disposes of waste
cond
 *.type .middle =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

'Feed when swimming past food
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
start
 4 *.reffixed 28 mult add .shootval store
 -1 .shoot store
stop

'TAIL DNA REGION

'Tail stuns prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.eye5 30 >
 *.reffixed 0 =
start
 .shootval inc
 .fixpos .shoot store
stop

'If idle, turn away from body
cond
 *.type .tail =
 *.shflav 0 =
 *.eyef 0 =
 *.in1 *.out1 = or
start
 *.trefxpos *.trefypos angle 628 add .setaim store
stop

'Tail forces prey to shed nrg
''Useful for getting the head to locate prey
cond
 *.type .tail =
 *.reffixed 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -2 .venval store
 .shoot .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'If tail sees no prey and is under attack, turn
cond
 *.type .tail =
 *.in1 *.out1 =
 *.shflav 0 !=
start
 *.shang .aimdx store
 .shflav store
stop

'DEFENSE SYSTEM

'Produce shell and poison
cond
 *.shflav -1 =
start
 50 *.poison sub .strpoison store
 .shoot .ploc store
stop

cond
 *.shflav -6 =
start
 25 *.shell sub .mkshell store
stop

'REPRODUCTION

'Form new cell
cond
 *.numties 1 =
 *.type .head =
 *.nrg 6000 >
 *.eye5 30 <
 *.robage 25 >
start
 .middle .type store
 50 .repro store
 314 .aimdx store
stop

'Worm bursts due to attack/tension-create lots of new little embryos
cond
 *.prevties *.numties >
 *.nrg 4000 >
start
 .tout9 store
 .deltie inc
stop

'GENERAL MAINTENANCE

'Repair tail
''No need to repair head as it would cause worm to burst anyway
cond
 *.numties 1 =
 *.type .middle =
 *.tin9 *.tout9 >
start
 .tail .type store
stop

'If foreign tie is found, feed off parasite
cond
 *.tin1 *.tout1 !=
start
 -1 .tieloc store
 -1000 .tieval store
stop

'Every now and then, share shell around
''Not immediately to prevent overproduction
cond
 *.timer 50 mod 1 =
start
 50 .shareshell store
stop

'End of cycle
''update custom vars and IO ports
''Tie regulation
''Eyes have sharpshooter eyes
''Body regulation - feed of other cells if they
''are too big
''Nrg and waste regulation
''Prevent nasty tricks
''Body parts aim to side
start
 -6 .tieloc store
 1000 *.tin9 10 mult add *.trefbody sub 0 ceil .tieval store
 40 .stifftie store
 100 .tielen store
 -15 *.type .tail sub sgn abs -- abs mult .eye5width store
 *.type .tout2 store
 *.numties .prevties store
 *.type .middle sub sgn abs -- abs 314 mult *.timer 2 mod 2 mult -- mult dup  .aimshoot store
 .eye5dir store
 50 .sharenrg store
 50 .sharewaste store
 500 *.tout9 10 mult add *.body sub dup .strbody store -  .fdbody store
 .fixpos store
 .backshot store
 *.mkvirus .delgene store
stop

27
Multi-Bots / Tribolis 0.1(MB)(Bacillus)-2/10/08
« on: October 01, 2008, 06:48:37 PM »
I was actually going to wait with posting, but I think I have done enough tweaking to post the first version.
Quick run over main features:
-Bot speeds up as it increases in size
-If a tie breaks, all the other ties are broken, releasing lots of new Triboli
-Uses shell and poison as defense
-Used to wrap around pray, but I cut that feature out in the latest update
-tail fixes prey, then pumps it full of poison
-Head turns towards shots, which helps locate prey
-Body shoots and releases waste to the sides
-Used to have limbs, feature cut out until I can get it to work properly (the legs think they're heads   )

Code: [Select]
'Tribolis
'A multibot by Bacillus
'Basically a one-headed version of V. Bicerebrus,
'with general upgrades that make it better on large-scale

maps
'Basic defense system and stinging tail

'Issues with Tribolis:
''Two-headed syndrome still present, although rare
''Quite passive
''Branching limbs didn't work properly
''Body Parts useless
'SYSVARS

''Amount of ties last cycle
def prevties 998

''Type of body part
def type 999

'Body part variables
def head 1
def middle 2
def tail 3

'Velocity Variables
''MinV-minimum velocity sustained by organism
def minv 10
''Acc-scale by which speed increases
''smaller numbers result in big, sluggish worms
''optimum lies between 1 and 4
def acc 3

'IO PORTS
''1-Species conspec
''2-Cell Type
''9-Cell ID

'BEGIN DNA
'Initialize cell
''Form tie, set as head
''Conspec
cond
 *.robage 0 =
start
 .tie inc
 654 .out1 store
 .head .type store
 654 .tout1 store
stop

cond
 *.robage 1 =
start
 628 .aimdx store
stop

''Init part 2-set cell ID
cond
 *.robage 25 =
 *.numties 0 >
start
 *.tin9 ++ .tout9 store
stop

'If single cell, divide and form diatom
''Should become new tail
cond
 *.numties 0 =
start
 .tout9 store
 .tail .type store
 50 .repro store
stop

'HEAD DNA REGION

'Head update
''Speed determined by cell ID eg. worm size
''OCULUS II
''Move tie out of the way
cond
 *.type .head =
start
 .minv *.tout9 .acc mult add *.velup sub .up store
 628 .fixang store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub

sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult

*.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn

0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1

*.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor

mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9

*.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor

mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn

0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9

*.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn

mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2

*.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor

mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5

sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult

*.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub

sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn    

mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub

sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult

*.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn

0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8

*.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn

++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3

*.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor

mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn

0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3

*.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++

sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7

*.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor

mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4

sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult

*.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4

*.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn  

  mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6

sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor

mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub

sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add

1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn

++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4

*.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor

mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn

++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0

*.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn

++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5

*.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn

mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2

sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add

.focuseye store
stop

'Head seeks food
cond
 *.type .head =
 *.eyef 0 >
 *.in1 *.out1 !=
start
 *.refxpos *.refypos angle .setaim store
stop

'If head sees no food and is under attack, turn
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
 .shflav store
stop

'Head feeds; if stunned by tail, feed faster
cond
 *.in1 *.out1 !=
 *.eye5 40 >
 *.type .head =
start
 4 *.reffixed 28 mult add .shootval store
 -6 *.refshell sgn 5 mult add .shoot store
 *.veldx .sx store
 *.velup 2 sub .dn store
stop


'BODY DNA REGION

'Body moves slower than head
cond
 *.type .middle =
start
 *.tout9 .acc mult *.velup sub .up store
stop

'Body disposes of waste
cond
 *.type .middle =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

'Feed when swimming past food
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
start
 4 *.reffixed 28 mult add .shootval store
 -1 .shoot store
stop

'Body moves if body mass becomes too large
''Used to encorage reproduction
cond
 *.type .body =
 *.body 750 *.tout9 10 mult add >
start
 20 .dx store
stop

'TAIL DNA REGION

'Tail stuns prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.eye5 30 >
 *.reffixed 0 =
start
 .shootval inc
 .fixpos .shoot store
stop

'If idle, turn away from body
cond
 *.type .tail =
 *.shflav 0 =
 *.eyef 0 =
 *.in1 *.out1 = or
start
 *.trefxpos *.trefypos angle 628 add .setaim store
stop

'Tail forces prey to shed nrg
''Useful for getting the head to locate prey
cond
 *.type .tail =
 *.reffixed 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -2 .venval store
 .shoot .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'If tail sees no prey and is under attack, turn
cond
 *.type .tail =
 *.in1 *.out1 =
 *.shflav 0 !=
start
 *.shang .aimdx store
 .shflav store
stop

'DEFENSE SYSTEM

'Produce shell and poison
cond
 *.shflav -1 =
start
 50 *.poison sub .strpoison store
 .shoot .ploc store
stop

cond
 *.shflav -6 =
start
 25 *.shell sub .mkshell store
stop

'REPRODUCTION

'Form new cell
cond
 *.numties 1 =
 *.type .head =
 *.nrg 6000 >
 *.eye5 30 <
 *.robage 25 >
start
 .middle .type store
 50 .repro store
 314 .aimdx store
stop

'Worm bursts due to attack/tension-create lots of new

little embryos
cond
 *.prevties *.numties >
 *.nrg 4000 >
start
 .tout9 store
 .deltie inc
stop

'GENERAL MAINTENANCE

'If foreign tie is found, feed off parasite
cond
 *.tin1 *.tout1 !=
start
 -1 .tieloc store
 -1000 .tieval store
stop

'Every now and then, share shell around
''Not immediately to prevent overproduction
cond
 *.timer 50 mod 1 =
start
 50 .shareshell store
stop

'End of cycle
''update custom vars and IO ports
''Tie regulation
''Eyes have sharpshooter eyes
''Body regulation
''Nrg and waste regulation
''Prevent nasty tricks
''Body parts aim to side
start
 40 .stifftie store
 100 .tielen store
 -15 *.type .tail sub sgn abs -- abs mult .eye5width

store
 *.type .tout2 store
 *.numties .prevties store
 *.type .middle sub sgn abs -- abs 314 mult *.timer 2 mod

2 mult -- mult dup  .aimshoot store
 .eye5dir store
 50 .sharenrg store
 50 .sharewaste store
 500 *.tout9 10 mult add *.body sub dup .strbody store -  

.fdbody store
 .fixpos store
 .backshot store
 *.mkvirus .delgene store
stop

28
Simulation Emporium / Great Spiral simulation
« on: September 12, 2008, 06:37:31 PM »
After tweaking the constants of Spiral, I made a version that creates minimal amounts of swarms. They look really cool, but depend on one veggie and I don't know how stable it is.

29
Bugs and fixes / 'Duplicate Species' button
« on: September 05, 2008, 02:20:24 PM »
When the 'Duplicate Species' button is clicked, an error message comes up saying that only bots originated in this simulation can be cloned. However, you can't put bots from the simulation into the loaded species list (as far as I know,  so this may not be a bug). Is this a useless button, or how does it work?

30
Bot Tavern / New F1 bot standings
« on: September 04, 2008, 08:39:42 PM »
F1 BOT STANDINGS
Last updated 11/10/08

1 - Saber
2 - Fruit_Fliesv0.21
3 - Etch Mk II(F1)(abyaly)-15.03.2008
4 - Occura Amplificis(F1)(bacillus)-25.03.08
5 - TieFighters
6 - Pacifist (5G) (Moonfisher) 19-02-08
7 - Spinnerv1.52
8 - Locust(F1)(Moonfisher)
9 - Ebola (F1Vir) (Moonfisher)
10- Multiply4(F1)(F2)(Peter)19-12-07
11- Excalibur 1.12 (F2)(Light)-06.03.07
12- Callidus(F1)(Shen)-05.04.05
13- Blue on blue (F2)(Jez)-05.08.06
14- Bubbles (F2)(Jez)-21.08.06
15- Reaper (F1)(Googlyeyesultra)-17.07.07
16- Detonator v1.2(F1)(bacillus)-24.04.08
17- Martian Tank 3 (F2)(Martian)-06.07.2007
18- Singula Haloculus v2.1(F1)(bacillus)21.04.08
19- The One (1G)(Shen)-23.04.05
20- Republican Wasp (F1)(Commander Keen)

Pages: 1 [2] 3 4 ... 6