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 - ashton15

Pages: [1]
1
Interesting behaviour bots / Vox Addo
« on: May 15, 2010, 01:40:41 PM »
Okies first bot after I accidently deleted the last lot, this bots pretty feeble as I couldn't be botherd to make it a strong bot once I had it working but has some intresting behaviour, sends veggies to the center and makes a kind of colony there, the bots do not communicate in any way but support each other independently, use instakill ties and is the first bot I know of to genuinely dogfight and actively avoid the enmies shots also has a unique eye system where eye5 acts as a rotatable turret as opposed to using .focuseye, this is basically lots of features but  all mish mashed, I'm hoping to develop a more stable complex society bot but here it is anyway... gonna release it on IM now, I'm slightly disapointed with it but hey I can improve it I guees. requires space bigger than 32000 by 32000

Code: [Select]
def IFFF5 102
def IFFF6 103

'-=_SETUP_=-'
cond
*.robage 0 =
start
1744 .eye1dir store
1622 .eye2dir store
1500 .eye3dir store
1378 .eye4dir store
1291 .eye6dir store
1169 .eye7dir store
1047 .eye8dir store
925 .eye9dir store
122 .eye1width store
122 .eye2width store
122 .eye3width store
122 .eye4width store
122 .eye5width store
122 .eye6width store
122 .eye7width store
122 .eye8width store
122 .eye9width store
1 .focuseye store
.dnalen .memloc store
5 .shootval store
32000 rnd 32000 rnd sub .timer store
stop

'-=_VENOM_=-'
start
.shootval .vloc store
32000 .venval store
stop

cond
*.venom 250 <
start
100 .strvenom store
stop

cond
*.IFFF6 3 =
*.eye6 0 !=
*.timer abs 5 mod 0 =
start
-3 .shoot store
stop


'-=_FACE CENTER_=-'
cond
*.numties 0 =
*.nrg 500 >
start
16000 16000 angle 628 add 1256 mod .setaim store
16000 16000 dist *.timer abs 250 sub sub *.maxvel ceil *.maxvel - floor .dn store
stop

cond
*.numties 0 =
*.nrg 500 <=
start
16000 16000 angle 1256 mod .setaim store
16000 16000 dist 500 sub *.maxvel ceil *.maxvel - floor - .dn store
stop

''-=_TURN EYE5 TO CLOSEST_=-'
cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn =
start
1884 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add =
start
1727 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add =
start
1570 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add =
start
1413 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add =
start
1256 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add =
start
1099 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add =
start
942 .eye5dir store
stop

cond
*.timer
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add mod
*.eye1 sgn
*.eye2 sgn add
*.eye3 sgn add
*.eye4 sgn add
*.eye6 sgn add
*.eye7 sgn add
*.eye8 sgn add
*.eye9 sgn add =
start
785 .eye5dir store
stop

'-=_IFFF_=-'
cond
*.dnalen *.memval !=
*.memval 100 >
start
3 .IFFF5 store
stop

cond
*.dnalen *.memval !=
*.memval 100 <=
start
2 .IFFF5 store
stop

cond
*.dnalen *.memval =
start
1 .IFFF5 store
stop

cond
*.eye5 0 =
start
0 .IFFF5 store
stop

cond
*.myeye *.refeye !=
*.refeye 1 >
start
3 .IFFF6 store
stop

cond
*.myeye *.refeye !=
*.refeye 1 <=
start
2 .IFFF6 store
stop

cond
*.myeye *.refeye =
start
1 .IFFF6 store
stop

cond
*.eye6 0 =
start
0 .IFFF6 store
stop

'-=_BODY MANAGEMENT_=-'
cond
*.body 2 >
start
*.body 2 sub 100 ceil .fdbody store
stop

cond
*.body 2 <
start
*.body 2 sub 100 ceil .strbody store
stop

'-=_TURN TO ITEM OF INTREST IN EYE5_=-'
cond
*.IFFF5 *.IFFF6 <
start
*.eye5dir *.aim add 1256 mod .setaim store
stop

'-=_FOLLOW TARGET_=-'
cond
*.IFFF6 1 >
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.numties 0 =
stop

'-=_DODGE ENEMIES ATTACKS_=-'
cond
*.IFFF6 3 =
*.eye6 0 !=
*.refxpos *.refypos angle 628 add 1256 mod *.refaim 1256 mod >=
*.refxpos *.refypos angle 628 add 1256 mod *.refaim 20 add 1256 mod <
start
*.refveldx *.maxvel add .dx store
stop

cond
*.IFFF6 3 =
*.eye6 0 !=
*.refxpos *.refypos angle 628 add 1256 mod *.refaim 1256 mod <
*.refxpos *.refypos angle 628 add 1256 mod *.refaim 20 sub 1256 mod >
start
*.refveldx *.maxvel sub .dx store
stop

'-=_TIE_=-'
cond
*.numties 0 =
*.IFFF6 3 =
start
16000 rnd 16000 add .tie store
stop

cond
*.numties 0 =
*.IFFF6 2 =
16000 16000 dist 2000 >
*.nrg 1250 < or
start
16000 rnd .tie store
stop

cond
*.numties 1 =
start
*.tiepres .tienum store
stop

cond
*.numties 1 =
*.tiepres 16000 >=
start
100 .sharenrg store
100 .shareshell store
100 .shareslime store
1 .sharewaste store
.shoot .tieloc store
-2 .tieval store
stop

cond
*.numties 1 =
*.tiepres 16000 <
start
50 .sharenrg store
0 .tieloc
stop

cond
*.tiepres 16000 <
*.numties 0 !=
16000 16000 dist 1600 <
*.nrg 500 >
start
*.tiepres .deltie store
stop

cond
*.shflav 0 !=
*.shflav 2 !=
*.numties 0 !=
*.tiepres 10 =
start
*.tiepres .deltie store
628 .aimdx store
0 .shflav store
stop

'-=_REPRODUCTION_=-'
cond
*.nrg 1200 >
start
50 .repro store
628 .aimdx store
*.maxvel .dn store
stop

'-=_VIRUS_=-'
cond
*.vtimer 1 =
start
50 .vshoot store
stop

cond
*.nrg 500 >
*.timer 1000 mod 100 <
start
*.genes .mkvirus store
stop

cond
*.myeye 1 <=
start
16000 16000 angle 628 add 1256 mod .setaim store
16000 16000 dist *.timer abs 16 div sub *.maxvel ceil *.maxvel - floor .dn store
stop

2
Untagged bots / Smarter algae
« on: April 16, 2010, 08:34:37 AM »
Well alga_minimalis is pretty pathetic really... I mean it'll just let itself get shot, what kind of plant would do that? Wait, don't awnser that... but anyways here we have two algae with the inteligence to actually do something... first ligamen lentesco meaning stringy and sticky... that's pretty much it, entangles other bots, if there's enough of them they may be able to kill a weaker bot like animal_minimalis though it's unlikely.

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'By:       Ashton15
'Name:       Ligamen lentesco
'Description:    Tangles other bots up and
      forms large colonies
               
start

 *.robage 0 =
 .fdbody .tieloc store
 100 .tieval store

 *50 0 =
 1 .dn store
 50 .sharenrg store
 *.nrg 8000 > and
 30 .repro store
 .tie inc

 *.shflav 0 !=
 *.shflav -2 != and
 *.refeye *.myeye != and
 25 .aimright store
 0 .shflav store
 *50 0 = and
 50 inc
 0 .timer store

 *50 1 =
 *.trefnrg 10 mult *.nrg > and
 99 .sharenrg store
 *.refeye *.myeye != and
 *.eye5 0 != and
 *.refxpos *.refypos angle .setaim store
 .shoot dec
 *.nrg 200 > and
 50 .repro store
 *.refeye *.myeye =
 *50 1 = and

 100 *.timer <
 *50 1 = and
 50 dec
 *.eye5 0 !=
 .tie inc

stop

And then there's effervo sero or swarming plant, basically it makes this big moving ball like a shoal of small fish, it can throw enemies just through centrifrugal force... a large colony can tear seasnake apart, and will change direction frequently to confuse... many animals die in the middle of the swarm because they can't get their energy... very hard to thrive on this algae, oh and it only works in sims larger than 32000 in both directions. It's highly unrecomended but you can add this gene near the end to make it shoot, so far I've not found anything that can survive in an enviroment with the shooting variety. I'm not entirely sure how but on two seprate occasions the colony has split with no apparent cause, not even a mutation it's not coded anywhere to split either though I've tried to code it in a way so that it splits when there are 250 in any one colony though I got impatient and gave up, a viable batterybot animal using this as a base would be intresting though probably quite hard to code bearing in mind this throws out any attacking bot should it lack viligance.

*.refeye *.myeye !=
*.eye5 10 > and
*.refxpos *.refypos angle .setaim
*.refxpos .tout1 store
*.refypos .tout2 store
*.refeye 0 != and
-6 .shoot store
*.eye5 50 <
-2 .shootval store
not
4 .shootval store


[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'By:       Ashton15
'Name:       Effero Sero
'Description:    Makes a large moving ball
      to confuse animals

start
 
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add angle 628 add .setaim store

 *.eye9 0 !=
 4 .focuseye store
 *.eye1 0 !=
 -4 .focuseye store
 *.eye8 0 !=
 3 .focuseye store
 *.eye2 0 !=
 -3 .focuseye store
 *.eye7 0 !=
 2 .focuseye store
 *.eye3 0 !=
 -2 .focuseye store
 *.eye6 0 !=
 1 .focuseye store
 *.eye4 0 !=
 -1 .focuseye store
 *.eye5 0 !=
 0 .focuseye store

 *.refeye *.myeye =
 *.eye5 0 = or
 *.tin1 0 = and
 *.tin5 0 = and
 *.numties 2 < and
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist *.totalmyspecies 300 add > and
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist 2000 div 3 add .dn store true
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist 1000 div 2 pow - 21 add 0 floor .dx store

 *.tin5 1 =
 -4 2 *.daytime mult store
 *.eye1 0 !=
 *.eye2 0 != and
 *.eye3 0 != and
 *.eye4 0 != and
 *.eye5 0 != and
 *.eye6 0 != and
 *.eye7 0 != and
 *.eye8 0 != and
 *.eye9 0 != and
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist *.totalmyspecies 500 add < and
 1 .tout5 store

 *.eye5 0 !=
 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist *.totalmyspecies 2600 add < and
 .tie inc
 200 .fixlen store

 *.timer abs 4000 mod 4 mult 8000 add 6000 8000 *.daytime -- - mult add dist *.totalmyspecies 6000 add >
 *.numties 0 > and
 .deltie inc

 *.tin1 0 !=
 *.tin1 *.tin2 angle .setaim store

 *.robage 0 =
 7 .ploc store

 *.shflav -1 =
 *.poison 100 < and
 20 .mkpoison store
 1 .tout3 store
 0 .shflav store
 *.tin3 1 =
 *.poison 100 < and
 20 .mkpoison store

 *.shflav -6 =
 *.shell 100 < and
 20 .mkshell store
 1 .tout4 store
 0 .shflav store
 *.tin4 1 =
 *.shell 100 < and
 20 .mkshell store

 *.eye5 0 =
 *.nrg 5000 > and

 50 .repro store
 *.timer 400 mod 360 >
 *.timer 400 mod sub 355 - .dx store
 *.timer 900 mod 890 >
 *.maxvel - .dn store
 *.maxvel 2 div .dx store

 .deltie inc

stop

Anyways I figured I might upload some images to go with them (false colour), I even resized them so as not to use much space on the server , so first two creatures... algaes... plants that I've made, knew I'd get there.  They're pretty ineffcient because I figured afterall hey, they're plants, they don't need to be.

3
The Gene depository / My personal gene bank
« on: April 05, 2010, 04:35:22 PM »
Here are a few things I've made. I planned to only release them with goggle goo: a bot I'm working on. I decided sharing is caring though so here's some bits and bobs I've made.

A more effcient way to store

dup *.memorylocation  sub sgn abs .memorylocation  mult store

Increases the efficiency of a store command, dramtically in some cases only stores a value if that value is not already stored in a certain location, an effective application could be:

87 dup *.memloc  sub sgn abs .memloc  mult store
27 dup *.memval  sub sgn abs .memval  mult store


For a memloc/memval based conspec recognition system this would reset the locations whenever they were alterd and at birth so poison would not badly damage them.

Body management

This keeps the body to energy ratio the same, storing 10 in .nrgratio results in a 1:1 ratio of body to energy storing 100 in .nrgratio results in having ten times the ammount of energy as body whilst storing one gives ten times the ammount of body compared to energy.

def nrgratio 100

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


A bit simpler, keeps body at a certain level, the main disadvantage to this is it will try and reach that body level at any cost, even if that means running out of energy and dieing

def bodyvalue 100

start

15 dup *.bodyvalue sub sgn abs .bodyvalue mult store

*.bodyvalue *.body sub .strbody *.bodyvalue *.body sub sgn abs mult store
*.bodyvalue *.body sub - .fdbody *.bodyvalue *.body sub sgn abs mult store
stop


Eye Setups

No fancy coding here, just two setups I plan to use, having the eyes to the side gives the benefit of whilst travelling forwards a wider path is surveyed

342  dup *.eye1dir   sub sgn abs .eye1dir   mult store
 223  dup *.eye2dir   sub sgn abs .eye2dir   mult store
 176  dup *.eye3dir   sub sgn abs .eye3dir   mult store
 78   dup *.eye4dir   sub sgn abs .eye4dir   mult store
 -78  dup *.eye6dir   sub sgn abs .eye6dir   mult store
 -176 dup *.eye7dir   sub sgn abs .eye7dir   mult store
 -223 dup *.eye8dir   sub sgn abs .eye8dir   mult store
 -342 dup *.eye9dir   sub sgn abs .eye9dir   mult store
 260  dup *.eye1width sub sgn abs .eye1width mult store
 -20  dup *.eye2width sub sgn abs .eye2width mult store
 115  dup *.eye3width sub sgn abs .eye3width mult store
 85   dup *.eye4width sub sgn abs .eye4width mult store
 70   dup *.eye5width sub sgn abs .eye5width mult store
 85   dup *.eye6width sub sgn abs .eye6width mult store
 115  dup *.eye7width sub sgn abs .eye7width mult store
 -20  dup *.eye8width sub sgn abs .eye8width mult store
 260  dup *.eye9width sub sgn abs .eye9width mult store


Pharlell center wieghted vision allows a bot to taget food in front better whilst keeping an eye out for predators approaching from behind

342  dup *.eye1dir   sub sgn abs .eye1dir   mult store
 143  dup *.eye2dir   sub sgn abs .eye2dir   mult store
 46   dup *.eye3dir   sub sgn abs .eye3dir   mult store
 3    dup *.eye4dir   sub sgn abs .eye4dir   mult store
 -3   dup *.eye6dir   sub sgn abs .eye6dir   mult store
 -46  dup *.eye7dir   sub sgn abs .eye7dir   mult store
 -143 dup *.eye8dir   sub sgn abs .eye8dir   mult store
 -342 dup *.eye9dir   sub sgn abs .eye9dir   mult store
 260  dup *.eye1width sub sgn abs .eye1width mult store
 135  dup *.eye2width sub sgn abs .eye2width mult store
 60   dup *.eye3width sub sgn abs .eye3width mult store
 25   dup *.eye4width sub sgn abs .eye4width mult store
 -20  dup *.eye5width sub sgn abs .eye5width mult store
 25   dup *.eye6width sub sgn abs .eye6width mult store
 60   dup *.eye7width sub sgn abs .eye7width mult store
 135  dup *.eye8width sub sgn abs .eye8width mult store
 260  dup *.eye9width sub sgn abs .eye9width mult store


Natrually selecting values

More or less does what fruitflies does but this has been slightly expanded, you will have to replace every instance of initvalue with the value you want the bots to start the sim with and every instance of maxvalue with what you want the maximum value selected to be. You could proably modify it to generate negative number and within a certain range ie -19 to 76 or 22 to 2098 rather than 0 to 168.

def initvalue 68
def maxvalue 69
def mutationchance 70

def rand1  71
def rand2  72
def rand3  73
def rand4  74
def rand5  75
def rand6  76
def rand7  77
def rand8  78
def rand9  79
def rand10 80
def rand11 81
def rand12 82
def rand13 83
def rand14 84
def rand15 85
def rand16 86
def rand17 87
def rand18 88
def rand19 89
def rand20 90

def select1 971
def select2 972
def select3 973
def select4 974
def select5 975
def select6 976
def select7 977
def select8 978
def select9 979
def select10 980
def select11 981
def select12 982
def select13 983
def select14 984
def select15 985
def select16 986
def select17 987
def select18 988
def select19 989
def select20 990
 
start

5 dup *.mutationchance sub sgn abs .mutationchance mult store

*.maxvalue *.mutationchance mult rnd .rand1  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand2  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand3  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand4  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand5  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand6  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand7  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand8  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand9  *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand10 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand11 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand12 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand13 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand14 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand15 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand16 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand17 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand18 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand19 *.robage sgn abs -- - mult store
*.maxvalue *.mutationchance mult rnd .rand20 *.robage sgn abs -- - mult store
*.rand1  .select1  *.maxvalue *.rand1  sub sgn mult *.select1  sgn mult *.robage sgn abs -- - mult store
*.rand2  .select2  *.maxvalue *.rand2  sub sgn mult *.select2  sgn mult *.robage sgn abs -- - mult store
*.rand3  .select3  *.maxvalue *.rand3  sub sgn mult *.select3  sgn mult *.robage sgn abs -- - mult store
*.rand4  .select4  *.maxvalue *.rand4  sub sgn mult *.select4  sgn mult *.robage sgn abs -- - mult store
*.rand5  .select5  *.maxvalue *.rand5  sub sgn mult *.select5  sgn mult *.robage sgn abs -- - mult store
*.rand6  .select6  *.maxvalue *.rand6  sub sgn mult *.select6  sgn mult *.robage sgn abs -- - mult store
*.rand7  .select7  *.maxvalue *.rand7  sub sgn mult *.select7  sgn mult *.robage sgn abs -- - mult store
*.rand8  .select8  *.maxvalue *.rand8  sub sgn mult *.select8  sgn mult *.robage sgn abs -- - mult store
*.rand9  .select9  *.maxvalue *.rand9  sub sgn mult *.select9  sgn mult *.robage sgn abs -- - mult store
*.rand10 .select10 *.maxvalue *.rand10 sub sgn mult *.select10 sgn mult *.robage sgn abs -- - mult store
*.rand11 .select11 *.maxvalue *.rand11 sub sgn mult *.select11 sgn mult *.robage sgn abs -- - mult store
*.rand12 .select12 *.maxvalue *.rand12 sub sgn mult *.select12 sgn mult *.robage sgn abs -- - mult store
*.rand13 .select13 *.maxvalue *.rand13 sub sgn mult *.select13 sgn mult *.robage sgn abs -- - mult store
*.rand14 .select14 *.maxvalue *.rand14 sub sgn mult *.select14 sgn mult *.robage sgn abs -- - mult store
*.rand15 .select15 *.maxvalue *.rand15 sub sgn mult *.select15 sgn mult *.robage sgn abs -- - mult store
*.rand16 .select16 *.maxvalue *.rand16 sub sgn mult *.select16 sgn mult *.robage sgn abs -- - mult store
*.rand17 .select17 *.maxvalue *.rand17 sub sgn mult *.select17 sgn mult *.robage sgn abs -- - mult store
*.rand18 .select18 *.maxvalue *.rand18 sub sgn mult *.select18 sgn mult *.robage sgn abs -- - mult store
*.rand19 .select19 *.maxvalue *.rand19 sub sgn mult *.select19 sgn mult *.robage sgn abs -- - mult store
*.rand20 .select20 *.maxvalue *.rand20 sub sgn mult *.select20 sgn mult *.robage sgn abs -- - mult store
*.initvalue .select1  *.select1  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select2  *.select2  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select3  *.select3  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select4  *.select4  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select5  *.select5  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select6  *.select6  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select7  *.select7  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select8  *.select8  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select9  *.select9  sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select10 *.select10 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select11 *.select11 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select12 *.select12 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select13 *.select13 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select14 *.select14 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select15 *.select15 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select16 *.select16 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select17 *.select17 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select18 *.select18 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select19 *.select19 sgn -- - mult *.robage sgn abs -- - mult store
*.initvalue .select20 *.select20 sgn -- - mult *.robage sgn abs -- - mult store

stop


Reproduction

With this gene you have a base enregy threshold like in alga_minimalis and then a certain ammount is added to the threshold for each member of the species which thus acts as population control.

def repronrg  100
def poprepro  101
def bodyrepro 102

start

50  dup *.repronrg  sub sgn abs .repronrg  mult store
40  dup *.poprepro  sub sgn abs .poprepro  mult store
850 dup *.bodyrepro sub sgn abs .bodyrepro mult store
 
*.repronrg .repro *.body *.bodyrepro *.totalmyspecies *.poprepro mult add sub sgn 0 floor mult 30 *.eye5 sub sgn 0 floor mult store

stop


Determining range

Determines how far a bot is and adjusts shootval so that the shot reaches it, the maximum ammount of energy to be spent on any one shot and power of a shot at point blank can be set

def power 100
def range 101

start

4  dup *.power sub sgn abs .power mult store
20 dup *.range sub sgn abs .range mult store

25044 217 *.eye1 600 mult sub div *.eye1width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye1width sgn - mult        *.focuseye -4 sub sgn abs -- - mult *.eye1 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye2 600 mult sub div *.eye2width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye2width sgn - mult        *.focuseye -3 sub sgn abs -- - mult *.eye2 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye3 600 mult sub div *.eye3width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye3width sgn - mult        *.focuseye -2 sub sgn abs -- - mult *.eye3 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye4 600 mult sub div *.eye4width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye4width sgn - mult        *.focuseye ++     sgn abs -- - mult *.eye4 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye5 600 mult sub div *.eye5width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye5width sgn - mult        *.focuseye        sgn abs -- - mult *.eye5 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye6 600 mult sub div *.eye6width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye6width sgn - mult        *.focuseye --     sgn abs -- - mult *.eye6 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye7 600 mult sub div *.eye7width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye7width sgn - mult        *.focuseye 2  sub sgn abs -- - mult *.eye7 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye8 600 mult sub div *.eye8width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye8width sgn - mult        *.focuseye 3  sub sgn abs -- - mult *.eye8 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye9 600 mult sub div *.eye9width -17 div ++ mult 5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye9width sgn - mult        *.focuseye 4  sub sgn abs -- - mult *.eye9 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye1 600 mult sub div *.eye1width 80  div ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye1width sgn   mult        *.focuseye -4 sub sgn abs -- - mult *.eye1 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye2 600 mult sub div *.eye2width 80  div ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye2width sgn   mult        *.focuseye -3 sub sgn abs -- - mult *.eye2 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye3 600 mult sub div *.eye3width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye3width sgn   mult        *.focuseye -2 sub sgn abs -- - mult *.eye3 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye4 600 mult sub div *.eye4width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye4width sgn   mult        *.focuseye ++     sgn abs -- - mult *.eye4 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye5 600 mult sub div *.eye5width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye5width sgn   mult        *.focuseye        sgn abs -- - mult *.eye5 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye6 600 mult sub div *.eye6width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye6width sgn   mult        *.focuseye --     sgn abs -- - mult *.eye6 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye7 600 mult sub div *.eye7width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye7width sgn   mult        *.focuseye 2  sub sgn abs -- - mult *.eye7 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye8 600 mult sub div *.eye8width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye8width sgn   mult        *.focuseye 3  sub sgn abs -- - mult *.eye8 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye9 600 mult sub div *.eye9width 80 div  ++ div  5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye9width sgn   mult        *.focuseye 4  sub sgn abs -- - mult *.eye9 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye1 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye1width sgn abs -- - mult *.focuseye -4 sub sgn abs -- - mult *.eye1 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye2 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye2width sgn abs -- - mult *.focuseye -3 sub sgn abs -- - mult *.eye2 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye3 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye3width sgn abs -- - mult *.focuseye -2 sub sgn abs -- - mult *.eye3 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye4 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye4width sgn abs -- - mult *.focuseye ++     sgn abs -- - mult *.eye4 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye5 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye5width sgn abs -- - mult *.focuseye        sgn abs -- - mult *.eye5 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye6 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye6width sgn abs -- - mult *.focuseye --     sgn abs -- - mult *.eye6 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye7 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye7width sgn abs -- - mult *.focuseye 2  sub sgn abs -- - mult *.eye7 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye8 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye8width sgn abs -- - mult *.focuseye 3  sub sgn abs -- - mult *.eye8 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store
25044 217 *.eye9 600 mult sub div                             5 mult 3 div dup sgn abs *.power mult add - *.range ceil - dup *.shootval sub sgn abs .shootval mult *.eye9width sgn abs -- - mult *.focuseye 4  sub sgn abs -- - mult *.eye9 sgn mult *.shoot sgn abs mult *.shoot -3 sub sgn abs mult *.shoot -4 sub sgn abs mult store

stop


Tracking Movement

Work in progress, when complete bot will turn to eye in which there has been the most change ie movement rather than whichever one has something closest to it like normal eyes, will also randomly glance to stop predators who may try to sneak up on the bot so it doesn't notice, it was inspired by the way we look natrually. So far what I've coded genrally works but is sometimes eratic and also it's pretty ineffcient but I'm getting there.

4
DB Art / Advanced multibot concept art
« on: March 23, 2010, 06:36:49 PM »
There we go, a piece of concept art for [a href=\'index.php?act=findpost&pid=3350\']an advanced multibot[/a][/u][/color].

5
Darwinbots3 / Grapics and user frendliness
« on: March 21, 2010, 04:42:05 PM »
It doesn't ever have appeared to been looked at but has anyone thought about the grapics in DB3? I mean plain circles battling it out don't make the most engaging desktop display. I know it's easy to get engaged but from a newcomers point of view the simple graphics look like they came from a long way back especially when compared to the cutting edge photo realistic graphics today.

Now obviously you don't want to overload the graphics but there are lots of little things which could make a huge diffrence:

Dynamic shell and slime edges

Lets say you have some shell, to represent this a grey(or any colour really) line forms inside your cell, the more shell you have the thicker this line grows. The same for slime except this line is on the outside so the two don't overlap. this would also be a practical indicator as well as looking good.

Cell fill

Setting a semi-transparent fill for each darwinbot would be good as well, they look surreal when transparent but looking completely opague probably wouldn't look good either

Background

A customizable background colour which gradients light colour through to dark colour in pond mode, also a good indicator for the sun bieng down. Compliments semi-transparent fill also

Distinguishing

Finally it would be good if diffrent bot species could be more individualized. Rather than the squiggles inside set manually (not great in my opinion) designs could be set in the DNA even if the things are as simple as three circles, a triangle or a cross they are all definitle more eye pleasing than the default squiggles. You could even have things like cilia for distinctive bots or little spikes and mitrochondria (which could show as speckles).



Finally I'd suggest all of the above should be toggleable for performance over grapics for thoose who desire it.

6
The Gene depository / non-working conspec for advancedish sight system
« on: March 14, 2010, 12:44:04 PM »
It's roughly a combination of Bubble, Occulus 2 and Beholder though the conspec doesn't quite work though as it turns to friendlies as well, any ideas?  

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'''''''''''''''''''''''''''''
''''----____SIGHT____----''''


''''---- Genes 1-1 ----''''

''''----Setup Eye Positions And Sizes----''''
cond
*.robage 0 =
start
  342 .eye1dir store
  152 .eye2dir store
  62 .eye3dir store
  20 .eye4dir store
 -20 .eye6dir store
 -62 .eye7dir store
 -152 .eye8dir store
 -342 .eye9dir store

 260 .eye1width store
 120 .eye2width store
 60 .eye3width store
 25 .eye4width store
 15 .eye5width store
 25 .eye6width store
 60 .eye7width store
 120 .eye8width store
 260 .eye9width store
stop

''''---- Genes 2-2 ----''''

''''----When Finished Looking Reset Sight To Centre Of Vision----''''
cond
 *.focuseye 0 !=
start
 0 .focuseye store
stop

''''---- Genes 3-10 ----''''

''''----Look At Whatever Is Closest To Centre Of Vision----''''
cond
 *.eye5 0 =
 *.eye4 0 !=
 *.eye4 *.eye1 >=
 *.eye4 *.eye2 >=
 *.eye4 *.eye3 >=
 *.eye4 *.eye6 >=
 *.eye4 *.eye7 >=
 *.eye4 *.eye8 >=
 *.eye4 *.eye9 >=
start
 -1 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye6 0 !=
 *.eye6 *.eye1 >
 *.eye6 *.eye2 >=
 *.eye6 *.eye3 >=
 *.eye6 *.eye4 >=
 *.eye6 *.eye7 >=
 *.eye6 *.eye8 >=
 *.eye6 *.eye9 >=
start
 1 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye3 0 !=
 *.eye3 *.eye1 >
 *.eye3 *.eye2 >
 *.eye3 *.eye4 >=
 *.eye3 *.eye6 >=
 *.eye3 *.eye7 >=
 *.eye3 *.eye8 >=
 *.eye3 *.eye9 >=
start
 -2 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye7 0 !=
 *.eye7 *.eye1 >
 *.eye7 *.eye2 >
 *.eye7 *.eye3 >
 *.eye7 *.eye4 >=
 *.eye7 *.eye6 >=
 *.eye7 *.eye8 >=
 *.eye7 *.eye9 >=
start
 2 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye2 0 !=
 *.eye2 *.eye1 >
 *.eye2 *.eye3 >
 *.eye2 *.eye4 >
 *.eye2 *.eye6 >
 *.eye2 *.eye7 >=
 *.eye2 *.eye8 >=
 *.eye2 *.eye9 >=
start
 -3 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye8 0 !=
 *.eye8 *.eye1 >
 *.eye8 *.eye2 >
 *.eye8 *.eye3 >
 *.eye8 *.eye4 >
 *.eye8 *.eye6 >
 *.eye8 *.eye7 >=
 *.eye8 *.eye9 >=
start
 3 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye1 0 !=
 *.eye1 *.eye2 >
 *.eye1 *.eye3 >
 *.eye1 *.eye4 >
 *.eye1 *.eye6 >
 *.eye1 *.eye7 >
 *.eye1 *.eye8 >
 *.eye1 *.eye9 >=
start
 -4 .focuseye store
stop

cond
 *.eye5 0 =
 *.eye9 0 !=
 *.eye9 *.eye1 >
 *.eye9 *.eye2 >
 *.eye9 *.eye3 >
 *.eye9 *.eye4 >
 *.eye9 *.eye6 >
 *.eye9 *.eye7 >
 *.eye9 *.eye8 >
start
 4 .focuseye store
stop

'''''''''''''''''''''''''''''''
''''----____TURNING____----''''


''''---- Genes 11-18 ----''''

''''----Turn To Something You Are Looking At If It Is Not The Same Species As You----''''
cond
 *.focuseye -1 =
 *.refeye *.myeye !=
start
 *.aim 20 add .setaim store
stop

cond
 *.focuseye 1 =
 *.refeye *.myeye !=
start
 *.aim -20 add .setaim store
stop

cond
 *.focuseye -2 =
 *.refeye *.myeye !=
start
 *.aim 62 add .setaim store
stop

cond
 *.focuseye 2 =
 *.refeye *.myeye !=
start
 *.aim -62 add .setaim store
stop

cond
 *.focuseye -3 =
 *.refeye *.myeye !=
start
 *.aim 152 add .setaim store
stop

cond
 *.focuseye 3 =
 *.refeye *.myeye !=
start
 *.aim -152 add .setaim store
stop

cond
 *.focuseye -4 =
 *.refeye *.myeye !=
start
 *.aim 342 add .setaim store
stop

cond
 *.focuseye 4 =
 *.refeye *.myeye !=
start
 *.aim -342 add .setaim store
stop

7
Newbie / Hey
« on: March 13, 2010, 01:16:54 PM »
Hey all  , I'm new and that's about all I have to say apart from here's my first bot:

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'*************
'Aiming
'*************

'Turn to robot located in eye 4
cond
 *.eye5 0 =
 *.eye4 0 !=
 *.eye4 *.eye1 >=
 *.eye4 *.eye2 >=
 *.eye4 *.eye3 >=
 *.eye4 *.eye6 >=
 *.eye4 *.eye7 >=
 *.eye4 *.eye8 >=
 *.eye4 *.eye9 >=
start
 *.aim 35 add .setaim store
stop

'Turn to robot located in eye 6
cond
 *.eye5 0 =
 *.eye6 0 !=
 *.eye6 *.eye1 >
 *.eye6 *.eye2 >=
 *.eye6 *.eye3 >=
 *.eye6 *.eye4 >=
 *.eye6 *.eye7 >=
 *.eye6 *.eye8 >=
 *.eye6 *.eye9 >=
start
 *.aim -35 add .setaim store
stop

'Turn to robot located in eye 3
cond
 *.eye5 0 =
 *.eye3 0 !=
 *.eye3 *.eye1 >
 *.eye3 *.eye2 >
 *.eye3 *.eye4 >=
 *.eye3 *.eye6 >=
 *.eye3 *.eye7 >=
 *.eye3 *.eye8 >=
 *.eye3 *.eye9 >=
start
 *.aim 70 add .setaim store
stop

'Turn to robot located in eye 7
cond
 *.eye5 0 =
 *.eye7 0 !=
 *.eye7 *.eye1 >
 *.eye7 *.eye2 >
 *.eye7 *.eye3 >
 *.eye7 *.eye4 >=
 *.eye7 *.eye6 >=
 *.eye7 *.eye8 >=
 *.eye7 *.eye9 >=
start
 *.aim -70 add .setaim store
stop

'Turn to robot located in eye 2
cond
 *.eye5 0 =
 *.eye2 0 !=
 *.eye2 *.eye1 >
 *.eye2 *.eye3 >
 *.eye2 *.eye4 >
 *.eye2 *.eye6 >
 *.eye2 *.eye7 >=
 *.eye2 *.eye8 >=
 *.eye2 *.eye9 >=
start
 *.aim 105 add .setaim store
stop

'Turn to robot located in eye 8
cond
 *.eye5 0 =
 *.eye8 0 !=
 *.eye8 *.eye1 >
 *.eye8 *.eye2 >
 *.eye8 *.eye3 >
 *.eye8 *.eye4 >
 *.eye8 *.eye6 >
 *.eye8 *.eye7 >=
 *.eye8 *.eye9 >=
start
*.aim -105 add .setaim store
stop

'Turn to robot located in eye 1
cond
 *.eye5 0 =
 *.eye1 0 !=
 *.eye1 *.eye2 >
 *.eye1 *.eye3 >
 *.eye1 *.eye4 >
 *.eye1 *.eye6 >
 *.eye1 *.eye7 >
 *.eye1 *.eye8 >
 *.eye1 *.eye9 >=
start
 *.aim 140 add .setaim store
stop

'Turn to robot located in eye 9
cond
 *.eye5 0 =
 *.eye9 0 !=
 *.eye9 *.eye1 >
 *.eye9 *.eye2 >
 *.eye9 *.eye3 >
 *.eye9 *.eye4 >
 *.eye9 *.eye6 >
 *.eye9 *.eye7 >
 *.eye9 *.eye8 >
start
 *.aim -140 add .setaim store
stop

'Look arround if I can't see anything and I'm not being shot
cond
*.eye1 0 =
*.eye2 0 =
*.eye3 0 =
*.eye4 0 =
*.eye5 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
*.shflav 0 =
*.shflav -2 = or
start
*.aim 280 add .setaim store
stop

'When shot turn to attacker
cond
 *.shflav 0 !=
 *.shflav -2 !=
start
 1256 *.shang sub .setaim store
stop

'Approach anything you can see
cond
 *.eye5 0 !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

'*************
'Ties
'*************

'If something has more energy than me connect to it
cond
 *.refnrg *.nrg >
 *.refshoot 0 =
 *.refeye *.myeye !=
 *.eye5 60 >
start
 .tie inc
 *.robage 10 mod 0 =
 628 .aimdx store
 *.refvelup .up store
stop

'If I see another animeep that is close to me connect to it
cond
 *.eye5 60 >
 *.refeye *.myeye =
 *.timer 50 >
start
 *.refvelup .up store
 628 .aimdx store
 .tie inc
 *.refvelup .up store
stop

'Share energy equaly between things I'm connected to
cond
 *.numties 0 >
start
 50 .sharenrg *.multi mult store
 50 .sharewaste *.multi mult store
stop

'If I'm pulling strongly but not moving in the direction I want disconnect
cond
 *.eye5 30 <
 *.eye5 0 !=
 *.up 25 >
 *.velup 15 <
 *.numties 0 >
start
 .deltie inc
 .timer 0 store
stop

'If I'm connected to something that might attack me disconnect from it
cond
 *.trefshoot 0 !=
 *.trefeye *.myeye !=
start
 .deltie inc
stop

'If in pain, disconnect
cond
 *.pain 200 >
start
 .deltie inc
 .timer 0 store
stop


'*************
'Shooting
'*************

'If something has less energy than me, shoot it.
cond
 *.eye5 60 >
 *.refnrg *.nrg <
 *.refeye *.myeye !=
start
 .shoot dec
 *.refvelup .up store
stop

'If something might attack me shoot it
cond
 *.eye5 60 >
 *.refshoot 0 !=
 *.refeye *.myeye !=
start
 .shoot dec
 *.refvelup .up store
stop

'*************
'Reproduction
'*************

'Reproduce when connected to food and the meep is healthy
cond
 *.numties 0 >
 *.nrg 2500 >
 *.body 500 >
 *.pleas 50 >
start
 20 .repro store
stop

'*************
'Mantinence
'*************

'Shoot out waste
cond
*.waste 40 >
start
.backshot inc
-4 .shoot store
*.waste .shootval store
stop

'Grow
cond
 *.nrg 3000 >
start
 100 .strbody store
stop

'build shell
cond
 *.shell 250 <
start
 100 .mkshell store
stop

'define poison
cond
 *.robage 0 =
start
 .shoot .ploc store
stop

'make poison
cond
 *.poison 500 <
start
 50 .strpoison store
stop

'delete viruses
cond
 *.mkvirus 0 !=
start
 *.mkvirus .delgene store
stop
end

So what do you think,  it doesn't rank on the F1 league at all but how would you improve it so it could?    

Pages: [1]