1
Bot Tavern / Fibonacci
« on: September 19, 2015, 09:44:02 AM »
I'm thinking of making a bot that will search for food in a Fibonacci Spiral or "golden spiral".
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.
def ex 55
def ey 54
def circle 53
def qx 56
def qy 57
def queen 50
def worker 51
def queenset 58
def goinghome 59
def nrgratio 100
cond
*.queen 1 =
start
10 dup *.nrgratio sub sgn abs .nrgratio mult store
100 .strbody *.nrg *.body 10 div *.nrgratio ++ mult sub sgn 0 floor mult store
100 .fdbody *.body 10 div *.nrgratio mult *.nrg sub sgn 0 floor mult *.body 100 sub sgn 0 floor mult store
stop
'/*****proper reproduction 1
cond
*.nrg
20000
>
start
50
.repro
store
cond
*.robage 50 >=
*.nrg 1000 >=
*.worker 0 =
start
2 .repro store
1 .queen store
1 .out6 store
1 .fixpos store
stop
cond
*.eye5 50 >
*.in6 1 =
start
1 .queenset store
1 .worker store
*.refxpos .qx store
*.refypos .qy store
1 .out7 store
stop
cond
*.in6 1 =
*.robage 20 >
*.goinghome 0 =
start
1 .dn store
0 .fixpos store
stop
cond
*.goinghome 1 =
*.in7 1 =
start
0 .fixpos store
1 .dx store
stop
cond
*.kills 0 >
*.queenset 1 =
*.worker 1 =
start
1 .goinghome store
0 .circle store
stop
cond
*.goinghome 1 =
*.worker 1 =
start
*.qx *.qy angle .setaim store
1 .up store
stop
cond
*.robage 20 >=
*.circle 0 =
start
*.xpos .ex store
*.ypos .ey store
stop
cond
*.goinghome 1 =
*.robage 15 mod 0 =
*.worker 1 =
*.in6 1 =
start
1 .fixpos store
stop
cond
*.goinghome 1 =
*.refeye *.myeye =
*.in6 1 =
*.worker 1 =
*.hit 1 =
start
-2 .shoot store
stop
cond
*.goinghome 1 =
*.robage 20 mod 0 =
*.worker 1 =
*.in6 1 =
start
0 .fixpos store
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
start
*.refxpos .ex store
*.refypos .ey store
*.refxpos .out1 store
*.refypos .out2 store
1 .out5 store
1 .circle store
stop
cond
*.circle 1 =
*.ex 0 !=
*.ey 0 !=
start
1 .up store
*.ex *.ey angle .setaim store
else
1 .up store
stop
cond
*.queen 1 =
*.circle 1 =
start
0 .circle store
stop
cond
*.eye5 50 >
*.refeye *.myeye =
*.in5 1 =
*.in1 0 !=
*.in2 0 !=
*.worker 1 =
start
*.in1 .ex store
*.in2 .ey store
*.ex .out1 store
*.ey .out2 store
1 .out5 store
1 .circle store
stop
cond
*.eye5 0 =
*.circle 0 =
start
314 rnd .aimdx store
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
stop
cond
*.circle 1 =
*.refeye *.myeye =
*.hit 1 =
*.goinghome 0 =
start
628 .aimdx store
stop
cond
*.in6 1 =
*.worker 1 =
start
*.refxpos .qx store
*.refypos .qy store
stop
'#generation: 7
'#mutations: 14
cond
*.robage mod 0 =
start
628 .aimright divstore
stop
'''''''''''''''''''''''' Gene: 1 Ends at position 10 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 2 Begins at position 11 '''''''''''''''''''''''
cond
*.robage 5 mod 0 =
*.eye5 0 =
start
314 rnd .aimright store
stop
'''''''''''''''''''''''' Gene: 2 Ends at position 25 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 3 Begins at position 26 '''''''''''''''''''''''
cond
*.body 331 <=
start
0 *51 *.myeye *.refeye
'''''''''''''''''''''''' Gene: 3 Ends at position 34 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 4 Begins at position 35 '''''''''''''''''''''''
cond
stop
'''''''''''''''''''''''' Gene: 4 Ends at position 36 '''''''''''''''''''''''
store
=
'''''''''''''''''''''''' Gene: 5 Begins at position 39 '''''''''''''''''''''''
start
*.aim 10 add 19 <
'''''''''''''''''''''''' Gene: 5 Ends at position 44 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 6 Begins at position 45 '''''''''''''''''''''''
cond
else
50 >
*.refeye *.myeye
'''''''''''''''''''''''' Gene: 6 Ends at position 50 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 7 Begins at position 51 '''''''''''''''''''''''
start
0 .fixpos store
1 .up store
stop
'''''''''''''''''''''''' Gene: 7 Ends at position 58 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 8 Begins at position 59 '''''''''''''''''''''''
cond
*.eye5 50 >
*.refeye *.myeye =
*.refkills *.kills >
*.refage *.robage >
start
0 .fixpos store
1 .up store
-2 .shoot store
stop
'''''''''''''''''''''''' Gene: 8 Ends at position 82 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 9 Begins at position 83 '''''''''''''''''''''''
cond
*.kills -3 clear >
*.body 331 >=
*.robage 50 mod 0 =
start
1 *51 store
1 .out5 store
1 .fixpos store
stop
'''''''''''''''''''''''' Gene: 9 Ends at position 106 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 10 Begins at position 107 '''''''''''''''''''''''
cond
*51 1 =
start
10 dup *0 sub sgn abs 0 mult store
100 313 *.nrg *.body 18 div *0 ++ mult sub sgn 0 floor mult store
100 312 *.body 10 div *0 mult *.nrg sub sgn 0 floor mult *.body 100 ~=
sub sgn 0 -- floor mult store
stop
'''''''''''''''''''''''' Gene: 10 Ends at position 159 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 11 Begins at position 160 '''''''''''''''''''''''
cond
*.nrg 20000 >
start
50 .repro store
1 972 store
stop
'''''''''''''''''''''''' Gene: 11 Ends at position 171 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 12 Begins at position 172 '''''''''''''''''''''''
cond
*972 *.up dec
start
50 .repro store
stop
'''''''''''''''''''''''' Gene: 12 Ends at position 180 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 13 Begins at position 181 '''''''''''''''''''''''
cond
*.nrg 3000 <
start
0 972 store
stop
'''''''''''''''''''''''' Gene: 13 Ends at position 189 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 14 Begins at position 190 '''''''''''''''''''''''
cond
*.robage 25 mod 0 =
*51 1 =
start
1 .fixpos store
stop
'''''''''''''''''''''''' Gene: 14 Ends at position 203 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 15 Begins at position 204 '''''''''''''''''''''''
cond
*51 1 =
start
10 .repro store
10 .fdbody store
stop
'''''''''''''''''''''''' Gene: 15 Ends at position 215 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 16 Begins at position 216 '''''''''''''''''''''''
cond
*51 0 =
*.in5 1 =
start
1 .fixpos store
stop
'''''''''''''''''''''''' Gene: 16 Ends at position 227 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 17 Begins at position 228 '''''''''''''''''''''''
cond
*.eye5 50 >
sgn *.myeye =
*.refkills *.kills >
start
0 .fixpos store
*.refxpos .out1 store
*.refypos .out2 store
stop
'''''''''''''''''''''''' Gene: 17 Ends at position 248 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 18 Begins at position 249 '''''''''''''''''''''''
cond
*.robage 0 =
start
300 989 store
500 987 store
341 .memloc store
100 .mkshell inc
stop
'''''''''''''''''''''''' Gene: 18 Ends at position 266 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 19 Begins at position 267 '''''''''''''''''''''''
cond
0 start
341 .memloc store
stop
'''''''''''''''''''''''' Gene: 19 Ends at position 273 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 20 Begins at position 274 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
*.poisoned 0 =
*.in1 0 !=
*.in2 0 !=
or
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 =
*.shflav -2 =
or
start
*.in1 *.in2 angle .setaim store
*.in1 *.in2 dist 500 div *.maxvel mult *.refvelup add 0 floor *.maxvel ceil store
*.veldx .sx store
stop
'''''''''''''''''''''''' Gene: 20 Ends at position 329 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 21 Begins at position 330 '''''''''''''''''''''''
cond
*.robage 5 mod 0 =
*51 0 =
*.in1 0 !=
*.in2 0 !=
start
'''''''''''''''''''''''' Gene: 21 Ends at position 345 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 22 Begins at position 346 '''''''''''''''''''''''
start
*.in1 *.in1 store
19 angle *.in2 *.in2 dist 500 div *.maxvel mult *.refvelup add 4 *-225 floor *.maxvel ceil .up store
*.veldx .sx store
stop
'''''''''''''''''''''''' Gene: 22 Ends at position 371 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 23 Begins at position 372 '''''''''''''''''''''''
cond
*.edge 1 =
start
30 .dn store
stop
'''''''''''''''''''''''' Gene: 23 Ends at position 380 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 24 Begins at position 381 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
*.poisoned 0 =
*.in1 0 =
*.in2 0 =
and
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 -2 =
or
*.refkills 0 >
start
*.refxpos *.refypos angle 280 add .setaim store
stop
'''''''''''''''''''''''' Gene: 24 Ends at position 422 '''''''''''''''''''''''
*51 0 *.paralyzed 0 =
*.poisoned -4 =
*.in1 0 =
*.in2 0 =
and
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 !=
*.shflav -2 .setaim store
0 .shflav store
15 .shoot store
*.shang *.aim add .aimshoot store
stop
pyth
'''''''''''''''''''''''' Gene: 25 Begins at position 467 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye4 0 =
*.eye3 0 =
*.eye2 0 =
*.eye1 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .setaim store
0 .shflav store
-1 .shoot store
*.aim add .aimshoot store
stop
'''''''''''''''''''''''' Gene: 25 Ends at position 523 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 26 Begins at position 524 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
*.poisoned 0 =
*.in1 0 !=
*.in2 0 !=
or
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 =
*.shflav -2 =
or
angle .setaim store
*.in1 *.in2 dist 500 div *.maxvel mult *.refvelup add 0 floor *.maxvel ceil .up store
.sx store
stop
'''''''''''''''''''''''' Gene: 26 Ends at position 576 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 27 Begins at position 577 '''''''''''''''''''''''
cond
*.paralyzed 0 =
*.poisoned 0 =
*.robage 1 >
*.eye5 9 >
*.memval *.genes !=
*.refeye *.myeye !=
stop
'''''''''''''''''''''''' Gene: 27 Ends at position 596 '''''''''''''''''''''''
*555 -- dist *22 sub .aimshoot store
-6 .shoot store
*.nrg 32 div .shootval store
stop
'''''''''''''''''''''''' Gene: 28 Begins at position 613 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
0 =
*.robage 1 >
0 >
*.memval *.genes !=
*.numties 0 =
start
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 500 div *.maxvel mult *.refvelup add 0 floor *.maxvel ceil .up store
*.refxpos .out1 store
*.refypos .out2 store
stop
'''''''''''''''''''''''' Gene: 28 Ends at position 659 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 29 Begins at position 660 '''''''''''''''''''''''
cond
*51 0 *.paralyzed 0 =
*.poisoned 0 =
*.refeye 0 =
*.eye5 0 =
or
*.memval *.genes =
*.eye5 0 >
0 *.in1 and
=
and
*.in2 0 =
and
or
*.out1 0 !=
*.out2 0 !=
or
start
0 .out1 store
0 .out2 store
stop
'''''''''''''''''''''''' Gene: 29 Ends at position 706 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 30 Begins at position 707 '''''''''''''''''''''''
cond
*.paralyzed 0 =
*.poisoned 0 =
*990 0 !=
start
*.aim 628 add pyth store
990 dec
1 .deltie store
0 .shoot store
stop
'''''''''''''''''''''''' Gene: 30 Ends at position 731 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 31 Begins at position 732 '''''''''''''''''''''''
cond
*.paralyzed 0 =
*.poisoned 0 =
*.robage 1 =
*.numties 0 >
*.memval *.genes =
or
start
*.aim 280 add .setaim store
0 .shoot store
stop
'''''''''''''''''''''''' Gene: 31 Ends at position 758 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 32 Begins at position 759 '''''''''''''''''''''''
cond
*.numties 0 >
start
*.tiepres .deltie store
stop
'''''''''''''''''''''''' Gene: 32 Ends at position 767 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 33 Begins at position 768 '''''''''''''''''''''''
cond
*.paralyzed 0 =
*.poisoned 0 =
*.nrg *987 >
*.body 3190 <
start
100 .strbody store
stop
'''''''''''''''''''''''' Gene: 33 Ends at position 785 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 34 Begins at position 786 '''''''''''''''''''''''
cond
=
*.paralyzed cos 0 !%=
=
*.poisoned 0 =
*.nrg *986 <
*.body 11 >
start
100 .fdbody store
stop
'''''''''''''''''''''''' Gene: 34 Ends at position 806 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 35 Begins at position 807 '''''''''''''''''''''''
cond
*.paralyzed 0 =
*.poisoned 0 =
*.shell 100 <
*.nrg 500 >
and
*.shflav -6 =
or
*.shflav -3 =
or
start
50 822 swap store
0 .shflav store
stop
'''''''''''''''''''''''' Gene: 35 Ends at position 837 '''''''''''''''''''''''
stop
*.mkshell -18 =
*.poisoned 0 =
*.waste 50 >
*.memval *.genes !=
'''''''''''''''''''''''' Gene: 36 Begins at position 851 '''''''''''''''''''''''
start
-4 .shoot store
*.waste .shootval store
stop
'''''''''''''''''''''''' Gene: 36 Ends at position 858 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 37 Begins at position 859 '''''''''''''''''''''''
cond
*.poisoned 0 !=
*.paralyzed 0 !=
or
start
100 .repro store
*.aim 280 add 999 .out3 store
stop
'''''''''''''''''''''''' Gene: 37 Ends at position 877 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 38 Begins at position 878 '''''''''''''''''''''''
cond
start
*987 2 div 986 store
*.genes 340 *.thisgene *.genes sub dup div mult *.robage sgn stop
'''''''''''''''''''''''' Gene: 38 Ends at position 895 '''''''''''''''''''''''
inc
.genes store
mult
'''''''''''''''''''''''' Gene: 39 Begins at position 900 '''''''''''''''''''''''
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
*.refxpos *.refypos angle .setaim store
stop
'''''''''''''''''''''''' Gene: 39 Ends at position 916 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 40 Begins at position 917 '''''''''''''''''''''''
cond
*.in1 0 !=
*.in2 0 !=
start
*.in1 .out1 store
*.in2 .out2 store
stop
'''''''''''''''''''''''' Gene: 40 Ends at position 931 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 41 Begins at position 932 '''''''''''''''''''''''
cond
*.eye5 50 >
*.refeye *.myeye !=
start
*.refxpos .out1 store
*.refypos .out2 store
stop
'''''''''''''''''''''''' Gene: 41 Ends at position 946 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 42 Begins at position 947 '''''''''''''''''''''''
cond
*.robage 50 mod 0 =
*0 0 =
start
*.in1 *.in2 angle .setaim store
*.in1 *.out1 store
*.in2 *.out2 store
1 .up store
0 .fixpos store
stop
'''''''''''''''''''''''' Gene: 42 Ends at position 974 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 43 Begins at position 975 '''''''''''''''''''''''
cond
*.in1 0 !=
*.in2 0 !=
start
*.in1 *.in2 angle .setaim store
stop
'''''''''''''''''''''''' Gene: 43 Ends at position 988 '''''''''''''''''''''''
'#hash: wv4i{k!%uX+8B<{M}S2"