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

Pages: 1 [2]
16
Multi-Bots / Chaotic Swarm ver 1.2 (MB)*(SA)
« on: May 10, 2008, 01:24:44 PM »
TOO BIG TO FIT!

Ok, so I went with bac's advice and have shortened redundant genes, and managed to get the number of genes from 160+ to about 126. It uses about 27 for the eyes and individuality alone; and 40 for single bot actions/coms, and about 60 seperate ones for a multiple staged bot, its the best I could do without removing its unique behaviors. Still dont have an effective memory system set up, but it seems to hold out. Trimmed up some redundant tie sets to make the swarm more effective. I've also broken up the tie switches so bots can effectively feed from ties better; previously they would feed some from all, and try to share with other bots. Also, tweaked reproductive genes so it doesnt overpopulate itself, resulting in wasted energy.

I tried to trim this bot even further, but the conditions for each stage vary dramatically and produce similar results; and I'm afraid a super gene would mutate much more rapidly than a bunch of smaller ones.

Conditions for this bot: Pond Mode, F1 conditions, also spraed the starts from eachother. There sexrepro spirals out of control sometimes and can cause a major boom and crash. Very unique behaviors now inherited among the entire multibot. Many fixes to tie communications and added better switch for tie reading.

17
'using the genes intended for waypoints, a universal conspec reader is easily created.
cond
*.memloc 819 = or
*.eyef 0 >
start
810 .memloc store
stop

cond
*.memval *.buffer !=
start
.memloc inc
stop

cond
*.memloc 819 =
*.memval *.buffer !=
start
250 *.aim add .setaim store
*.maxvel *.vel sub .up store
stop

cond
*.memval *.buffer =
start
1 .enemy store
stop

This needs several other genes to function properly, I.e. one to assign the value for buffer based on memloc, or out1-out10. But the conspec assignment upon creation is as follows:

cond
*.robage 1 =
start
32000 rnd 1 .out1 store
.....etc,etc until you have stored a random value into every out spot.
stop

When this bot finds another that trys to mask as it, or has a similar value stored in the out1-10 then it kills it, if they are not equal it tries to avoid at all costs. Should beat most other attempts to mask identity, say through poison or venom, since as soon as it goes blind it treats all the results true anyways.

18
Suggestions / Ties
« on: May 08, 2008, 12:36:06 AM »
It might be a good idea to allow bots to see ties. 1 they are shapes, 2 they would tell smaller bots that a multibot was present. It wouldn't be a bad idea to have some transparency based on length, but it should be vissible when the two connected bots are out of sight.

19
Bot Tavern / A call for logic
« on: May 07, 2008, 10:52:19 PM »
Ok, so now that I have the memory taken care of, its a matter of using one memloc a cycle to maximize thought process, I've thought about it and haven't found two switches that could work without a XOR switch, in binary it returns true if all values are =. The problem I'm having is establishing a heirarchy of important information. For 1 it uses a conspec which relies on 100 variables to determine 10 different species and 20 bot friends. Unfortunately it also uses three other sub sets of genes that manipulate large parts of the brain. As far as a multitasking multi-bot, I dont haev a problem since the touts are very fast, I can actually stream info at 5 bits/cycle, so younger bots can take on different memory roles, and so on. The real difficult part is getting a single bot to concentrate on three things at once; conspec, waypoints/maneuvering, and tactical theory.

I developed a gene for tactical theory to allow for any bot to try something against an enemy, the bots that watch could then record what the attempty said, eventually the multibot version could decide a tactic that would eliminate any threat. But due to certain memory settings, it makes it real difficult to build a single bot with three good automatic switches. Any ideas?

20
Suggestions / Increase customizables
« on: May 07, 2008, 09:08:56 AM »
Ok, Ericl, I need more custom defs for this new bot of sudden crash. Its the easiest way for my e to stay organized, and I've already defined hundreds of vars by hand. Would be nice if hte limit were increased to all free sysvars.

21
The Gene depository / The really random random bot
« on: May 07, 2008, 12:25:16 AM »
Ok, adopted from a random bot I found that made a huge list of 0 stores, I've created a bot that randomly increases random locations in random increments. Its only 3 genes and is for a primative but adaptable veggie. Eventually a random store in repro or mrepro will produce offspring, not meant for overly agressive bots, more of a Evo bot.

'random bot,veggie

cond
*.robage 10 10 rnd sub mod 1 =
start
.memloc dec
.memval inc
stop

cond
*.robage 20 10 rnd sub mod 1 =
start
*.memloc rnd *.eyef .memloc store
*.memloc rnd *.robage .memval store
stop

cond
*.robage 5 10 rnd sub mod 1 =
start
.memloc inc
.memval inc
stop

22
Bugs and fixes / The bot of sudden Crash RESOLVED 2.43.1k
« on: May 06, 2008, 05:33:09 PM »
Ok, let me know if I've renamed any used sysvars, but everytime I try to run this bot, it freezes up the DB system.

23
I've been running a simulation under the suggestions for a variety of natural selection. I'm using R Fissanis, default Alga, stringy plant, C Flians-2, Slim Evo 3-2 which rapes everything, and the Chaotic Swarmer. All mutations but point mutations have been disabled. What has happened is the deault Algae gained a gene for sexual reproduction by mutations, the plant already shot sperm at whatever came close, so they had a mutant. The Slim Evo 3-2 raped the resulting offspring and produced this unique fighter, it will never run out of reserves, unless its dark out, even runs with Alga default for more energy. Here it is, wont post for length, it also opens the bridge for puppet evolving from this. Oddly enough, they join with pre-exsisting Chaotic Swarms and are not attacked, and are treated as an equal, the old conspecs still work, and the translator is working somewhat for this bot, but it lacked a 3rd stage which makes translation difficult.

oh, cant load it on, it was captured using make new species button... cant upload it.

24
F1 bots / Chaotic Swarms (F1) *(SA) (05-05-2008)
« on: May 05, 2008, 12:52:02 PM »
FILE TOO BUG TO FIT!

Ok, so I've been playing around with targeting systems using a modulous function on coordiantes based on positions of friends. Basically the outer shells act as a wall of shots for agressors, with the larger insides harvesting from veggies. Structure will change based on robage and mass, so eventually older bots will become the outer shell and the cycle continues, older bots overide commands of younger bots for a more focused group. Conspec genes fixed and no longer target eachother ocne caught in a action reaction event when caught in a cross fire by friends. The group acts in the most efficient way, when an enemy comes, a younger bot goes out and tries to hold them off and weaken them, each time it returns or another enemy comes near, an older veteran is sent out and so on until no more enemies aproach the swarm. Partly inspired by the Ant bot, I've added a new feature that gives some heirarchy based on kills, currently its not a group concious decision, but individuals will desire more kills as they age, and eventually leave the swarm through stage 55 and stage 5. They come back with more kills displayed they really made, sort of a lie to keep them from having to overkill. Conditions are F1, so far with no mutations, mutations should be ok, but will most likely not produce very many bots. I get about 1400 from 10 bots with no mutation except trhough sexual reproduction. About 360 bots can feed from 2-4 veggies without killing either population, those with more age eat more. Its still not a full new build, and it still uses a 360 eye system, makes it easier for communications. The swarm also develops the other stages within the swarm as a menas for protecting the food. The swarmers aer in the nearest to the veggies, the straglers taht join later are the predators, traps and stage 5 specials. Enjoy it.

I've decided not to post the code since it is a very large dnalen

*for when the Socially Aware league is finished

25
Interesting behaviour bots / Slim Evo: Cont'd
« on: May 04, 2008, 04:13:58 PM »
Ok, fixed a lot of problems with aiming, eyefocus, botid genes, and tie communications.

Enjoy!

Code: [Select]
'Slim Evo Project: Continued
'Shortened up the Bot Id genes to one small gene. Focuseye set when engaged with enemy, caused bot to act stupid when under attack previously
'Better agressive genes for war stage, and put in a moded targeting system so multiple bots will target the same target without going
'Directly in front of the enemy or friend. Added a turning mechanism so no matter what the bot will try to swarm around the enemy if not tied
'Also bots leaving the swarm are free to move but ties remain for reserves.
'The reproductive genes require a lot of energy for a swarm to even develop, around 30K, making this a hard bot to start in some environments

'Individuality

def botname .out1
def bot1 970
def bot2 971
def bot3 972
def bot4 973
def bot5 974
def bot6 975
def bot7 976
def bot8 977
def bot9 978
def bot10 979

'Historical Info

def bxpos 82
def bypos 83
def fxpos 80
def fypos 81

'Tie Info

def readcounter 150
def multimode 151
def tiereader 60
def multeyef 86
def tsexrpro 88
def multrefage 84
def multrefvel 87
def readreset 149
def tiecounter 74

'Attack/Defence

def venomsel 76
def stage 75
def shotselect 40

'Eye Info

def newbot 50
def memcounter 73
def preveye1 51
def preveye2 52
def preveye3 53
def preveye4 54
def preveye5 55
def preveye6 56
def preveye7 57
def preveye8 58
def preveye9 59
def eye1id 61
def eye2id 62
def eye3id 63
def eye4id 64
def eye5id 65
def eye6id 66
def eye7id 67
def eye8id 68
def eye9id 69


'Welwordion's 360 Eyes/Initialization and Indientity
'**********************

cond
*.robage 0 =
start
*.tiepres .deltie store
9999 rnd 1 .botname store
*.dnalen .out2 store
420 .eye1dir store
315 .eye2dir store
210 .eye3dir store
105 .eye4dir store
-105 .eye6dir store
-210 .eye7dir store
-315 .eye8dir store
-420 .eye9dir store
105 .eye1width store
105 .eye2width store
105 .eye3width store
105 .eye4width store
105 .eye5width store
105 .eye6width store
105 .eye7width store
105 .eye8width store
105 .eye9width store
50 *.nrg 1000 div mult .repro store
stop

cond
*.eyef 0 >
*.refeye 0 !=
*.in2 *.out2 !=
*.refeye *.myeye !=
*.in1 *.bot1 !=
*.in1 *.bot2 !=
*.in1 *.bot3 !=
*.in1 *.bot4 !=
*.in1 *.bot5 !=
*.in1 *.bot6 !=
*.in1 *.bot7 !=
*.in1 *.bot8 !=
*.in1 *.bot9 !=
*.in1 *.bot10 !=
start
3 .stage store
stop

cond
*.robage 21 =
start
*.tiepres .deltie store
stop

'eye1 specific

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 ~=
*.eye2id 1 = and
*.eye1 *.preveye9 5 ~=
*.eye9id 1 = and or
start
1 .eye1id store
stop

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 !~=
*.eye1 *.preveye9 !~=
start
0 .eye1id store
stop

cond
*.eye1 0 =
start
0 .eye1id store
stop

'eye2 specific

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 ~=
*.eye3id 1 = and
*.eye2 *.preveye2 5 ~=
*.eye1id 1 = and or
start
1 .eye2id store
stop

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 !~=
*.eye2 *.preveye1 5 !~=
start
0 .eye2id store
stop

cond
*.eye2 0 =
start
0 .eye2id store
stop

'eye3 specific

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 ~=
*.eye4id 1 = and
*.eye3 *.preveye2 5 ~=
*.eye2id 1 = and or
start
1 .eye3id store
stop

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 !~=
*.eye3 *.preveye2 5 !~=
start
0 .eye3id store
stop

cond
*.eye3 0 =
start
0 .eye3id store
stop

'eye4 specific

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye5 5 ~=
*.eye5id 1 = and
*.eye4 *.preveye3 5 ~=
*.eye3id 1 = and or
start
1 .eye4id store
stop

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye3 5 !~=
start
0 .eye4id store
stop

cond
*.eye4 0 =
start
0 .eye4id store
stop

'eye5 specific

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 ~=
*.eye6id 1 = and
*.eye5 *.preveye4 5 ~=
*.eye4id 1 = and or
start
1 .eye5id store
stop

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 !~=
*.eye5 *.preveye4 5 !~=
start
0 .eye5id store
stop

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

'eye6 specific

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 ~=
*.eye7id 1 = and
*.eye6 *.preveye5 5 ~=
*.eye4id 1 = and or
start
1 .eye6id store
stop

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 !~=
*.eye6 *.preveye5 5 !~=
start
0 .eye6id store
stop

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

'eye7 specific

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye9 5 ~=
*.eye8id 1 = and
*.eye7 *56 5 ~=
*.eye6id 1 = and or
start
1 .eye7id store
stop

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye8 5 !~=
*.eye7 *.preveye6 5 !~=
start
0 .eye7id store
stop

cond
*.eye7 0 =
start
0 .eye7id store
stop

'eye8 specific

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 ~=
*.eye9id 1 = and
*.eye8 *.preveye7 5 ~=
*.eye7id 1 = and or
start
1 .eye8id store
stop

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 !~=
*.eye8 *.preveye7 5 !~=
start
0 .eye8id store
stop

cond
*.eye8 0 =
start
0 .eye8id store
stop

'eye9 specific

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 ~=
*.eye1id 1 = and
*.eye9 *58 5 ~=
*.eye8id 1 = and or
start
1 .eye9id store
stop

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 !~=
*.eye9 *.preveye8 5 !~=
start
0 .eye9id store
stop

cond
*.eye9 0 =
start
0 .eye9id store
stop

'the focuseye is set

cond
*.robage 20 mod 0 !=
*140 0 =
start
5 .focuseye *.eye1 sgn abs mult *.eye1id 1 sub abs mult store
6 .focuseye *.eye2 sgn abs mult *.eye2id 1 sub abs mult store
7 .focuseye *.eye3 sgn abs mult *.eye3id 1 sub abs mult store
8 .focuseye *.eye4 sgn abs mult *.eye4id 1 sub abs mult store
9 .focuseye *.eye5 sgn abs mult *.eye5id 1 sub abs mult store
1 .focuseye *.eye6 sgn abs mult *.eye6id 1 sub abs mult store
2 .focuseye *.eye7 sgn abs mult *.eye7id 1 sub abs mult store
3 .focuseye *.eye8 sgn abs mult *.eye8id 1 sub abs mult store
4 .focuseye *.eye9 sgn abs mult *.eye9id 1 sub abs mult store
stop

'the visual memory is stored

cond
start
*.eye1 .preveye1 store
*.eye2 .preveye2 store
*.eye3 .preveye3 store
*.eye4 .preveye4 store
*.eye5 .preveye5 store
*.eye6 .preveye6 store
*.eye7 .preveye7 store
*.eye8 .preveye8 store
*.eye9 .preveye9 store
stop

'Individuality Genes
'*******************

'check species and bot name

cond
*.eyef 0 >
*.in2 *.out2 =
*.myeye *.refeye %=
*.in1 *.bot1 != and
*.in1 *.bot2 != and
*.in1 *.bot3 != and
*.in1 *.bot4 != and
*.in1 *.bot5 != and
*.in1 *.bot6 != and
*.in1 *.bot7 != and
*.in1 *.bot8 != and
*.in1 *.bot9 != and
*.in1 *.bot10 != and
*.in1 *.out1 !=
start
*.memcounter 969 add .memloc store
*.memcounter 1 add .memcounter store
stop

'select a memory location for in4

cond
*.newbot 1 =
*.memcounter 1 =
*.bot10 0 =
start
.memloc inc
*.in1 .memval store
stop

'Turning Genes
'****************

'Turn to a veg

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye 0 =
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .setaim store
stop

'turn towards an enemy

cond
*.focuseye 1 =
*.refeye *.myeye !=
*.refeye 0 !=
start
420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
3 .stage store
stop

cond
*.focuseye 2 =
*.refeye *.myeye !=
*.refeye 0 !=
start
315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 3 =
*.refeye *.myeye !=
*.refeye 0 !=
start
210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 4 =
*.refeye *.myeye !=
*.refeye 0 !=
start
105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 6 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 7 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 8 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 9 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

'Turn to conspec

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye *.myeye %=
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in4 1 =
*.refxpos *.refypos angle *.tieang !=
*.tin1 0 !=
start
*.refxpos *.refypos angle .setaim store
0 *.velup sub *.eyef sub *.fixpos mult ~ .up store
0 .stage store
stop

'Movement Genes
'****************

'Move Forward

cond
*.fixed 0 =
*.out4 1 !=
*.eyef 0 >
*.eyef 80 <
*.refeye *.myeye !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle -1 mult *.aim add
1256 add 1256 mod
dup dup dup dup dup 314 ceil swapint
314 floor 942 ceil 314 sub sub swapint
942 floor 942 sub add 2 div *.veldx sub .dx store
628 ceil -1 mult 314 add swapint
628 floor 628 sub add 2 div *.velup sub .up store
stop

cond
*.eyef 0 =
*.fixed 0 =
*.vel *.maxvel !=
start
*.maxvel *.vel sub .up store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye1 20 <
*.eye2 20 <
*.eye3 20 <
*.eye4 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .sx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye6 20 <
*.eye7 20 <
*.eye8 20 <
*.eye9 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .dx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.numties 0 >
*.trefvel *.vel = or
*.trefvel *.vel >
start
*.trefaim .setaim store
*.maxvel *.vel sub .up store
stop

'Attack/Defensive Genes
'*****************

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.eyef 0 =
*.refeye *.myeye = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
942 *.shang sub .setaim store
0 .shflav store
100 .mkshell store
26 .strvenom
.shoot .ploc store
stop

cond
*.fixed 0 =
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 40 >
*.refeye 0 !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .aimshot store
*.nrg 4 *.pain add div .shootval store
-1 .shotselect store
cond

cond
*.refaim *.aim !=
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 40 >
*.eyef 90 <
*.refeye 0 !=
start
*.refxpos *.refypos angle .aimshot store
*.setaim .shootval store
*.aim .shotselect store
cond

cond
*.refeye *.myeye != or
*.in2 *.out2 !=
*.eyef 40 >
*.refeye 2 >
*.in1 *.bot1 !=
*.in1 *.bot2 !=
*.in1 *.bot3 !=
*.in1 *.bot4 !=
*.in1 *.bot5 !=
*.in1 *.bot6 !=
*.in1 *.bot7 !=
*.in1 *.bot8 !=
*.in1 *.bot9 !=
*.in1 *.bot10 !=
start
*.refxpos *.refypos angle .aimshot store
100 *.body sub *.nrg add .shootval store
-1 .shotselect store
stop

'Create Venom and Poison

cond
*.nrg 6000 > and
*.venom 20 <
*.poison 20 <
start
*.nrg *.venom sub 7 div .strvenom store
*.nrg *.poison sub 6 div .mkpoison store
stop

cond
*.eyef 30 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.venom 0 >
*.refeye 0 !=
*.stage 3 =
start
.venomsel inc
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle .aimshot store
stop

cond
*.venomsel 1 =
start
728 .venloc store
*.myeye .venval store
-3 .shoot store
stop

cond
*.venomsel 2 =
start
.shoot .venloc store
-1 .venval store
-3 .shoot store
stop

cond
*.venomsel 3 =
start
.setaim .venloc store
*.xpos *.ypos angle .venval store
-3 .shoot store
stop

cond
*.venomsel 4 =
start
0 .venomsel store
stop

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.nrg 3000 >
*.shell 20 <
start
*.nrg 5 div .mkshell store
stop

'Used for Info Shots under certain conditions

cond
*.fixed 0 =
*.eyef 40 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.refkills *.kills >
*.refeye 0 !=
start
*.refxpos *.refypos angle .aimshot store
.fixpos .shootval store
*.refxpos .fxpos store
*.refypos .fypos store
stop

'Shoot at the enemy using the 40 selection

cond
*.eyef 60 >
*.shotselect 0 !=
start
*.refxpos *.refypos angle *.eyef mod -1 mult .aimdx store
*.focuseye .focuseye store
2 140 store
*.shotselect .shoot store
stop

'Disguise if mutated

cond
*.in2 *.dnalen !=
*.in2 *.out2 !=
*.refeye *.meye %=
*.refeye 0 !=
start
*.in2 .out2 store
stop

'Memory Loactions 80-81
'*******************

'Return to a trapped enemy if in pain

cond
*.pain 100 >
*.eyef 0 =
*.numties 0 =
*.robage 21 >
*.fixpos 0 =
start
*.fxpos *.fypos angle .setaim store
1 90 store
stop

cond
*.eyef 0 >
*.eyef 50 <
*90 1 =
*.xpos *.fxpos %=
*.ypos *.fypos %=
start
*.refxpos *.refypos angle .aimshot store
*.refxpos *.refypos angle .setaim store
*.nrg 3 div .shootval store
-1 .shotselect store
stop


'Tie Genes
'****************

'Tie to a veg in Multi Bot Mode

cond
*.eyef 50 >
*.refeye 0 =
*.multimode 0 >
*.numties 1 =
start
1 *.tiecounter add .tiecounter store
*.tiecounter .tie store
stop

cond
*.stage 6 !=
*.trefeye 0 =
*.multimode 0 >
*.tielen 30 !=
*.in4 5 !=
start
210 *.tienum mult .fixang store
30 .fixlen store
70 .stiftie store
stop

'Tie to conspec

cond
*.in4 3 =
*.numties 2 <
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.myeye *.refeye %=
*.eyef 50 >
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
stop

cond
*.eyef 40 >
*.refeye 0 =
*.numties 3 <
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
75 *.aim add .setaim store
stop

'Read Ties

cond
start
*.robage mod *.numties *.tiepres add .readtie store
stop

'Tell Veg that You're taken

cond
*.trefeye 0 =
*.trefnrg 10 >
start
.tout1 .tieloc store
5 .tieval store
stop

'set the paramaters for the veggie, ie distance and angle

cond
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.multimode 0 =
start
*.readcounter .tienum store
60 .fixlen store
90 *.tienum add .fixang store
60 .stifftie store
stop

cond
*.numties 0 >
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.out4 1
start
*.readcounter .tienum store
180 *.tienum mult .fixang store
60 .fixlen store
60 .stifftie store
200 .tmemloc store
*.vel .tmemval store
stop

'Feed from Veg

cond
*.trefeye 0 =
*.numties 0 >
start
*.tiepres .readtie *.numties sgn mult store
.tiepres .memloc *.robage -1 mult 1 add sgn mult store
.numties .tmemloc *.robage -1 mult 1 add sgn mult store
55 10 rnd add .tie *.refeye sgn -1 mult 1 add sgn mult *.eye5 45 sub sgn mult *.memval sgn -1 mult 1 add sgn mult *.robage sgn mult store
628 .fixang *.numties sgn mult store
200 .fixlen *.numties sgn mult store
*.tiepres .tienum *.numties sgn mult store
*.tiepres .readtie *.numties sgn mult store
.fixpos .tieloc *.numties sgn mult *.treffixed mult store
0 .tieval *.numties sgn mult *.treffixed mult store
80 .sharenrg *.multi mult store
-1 .tieloc store
-1000 .tieval store
100 .sharewaste *.multi mult store
stop

cond
*.nrg *.trefnrg <
*.numties 0 >
*.body 800 <
*.nrg 2100 <
*.trefeye *.myeye %=
start
50 .sharenrg *.multi mult store
stop

cond
*.multimode 1 =
*.waste 0 >
*.numties 0 >
*.multi 0 >
*.trefeye *.myeye %=
start
50 .sharewaste *.multi mult store
stop

'Delete Ties to enemies

cond
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres *.tienum store
*.trefaim *.aim sub .setaim store
*.tiepres .deltie store
0 .stage store
stop

cond
*.tiepres *.readcounter !=
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres .tienum store
400 .tieval store
.tieval .tieloc store
50 .sharewaste *.multi mult store
stop

cond
*.numties 2 >
*.fixed 0 !=
*.tin1 0 !=
start
0 .fixpos store
6 .stage store
stop

cond
*43 2 >
*.nrg 10000 >
*.body 900 >
*.numties 0 >
start
*.tiepres .deltie store
0 .fixpos store
0 .multimode store
6 .tout1 store
stop

'Multibot Tie mode
'*****************************

cond
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 6 !=
start
*.readcounter .multimode store
stop

cond
*.multimode 0 >
*.multeyef *.eyef >
*.stage 6 !=
start
*.multrefvel *.vel sub .dn store
1 .multi store
stop

'Turn both bots to face 90 degrees out.

cond
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 6 !=
start
210 .fixang store
70 .fixlen store
70 .stiftie store
stop


'Command Interpretation
'****************

cond
*.in4 7 =
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*43 3 <
start
50 .sexrepro store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle .aimshot store
-8 .shoot store
*.refvel *.vel sub .dn store
1 .fixpos store
0 .multimode store
7 .out5 store
*43 1 add 43 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.in5 7 =
*.out4 7 =
*43 3 <
start
0 .out4 store
*43 1 add 43 store
stop

cond
*.stage *.tout1 !=
start
*.stage .tout1 store
stop

cond
*.tin1 *.stage !=
start
*.tin1 .stage store
0 .fixpos store
*.numties .tout2 store
stop

cond
*.robage *.trefage >
*.numties *.tin2  >
*.tin2 2 <
*.kills 3 >
start
55 .tout1 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.out5 7 =
*.in4 7 =
start
0 .out5 store
0 .out4 store
stop

'Stage 2: Swarm Mode
'***************

cond
*.refeye 0 =
*.refeye *.myeye =
*.stage 6 !=
*.in6 42 !=
start
6 .stage store
1 .out4 store
stop

'Swarm in a Circle:

cond
*.multi 0 >
*466 0 >
*.eye5 30 >
*.eye5 80 <
*.refeye *.myeye =
*.in4 1 =
*.numties 2 >
*.nrg 3000 >
*.stage 6 =
start
*.bxpos .bypos angle .setaim store
*.refvel *.vel sub .up store
1 .out4 store
stop

cond
*.refeye *.myeye %=
*.in1 *.out1 %=
*.in4 1 =
*.stage 6 =
start
*.tiepres 1 add .tie store
*.tiepres .readtie store
stop

cond
*.trefeye *.myeye %=
*.robage *.trefage >
*.stage 6 =
start
30 *.aim add .setaim store
*.maxvel *.vel sub .dn store
stop

cond
*.stage 6 =
*.trefeye *.myeye %=
*.robage *.trefage <
start
20 .fixlen
0 140 store
260 .fixang store
40 .stifftie store
*.trefvel *.vel sub .up store
*.trefaim .aim store
stop

cond
*.out4 1 =
*.poison 150 <
*.nrg 2000 <
start
*.nrg 9 div .mkpoison store
*.eyef .ploc store
stop

cond
*.multeyef *.eyef >
start
*.multvel *.vel sub .dn store
stop

cond
*.multeyef *.eyef =
*.trefaim *.aim %=
*.trefeye *.myeye %=
start
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle .aimshot store
*.refvel *.vel sub .aim store
-1 .shoot store
stop


'Stage 3-War
'===================

cond
*.refeye *.myeye !=
*.refeye 0 !=
*.in1 *.bot1 !=
*.in1 *.bot2 !=
*.in1 *.bot3 !=
*.in1 *.bot4 !=
*.in1 *.bot5 !=
*.in1 *.bot6 !=
*.in1 *.bot7 !=
*.in1 *.bot8 !=
*.in1 *.bot9 !=
*.in1 *.bot10 !=
*.newbot 0 =
*.in2 *.out2 != or
*.in1 *.out1 =
start
42 .out6 store
3 .tout1 store
3 .stage store
stop

cond
*.refeye *.myeye =
*.in6 42 =
*.robage *.refage >
start
*.in6 .out6 store
3 .tout1 store
3 .stage store
*.in7 *.in8 angle mod *.refxpos *.refypos angle .setaim store
*.in7 .out7 store
*.in8 .out8 store
*.maxvel *.mass mult *.vel sub .up store
stop

cond
*.stage 3 =
*.numties 0 > or
*.tiepres 0 >
*.refeye *.myeye !=
*.refeye 0 >
*.in2 *.out2 !=
*.in6 42 = or
*.tin1 3 =
start
*.numties .deltie store
*.tiepres .deltie store
stop

cond
*.stage 3 =
*.eyef 0 >
*.refeye *.myeye !=
*.refeye 0 >
start
*.maxvel *.vel sub .up store
*.refxpos *.refypos angle .setaim store
42 .out6 store
*.refxpos .out7 store
*.refypos .out8 store
stop

cond
*.eyef 20 >
*.refeye *.myeye != or
*.in2 *.out2 !=
*.refeye 0 >
start
*.refvelsx *.vel div 10 sub .sx store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle *.mysx *.refvelsx add mult .aimshot store
*.nrg 4 div .shootval store
-1 .shoot store
0 140 store
stop

cond
*.tin1 3 =
start
3 .stage store
3 .tout1 store
42 .out6 store
stop

cond
*.in6 42 !=
*.stage 3 =
*.refeye *.myeye =
*.robage *.refage <
start
14000 140 store
stop

'Stage 1B: The Sitting Predator
'*************************

'Become fixed

cond
*.multimode 0 =
*.numties 1 >
*.trefeye 0 =
*.fixpos 0 =
start
3 .out4 store
1 .fixpos store
70 .stiftie store
stop

cond
*.trefeye *.myeye %=
*.fixed 1 =
*.numties 2 = or
*.mutlimode 0 >
start
6 .out4 store
0 .fixpos store
50 .stiftie store
stop

'Become the Swarm

cond
*.numties 2 >
*.trefeye 0 = or
*.stage 6 !=
*.fixed 0 =
*.tin1 0 !=
start
6 .stage store
stop

'Stage 5 Genes: The Waiting trap
'**********************

cond
*.stage 5 =
*.robage 26 =
start
9 140 store
stop

cond
*.stage 5 =
*.robage 25 = or
*.nrg 5000 >
start
50 .repro store
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
stop

'Wait for the tie to harden and then set the adolecesants memory

cond
*.stage 5 =
*.multi 0 >
start
*.stage .tieloc store
55 .tieval store
70 .stifftie store
stop

cond
*.trefeye *.myeye %=
*.stage 5 =
*.tielen 40 >
start
40 .fixlen store
70 .stifftie store
stop

cond
*.stage 5 =
start
.setaim .tieloc store
*.aim .tieval store
stop

cond
*.stage 5 =
*.maxvel *.numties div *.vel !=
start
*.maxvel *.numties div *.vel .aim store
stop

cond
*.stage 5 =
*.numties 3 =
*.xpos *.bxpos %=
*.ypos .bypos %=
*.robage 200 >
*.kills 2 >
start
1 .fixpos store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye 0 =
*.kills 3 >
start
.fixpos .tieloc store
1 .tieval store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye *.myeye %=
start
55 .sharenrg *.multi mult store
stop

cond
*.stage 5 !=
*140 9 =
start
0 140 store
stop

'Stage 5-5 Instructions:
'********************

cond
*140 9 !=
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 55 =
start
*.readcounter .multimode store
stop

cond
*140 9 !=
*.multimode 0 >
*.multeyef *.eyef >
*.stage 55 =
start
*.multrefvel *.vel sub .dn store
stop

'Turn both bots to face 90 degrees out.

cond
*140 9 !=
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 55 =
start
240 .fixang store
70 .fixlen store
70 .stiftie store
stop

cond
*.stage 55 =
*.trefeye *.myeye %=
start
*.trefvel *.vel sub .aim store
55 .sharenrg *.multi mult store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.venom 100 <
start
*.nrg 6 div .strvenom store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.poison 50 <
start
*.nrg 5 div .mkpoison store
.eyef .ploc store
stop

cond
*.stage 55 =
*.nrg 5000 >
*.eyef 0 =
*.poison 10 >
*.venom 10 >
start
*.nrg 3 div .shootval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle .aimshot store
-1 .shoot store
stop

cond
*.stage 55 =
*.kills 5 >
start
.stage .tieloc store
0 .tieval store
stop

cond
*.stage 55 =
*.kills 5 >
start
.fixpos .tieloc store
0 .tieval store
0 .stage store
stop

'Dietary Genes
'***************

cond
*.nrg 3000 >
*.body 1000 <
*.pleas 0 >
start
*.pleas 2 div .strbody store
stop

'Feed when hungry from body

cond
*.nrg 500 <
*.body 0 >
*.numties 0 =
start
*.body *.pain add 2 div .fdbody store
stop

'Reproductive Genes
'****************

cond
*.fixed 0 !=
*.nrg 6000 >
*43 5 <
start
60 .repro store
*43 1 add 43 store
stop

cond
*.numties 2 <
*.trefeye 0 =
*.nrg 4000 >
*43 6 <
start
50 .repro store
*43 1 add 43 store
stop

cond
*.refeye *.myeye !=
*.nrg 2000 >
start
50 .repro store
stop

'MultiMode Only

cond
*.multimode 0 >
*.nrg 4000 >
*.trefeye *.myeye = or
*.refeye *.myeye =
start
*.multimode *.tienum store
*.tieang .setaim store
7 .out4 store
stop

'Reset Values
'**************

cond
*.stage 3 =
start
0 .fixpos store
stop

cond
*.numties 0 =
*.fixed 0 !=
*.out4 7 !=
start
55 .stage store
0 .fixpos store
stop

cond
*.numties 0 =
*.vel 0 !=
start
0 .fixpos store
0 .tiecounter store
stop

cond
*.fixed 0 != and
*.out4 7 != or
*.out5 7 != or
*.trefeye *.myeye %=
*.vel 0 !=
start
0 .fixpos store
0 .stage store
stop

cond
*.numties 0 >
*.readcounter *.multimode >
start
0 .multimode store
stop

cond
*.numties 0 >
*.readcounter *.multimode =
*.trefeye 0 =
start
0 .multimode store
stop

cond
*.readcounter *.multimode =
start
213 .tieloc store
0 .tieval store
stop

cond
*.readcounter *.multimode =
start
151 .tieloc store
*.multimode .tieval store
stop
end

the conditions I included are for optimal production with 1 Slim Evo in a field with 30 veggies, and lots of enemies, not including the sea snake yet. For fields with 5+ slim evos, 5000 starting nrg should work well enough.

Hope you enjoy it.

26
Interesting behaviour bots / Slim Evo Colonies 1.2
« on: April 28, 2008, 03:47:51 PM »
'Slim Evo 3; The Predator:
'Developed from Slim Evo 2 and Welwordion's 360 Eye Arrays. I have modified Welwordion's design to
'maintain even more detailed information about each entity in an eye, and added a second condition for
'multi-bot mode, which takes the place of the swarm theory in The Communicator.
'The targeting systems have been developed for multiple staged combatants, and multipled formations.
'Best of all, is individual identity, for a more personal relation between a bot and its fellows.
'The current limitations for conspec identity is 10 individuals for this bot.
'There are several other interesting behaviors that become active throughout each stage.

'Individuality

def botname .out1
def bot1 970
def bot2 971
def bot3 972
def bot4 973
def bot5 974
def bot6 975
def bot7 976
def bot8 977
def bot9 978
def bot10 979

'Historical Info

def bxpos 82
def bypos 83
def fxpos 80
def fypos 81

'Tie Info

def readcounter 150
def multimode 151
def tiereader 60
def multeyef 86
def tsexrpro 88
def multrefage 84
def multrefvel 87
def readreset 149
def tiecounter 74

'Attack/Defence

def venomsel 76
def stage 75
def shotselect 40

'Eye Info

def newbot 50
def memcounter 73
def preveye1 51
def preveye2 52
def preveye3 53
def preveye4 54
def preveye5 55
def preveye6 56
def preveye7 57
def preveye8 58
def preveye9 59
def eye1id 61
def eye2id 62
def eye3id 63
def eye4id 64
def eye5id 65
def eye6id 66
def eye7id 67
def eye8id 68
def eye9id 69


'Welwordion's 360 Eyes/Initialization and Indientity
'**********************

cond
*.robage 0 =
start
*.tiepres .deltie store
9999 rnd .botname store
*.dnalen .out2 store
420 .eye1dir store
315 .eye2dir store
210 .eye3dir store
105 .eye4dir store
-105 .eye6dir store
-210 .eye7dir store
-315 .eye8dir store
-420 .eye9dir store
105 .eye1width store
105 .eye2width store
105 .eye3width store
105 .eye4width store
105 .eye5width store
105 .eye6width store
105 .eye7width store
105 .eye8width store
105 .eye9width store
50 *.nrg 1000 div mult .repro store
stop

cond
*.eyef 0 >
*.refeye 0 !=
*.in2 *.out2 !=
*.refeye *.myeye !=
*.in1 *.bot1 !=
*.in1 *.bot2 !=
*.in1 *.bot3 !=
*.in1 *.bot4 !=
*.in1 *.bot5 !=
*.in1 *.bot6 !=
*.in1 *.bot7 !=
*.in1 *.bot8 !=
*.in1 *.bot9 !=
*.in1 *.bot10 !=
start
3 .stage store
stop

cond
*.robage 21 =
start
*.tiepres .deltie store
stop

'eye1 specific

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 ~=
*.eye2id 1 = and
*.eye1 *.preveye9 5 ~=
*.eye9id 1 = and or
start
1 .eye1id store
stop

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 !~=
*.eye1 *.preveye9 !~=
start
0 .eye1id store
stop

cond
*.eye1 0 =
start
0 .eye1id store
stop

'eye2 specific

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 ~=
*.eye3id 1 = and
*.eye2 *.preveye2 5 ~=
*.eye1id 1 = and or
start
1 .eye2id store
stop

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 !~=
*.eye2 *.preveye1 5 !~=
start
0 .eye2id store
stop

cond
*.eye2 0 =
start
0 .eye2id store
stop

'eye3 specific

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 ~=
*.eye4id 1 = and
*.eye3 *.preveye2 5 ~=
*.eye2id 1 = and or
start
1 .eye3id store
stop

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 !~=
*.eye3 *.preveye2 5 !~=
start
0 .eye3id store
stop

cond
*.eye3 0 =
start
0 .eye3id store
stop

'eye4 specific

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye5 5 ~=
*.eye5id 1 = and
*.eye4 *.preveye3 5 ~=
*.eye3id 1 = and or
start
1 .eye4id store
stop

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye3 5 !~=
start
0 .eye4id store
stop

cond
*.eye4 0 =
start
0 .eye4id store
stop

'eye5 specific

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 ~=
*.eye6id 1 = and
*.eye5 *.preveye4 5 ~=
*.eye4id 1 = and or
start
1 .eye5id store
stop

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 !~=
*.eye5 *.preveye4 5 !~=
start
0 .eye5id store
stop

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

'eye6 specific

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 ~=
*.eye7id 1 = and
*.eye6 *.preveye5 5 ~=
*.eye4id 1 = and or
start
1 .eye6id store
stop

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 !~=
*.eye6 *.preveye5 5 !~=
start
0 .eye6id store
stop

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

'eye7 specific

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye9 5 ~=
*.eye8id 1 = and
*.eye7 *56 5 ~=
*.eye6id 1 = and or
start
1 .eye7id store
stop

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye8 5 !~=
*.eye7 *.preveye6 5 !~=
start
0 .eye7id store
stop

cond
*.eye7 0 =
start
0 .eye7id store
stop

'eye8 specific

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 ~=
*.eye9id 1 = and
*.eye8 *.preveye7 5 ~=
*.eye7id 1 = and or
start
1 .eye8id store
stop

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 !~=
*.eye8 *.preveye7 5 !~=
start
0 .eye8id store
stop

cond
*.eye8 0 =
start
0 .eye8id store
stop

'eye9 specific

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 ~=
*.eye1id 1 = and
*.eye9 *58 5 ~=
*.eye8id 1 = and or
start
1 .eye9id store
stop

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 !~=
*.eye9 *.preveye8 5 !~=
start
0 .eye9id store
stop

cond
*.eye9 0 =
start
0 .eye9id store
stop

'the focuseye is set

cond
*.robage 20 mod 0 !=
*140 0 =
start
5 .focuseye *.eye1 sgn abs mult *.eye1id 1 sub abs mult store
6 .focuseye *.eye2 sgn abs mult *.eye2id 1 sub abs mult store
7 .focuseye *.eye3 sgn abs mult *.eye3id 1 sub abs mult store
8 .focuseye *.eye4 sgn abs mult *.eye4id 1 sub abs mult store
9 .focuseye *.eye5 sgn abs mult *.eye5id 1 sub abs mult store
1 .focuseye *.eye6 sgn abs mult *.eye6id 1 sub abs mult store
2 .focuseye *.eye7 sgn abs mult *.eye7id 1 sub abs mult store
3 .focuseye *.eye8 sgn abs mult *.eye8id 1 sub abs mult store
4 .focuseye *.eye9 sgn abs mult *.eye9id 1 sub abs mult store
stop

'the visual memory is stored

cond
start
*.eye1 .preveye1 store
*.eye2 .preveye2 store
*.eye3 .preveye3 store
*.eye4 .preveye4 store
*.eye5 .preveye5 store
*.eye6 .preveye6 store
*.eye7 .preveye7 store
*.eye8 .preveye8 store
*.eye9 .preveye9 store
stop

'Individuality Genes
'*******************

'check species and bot name

cond
*.eyef 0 >
*.in2 *.out2 =
*.myeye *.refeye %=
*.in4 *.bot1 != and
*.in4 *.bot2 != and
*.in4 *.bot3 != and
*.in4 *.bot4 != and
*.in4 *.bot5 != and
*.in4 *.bot6 != and
*.in4 *.bot7 != and
*.in4 *.bot8 != and
*.in4 *.bot9 != and
*.in4 *.bot10 !=
start
1 .newbot store
*.memcounter 1 add .memcounter store
stop

'select a memory location for in4

cond
*.newbot 1 =
*.memcounter 1 =
*.bot1 0 =
start
*.in1 .bot1 store
cond
*.bot1 0 !=
*.bot2 0 =
start
*.in1 .bot2 store
cond
*.bot2 0 !=
*.bot3 0 =
start
*.in1 .bot3 store
cond
*.bot3 0 !=
*.bot4 0 =
start
*.in1 .bot4 store
cond
*.bot4 0 !=
*.bot5 0 =
start
*.in1 .bot5 store
cond
*.bot5 0 !=
*.bot6 0 =
start
*.in1 .bot6 store
cond
*.bot6 0 !=
*.bot7 0 =
start
*.in1 .bot7 store
cond
*.bot7 0 !=
*.bot8 0 =
start
*.in1 .bot8 store
cond
*.bot8 0 !=
*.bot9 0 =
start
*.in1 .bot9 store
cond
*.bot9 0 !=
*.bot10 0 =
start
*.in1 .bot10 store
stop

'Turning Genes
'****************

'Turn to a veg

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye 0 =
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .setaim store
stop

'turn towards an enemy

cond
*.focuseye 1 =
*.refeye *.myeye !=
*.refeye 0 !=
start
420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
3 .stage store
stop

cond
*.focuseye 2 =
*.refeye *.myeye !=
*.refeye 0 !=
start
315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 3 =
*.refeye *.myeye !=
*.refeye 0 !=
start
210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 4 =
*.refeye *.myeye !=
*.refeye 0 !=
start
105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 6 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 7 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 8 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 9 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

'Turn to conspec

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye *.myeye %=
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in4 1 =
*.refxpos *.refypos angle *.tieang !=
*.tin1 0 !=
start
*.refxpos *.refypos angle .setaim store
0 *.velup sub *.eyef sub *.fixpos mult ~ .up store
0 .stage store
stop

'Movement Genes
'****************

'Move Forward

cond
*.fixed 0 =
*.out4 1 !=
*.eyef 0 >
*.eyef 80 <
*.refeye *.myeye !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle -1 mult *.aim add
1256 add 1256 mod
dup dup dup dup dup 314 ceil swapint
314 floor 942 ceil 314 sub sub swapint
942 floor 942 sub add 2 div *.veldx sub .dx store
628 ceil -1 mult 314 add swapint
628 floor 628 sub add 2 div *.velup sub .up store
stop

cond
*.eyef 0 =
*.fixed 0 =
*.vel *.maxvel !=
start
*.maxvel *.vel sub .up store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye1 20 <
*.eye2 20 <
*.eye3 20 <
*.eye4 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .sx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye6 20 <
*.eye7 20 <
*.eye8 20 <
*.eye9 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .dx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.numties 0 >
*.trefvel *.vel = or
*.trefvel *.vel >
start
*.trefaim .setaim store
*.maxvel *.vel sub .up store
stop

'Attack/Defensive Genes
'*****************

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.eyef 0 =
*.refeye *.myeye = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
942 *.shang sub .setaim store
0 .shflav store
100 .mkshell store
26 .strvenom
.shoot .ploc store
stop

cond
*.fixed 0 =
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 40 >
*.refeye 0 !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .aimshot store
*.nrg 4 *.pain add div .shootval store
-1 .shotselect store
cond

cond
*.refaim *.aim !=
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 40 >
*.eyef 90 <
*.refeye 0 !=
start
*.refxpos *.refypos angle .aimshot store
*.setaim .shootval store
*.aim .shotselect store
cond

cond
*.refeye *.myeye != or
*.in2 *.out2 !=
*.eyef 40 >
*.refeye 2 >
*.in1 *.bot1 !=
*.in1 *.bot2 !=
*.in1 *.bot3 !=
*.in1 *.bot4 !=
*.in1 *.bot5 !=
*.in1 *.bot6 !=
*.in1 *.bot7 !=
*.in1 *.bot8 !=
*.in1 *.bot9 !=
*.in1 *.bot10 !=
start
*.refxpos *.refypos angle .aimshot store
100 *.body sub *.nrg add .shootval store
-1 .shotselect store
stop

'Create Venom and Poison

cond
*.nrg 6000 > and
*.venom 20 <
*.poison 20 <
start
*.nrg *.venom sub 7 div .strvenom store
*.nrg *.poison sub 6 div .mkpoison store
stop

cond
*.eyef 40 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.venom 0 >
*.refeye 0 !=
start
1 .venomsel store
cond
*.venomsel 1 =
start
728 .venloc store
*.myeye .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 2 =
start
.shoot .venloc store
-2 .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 3 =
start
.setaim .venloc store
*.xpos *.ypos angle .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 4 =
start
0 .venomsel store
stop

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.nrg 3000 >
*.shell 20 <
start
*.nrg 5 div .mkshell store
stop

'Used for Info Shots under certain conditions

cond
*.fixed 0 =
*.eyef 40 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.refkills *.kills >
*.refeye 0 !=
start
.fixpos .shootval store
*.refxpos .fxpos store
*.refypos .fypos store
stop

'Shoot at the enemy using the 40 selection

cond
*.eyef 60 >
*.shotselect 0 !=
start
*.refxpos *.refypos angle *.eyef mod -1 mult .aimdx store
*.focuseye .focuseye store
2 140 store
*.shotselect .shoot store
stop

'Disguise if mutated

cond
*.in2 *.dnalen !=
*.in2 *.out2 !=
*.refeye *.meye %=
*.refeye 0 !=
start
*.in2 .out2 store
stop

'Memory Loactions 80-81
'*******************

'Return to a trapped enemy if in pain

cond
*.pain 100 >
*.eyef 0 =
*.numties 0 =
*.robage 21 >
*.fixpos 0 =
start
*.fxpos *.fypos angle .setaim store
1 90 store
stop

cond
*.eyef 0 >
*.eyef 50 <
*90 1 =
*.xpos *.fxpos %=
*.ypos *.fypos %=
start
*.nrg 3 div .shootval store
-1 .shotselect store
stop


'Tie Genes
'****************

'Tie to a veg in Multi Bot Mode

cond
*.eyef 50 >
*.refeye 0 =
*.multimode 0 >
*.numties 1 =
start
1 *.tiecounter add .tiecounter store
*.tiecounter .tie store
stop

cond
*.stage 6 !=
*.trefeye 0 =
*.multimode 0 >
*.tielen 30 !=
*.in4 5 !=
start
210 *.tienum mult .fixang store
30 .fixlen store
70 .stiftie store
stop

'Tie to conspec

cond
*.in4 3 =
*.numties 2 <
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.myeye *.refeye %=
*.eyef 50 >
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
stop

cond
*.eyef 40 >
*.refeye 0 =
*.numties 3 <
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
75 *.aim add .setaim store
stop

'Read Ties

cond
start
*.robage mod *.numties *.tiepres add .readtie store
stop

'Tell Veg that You're taken

cond
*.trefeye 0 =
*.trefnrg 10 >
start
.tout1 .tieloc store
5 .tieval store
stop

'set the paramaters for the veggie, ie distance and angle

cond
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.multimode 0 =
start
*.readcounter .tienum store
60 .fixlen store
90 *.tienum add .fixang store
60 .stifftie store
stop

cond
*.numties 0 >
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.out4 1
start
*.readcounter .tienum store
180 *.tienum mult .fixang store
60 .fixlen store
60 .stifftie store
200 .tmemloc store
*.vel .tmemval store
stop

'Feed from Veg

cond
*.trefeye 0 =
*.numties 0 >
start
*.tiepres .readtie *.numties sgn mult store
.tiepres .memloc *.robage -1 mult 1 add sgn mult store
.numties .tmemloc *.robage -1 mult 1 add sgn mult store
55 10 rnd add .tie *.refeye sgn -1 mult 1 add sgn mult *.eye5 45 sub sgn mult *.memval sgn -1 mult 1 add sgn mult *.robage sgn mult store
628 .fixang *.numties sgn mult store
200 .fixlen *.numties sgn mult store
*.tiepres .tienum *.numties sgn mult store
*.tiepres .readtie *.numties sgn mult store
.fixpos .tieloc *.numties sgn mult *.treffixed mult store
0 .tieval *.numties sgn mult *.treffixed mult store
80 .sharenrg *.multi mult store
-1 .tieloc store
-1000 .tieval store
100 .sharewaste *.multi mult store
stop

cond
*.nrg *.trefnrg <
*.numties 0 >
*.body 800 <
*.nrg 2100 <
*.trefeye *.myeye %=
start
50 .sharenrg *.multi mult store
stop

cond
*.multimode 1 =
*.waste 0 >
*.numties 0 >
*.multi 0 >
*.trefeye *.myeye %=
start
50 .sharewaste *.multi mult store
stop

'Delete Ties to enemies

cond
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres *.tienum store
*.trefaim *.aim sub .setaim store
*.tiepres .deltie store
0 .stage store
stop

cond
*.tiepres *.readcounter !=
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres .tienum store
400 .tieval store
.tieval .tieloc store
50 .sharewaste *.multi mult store
stop

cond
*.numties 2 >
*.fixed 0 !=
*.tin1 0 !=
start
0 .fixpos store
6 .stage store
stop

cond
*43 2 >
*.nrg 10000 >
*.body 900 >
*.numties 0 >
start
*.tiepres .deltie store
0 .fixpos store
0 .multimode store
6 .tout1 store
stop

'Multibot Tie mode
'*****************************

cond
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 6 !=
start
*.readcounter .multimode store
stop

cond
*.multimode 0 >
*.multeyef *.eyef >
*.stage 6 !=
start
*.multrefvel *.vel sub .dn store
1 .multi store
stop

'Turn both bots to face 90 degrees out.

cond
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 6 !=
start
210 .fixang store
70 .fixlen store
70 .stiftie store
stop


'Command Interpretation
'****************

cond
*.in4 7 =
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*43 3 <
start
50 .sexrepro store
*.refxpos *.refypos angle .aimshot store
-8 .shoot store
*.refvel *.vel sub .dn store
1 .fixpos store
0 .multimode store
7 .out5 store
*43 1 add 43 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.in5 7 =
*.out4 7 =
*43 3 <
start
0 .out4 store
*43 1 add 43 store
stop

cond
*.stage *.tout1 !=
start
*.stage .tout1 store
stop

cond
*.tin1 *.stage !=
start
*.tin1 .stage store
0 .fixpos store
*.numties .tout2 store
stop

cond
*.robage *.trefage >
*.numties *.tin2  >
*.tin2 2 <
*.kills 3 >
start
55 .tout1 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.out5 7 =
*.in4 7 =
start
0 .out5 store
0 .out4 store
stop

'Stage 2: Swarm Mode
'***************

'Swarm in a Circle:

cond
*.multi 0 >
*466 0 >
*.eye5 30 >
*.eye5 80 <
*.refeye *.myeye =
*.in4 1 =
*.numties 2 >
*.nrg 3000 >
*.stage 6 =
start
*.bxpos .bypos angle .setaim store
*.refvel *.vel sub .up store
1 .out4 store
stop

cond
*.refeye *.myeye %=
*.in1 *.out1 %=
*.in4 1 =
*.stage 6 =
start
*.tiepres 1 add .tie store
*.tiepres .readtie store
stop

cond
*.trefeye *.myeye %=
*.robage *.trefage >
*.stage 6 =
start
30 *.aim add .setaim store
*.maxvel *.vel sub .dn store
stop

cond
*.stage 6 =
*.trefeye *.myeye %=
*.robage *.trefage <
start
20 .fixlen
0 140 store
260 .fixang store
40 .stifftie store
*.trefvel *.vel sub .up store
*.trefaim .aim store
stop

cond
*.out4 1 =
*.poison 150 <
*.nrg 2000 <
start
*.nrg 9 div .mkpoison store
*.eyef .ploc store
stop

cond
*.multeyef *.eyef >
start
*.multvel *.vel sub .dn store
stop

cond
*.multeyef *.eyef =
*.trefaim *.aim %=
*.trefeye *.myeye %=
start
*.refvel *.vel sub .aim store
-1 .shotselect store
stop


'Stage 3-War
'===================

cond
*.refeye *.myeye =
*.in6 42 =
start
*.in6 .out6 store
3 .stage store
*.in7 *.in8 angle .setaim store
*.maxvel *.mass mult *.vel sub .up store
stop

cond
*.stage 3 =
*.numties 0 >
start
*.numties .deltie store
stop

cond
*.stage 3 =
*.eyef 0 >
*.refeye *.myeye !=
start
*.maxvel *.vel sub .up store
*.refxpos *.refypos angle .setaim store
42 .out6 store
*.refxpos .out7 store
*.refypos .out8 store
stop

cond
*.stage 3 =
*.eyef 40 >
*.refeye *.myeye !=
start
30 *.pain sub .shootval store
-1 .shoot store
stop

cond
*.tin1 3 =
start
3 .stage store
stop

'Stage 1B: The Sitting Predator
'*************************

'Become fixed

cond
*.multimode 0 =
*.numties 1 >
*.trefeye 0 =
*.fixpos 0 =
start
3 .out4 store
1 .fixpos store
70 .stiftie store
stop

cond
*.trefeye *.myeye %=
*.fixed 1 =
*.numties 2 = or
*.mutlimode 0 >
start
6 .out4 store
0 .fixpos store
50 .stiftie store
stop

'Become the Swarm

cond
*.numties 2 >
*.trefeye 0 = or
*.stage 6 !=
*.fixed 0 =
*.tin1 0 !=
start
6 .stage store
stop

'Stage 5 Genes: The Waiting trap
'**********************

cond
*.stage 5 =
*.robage 26 =
start
9 140 store
stop

cond
*.stage 5 =
*.robage 25 = or
*.nrg 5000 >
start
50 .repro store
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
stop

'Wait for the tie to harden and then set the adolecesants memory

cond
*.stage 5 =
*.multi 0 >
start
*.stage .tieloc store
55 .tieval store
70 .stifftie store
stop

cond
*.trefeye *.myeye %=
*.stage 5 =
*.tielen 40 >
start
40 .fixlen store
70 .stifftie store
stop

cond
*.stage 5 =
start
.setaim .tieloc store
*.aim .tieval store
stop

cond
*.stage 5 =
*.maxvel *.numties div *.vel !=
start
*.maxvel *.numties div *.vel .aim store
stop

cond
*.stage 5 =
*.numties 3 =
*.xpos *.bxpos %=
*.ypos .bypos %=
*.robage 200 >
*.kills 2 >
start
1 .fixpos store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye 0 =
*.kills 3 >
start
.fixpos .tieloc store
1 .tieval store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye *.myeye %=
start
55 .sharenrg *.multi mult store
stop

cond
*.stage 5 !=
*140 9 =
start
0 140 store
stop

'Stage 5-5 Instructions:
'********************

cond
*140 9 !=
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 55 =
start
*.readcounter .multimode store
stop

cond
*140 9 !=
*.multimode 0 >
*.multeyef *.eyef >
*.stage 55 =
start
*.multrefvel *.vel sub .dn store
stop

'Turn both bots to face 90 degrees out.

cond
*140 9 !=
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 55 =
start
240 .fixang store
70 .fixlen store
70 .stiftie store
stop

cond
*.stage 55 =
*.trefeye *.myeye %=
start
*.trefvel *.vel sub .aim store
55 .sharenrg *.multi mult store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.venom 100 <
start
*.nrg 6 div .strvenom store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.poison 50 <
start
*.nrg 5 div .mkpoison store
.eyef .ploc store
stop

cond
*.stage 55 =
*.nrg 5000 >
*.eyef 0 =
*.poison 0 >
*.venom 0 >
start
*.nrg 3 div .shootval store
stop

cond
*.stage 55 =
*.kills 5 >
start
.stage .tieloc store
0 .tieval store
stop

cond
*.stage 55 =
*.kills 5 >
start
.fixpos .tieloc store
0 .tieval store
0 .stage store
stop

'Dietary Genes
'***************

cond
*.nrg 3000 >
*.body 1000 <
*.pleas 0 >
start
*.pleas 2 div .strbody store
stop

'Feed when hungry from body

cond
*.nrg 500 <
*.body 0 >
*.numties 0 =
start
*.body *.pain add 2 div .fdbody store
stop

'Reproductive Genes
'****************

cond
*.fixed 0 !=
*.nrg 6000 >
*43 5 <
start
60 .repro store
*43 1 add 43 store
stop

cond
*.numties 2 <
*.trefeye 0 =
*.nrg 4000 >
*43 6 <
start
50 .repro store
*43 1 add 43 store
stop

cond
*.refeye *.myeye !=
*.nrg 2000 >
start
50 .repro store
stop

'MultiMode Only

cond
*.multimode 0 >
*.nrg 4000 >
*.trefeye *.myeye = or
*.refeye *.myeye =
start
*.multimode *.tienum store
*.tieang .setaim store
7 .out4 store
stop

'Reset Values
'**************

cond
*.stage 3 =
start
0 .fixpos store
stop

cond
*.numties 0 =
*.fixed 0 !=
*.out4 7 !=
start
55 .stage store
0 .fixpos store
stop

cond
*.numties 0 =
*.vel 0 !=
start
0 .fixpos store
0 .tiecounter store
stop

cond
*.fixed 0 != and
*.out4 7 != or
*.out5 7 != or
*.trefeye *.myeye %=
*.vel 0 !=
start
0 .fixpos store
0 .stage store
stop

cond
*.numties 0 >
*.readcounter *.multimode >
start
0 .multimode store
stop

cond
*.numties 0 >
*.readcounter *.multimode =
*.trefeye 0 =
start
0 .multimode store
stop

cond
*.readcounter *.multimode =
start
213 .tieloc store
0 .tieval store
stop

cond
*.readcounter *.multimode =
start
151 .tieloc store
*.multimode .tieval store
stop
end

Many fixes to stages and gene triggers, added better way to become certain stages, was impossible to swarm without sticking and trying to move, fixed position sticking issues. Seems to have developed some deficiency in its attack genes, can't figure out why it won't attack agressors 100% of the time, other multibots it kills, loaners it has a hard time deciding if its an enemy or not. Most likely its in how its location memory is handled, will look into it more later. Most importantly I fixed the multi system to return 1 when ties harden, every 20 cycles. Are you alowed to load valeus into a var and use it for shoot, such as -1 with var 40? This could be its major malfunction lol. Anyways, it reads and feeds better now, doesn't hunt so well since I've messed with it, but it will construct elaborate structures between colonies to share energy between them. Sorry its a long post, but in order to make behavior it requires a lot of genes and switches to make the bot act smart, I like it tho, reminds me of boolean algebra, only theres 1000s of gates to choose from; I could see the ultimate thinking bot having 320000+ genes for a simple decision that a 3rd grader could answer, such as are you my enemy, can I trick you, and what do I need?

27
Interesting behaviour bots / Slim Evo: Colonies
« on: April 27, 2008, 05:14:24 PM »
I have reviewed all of the Slim Evos and have found the most succesfull one, Slim Evo 2. Its basic building blocks are simple enough to work, but complicated for me to remember how each gene enteracted with the other. (btw I was rs you coop) I have finely tuned its combat systems and added aditional communication commands in the the sysvars. I have tested it many times with and without mutations. The only way it has a success, is if the starting veggie count is greater than 30, otherwise competition with other species can lead to famine. The bot is extremely territorial, now uses veggies for communication and was a new mode for breaking up groups for combat.

I would like this bot to be considered for multi-bot forum, it requries a veggie beofre it reproduces, and goes into a hiding mode similair to the hiding spiders.



'Individuality

def botname .out1
def bot1 970
def bot2 971
def bot3 972
def bot4 973
def bot5 974
def bot6 975
def bot7 976
def bot8 977
def bot9 978
def bot10 979

'Historical Info

def bxpos 82
def bypos 83
def fxpos 80
def fypos 81

'Tie Info

def readcounter 150
def multimode 151
def tiereader 60
def multeyef 86
def tsexrpro 88
def multrefage 84
def multrefvel 87
def readreset 149
def tiecounter 74

'Attack/Defence

def venomsel 76
def stage 75
def shotselect 40

'Eye Info

def newbot 50
def memcounter 73
def preveye1 51
def preveye2 52
def preveye3 53
def preveye4 54
def preveye5 55
def preveye6 56
def preveye7 57
def preveye8 58
def preveye9 59
def eye1id 61
def eye2id 62
def eye3id 63
def eye4id 64
def eye5id 65
def eye6id 66
def eye7id 67
def eye8id 68
def eye9id 69


'Welwordion's 360 Eyes/Initialization and Indientity
'**********************

cond
*.robage 0 =
start
*.tiepres .deltie store
9999 rnd .botname store
*.dnalen .out2 store
420 .eye1dir store
315 .eye2dir store
210 .eye3dir store
105 .eye4dir store
-105 .eye6dir store
-210 .eye7dir store
-315 .eye8dir store
-420 .eye9dir store
105 .eye1width store
105 .eye2width store
105 .eye3width store
105 .eye4width store
105 .eye5width store
105 .eye6width store
105 .eye7width store
105 .eye8width store
105 .eye9width store
stop
stop

cond
*.robage 21 =
start
*.tiepres .deltie store
stop

'eye1 specific

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 ~=
*.eye2id 1 = and
*.eye1 *.preveye9 5 ~=
*.eye9id 1 = and or
start
1 .eye1id store
stop

cond
*.eye1 *.preveye1 5 !~=
*.eye1 *.preveye2 5 !~=
*.eye1 *.preveye9 !~=
start
0 .eye1id store
stop

cond
*.eye1 0 =
start
0 .eye1id store
stop

'eye2 specific

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 ~=
*.eye3id 1 = and
*.eye2 *.preveye2 5 ~=
*.eye1id 1 = and or
start
1 .eye2id store
stop

cond
*.eye2 *.preveye2 5 !~=
*.eye2 *.preveye3 5 !~=
*.eye2 *.preveye1 5 !~=
start
0 .eye2id store
stop

cond
*.eye2 0 =
start
0 .eye2id store
stop

'eye3 specific

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 ~=
*.eye4id 1 = and
*.eye3 *.preveye2 5 ~=
*.eye2id 1 = and or
start
1 .eye3id store
stop

cond
*.eye3 *.preveye3 5 !~=
*.eye3 *.preveye4 5 !~=
*.eye3 *.preveye2 5 !~=
start
0 .eye3id store
stop

cond
*.eye3 0 =
start
0 .eye3id store
stop

'eye4 specific

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye5 5 ~=
*.eye5id 1 = and
*.eye4 *.preveye3 5 ~=
*.eye3id 1 = and or
start
1 .eye4id store
stop

cond
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye4 5 !~=
*.eye4 *.preveye3 5 !~=
start
0 .eye4id store
stop

cond
*.eye4 0 =
start
0 .eye4id store
stop

'eye5 specific

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 ~=
*.eye6id 1 = and
*.eye5 *.preveye4 5 ~=
*.eye4id 1 = and or
start
1 .eye5id store
stop

cond
*.eye5 *.preveye5 5 !~=
*.eye5 *.preveye6 5 !~=
*.eye5 *.preveye4 5 !~=
start
0 .eye5id store
stop

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

'eye6 specific

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 ~=
*.eye7id 1 = and
*.eye6 *.preveye5 5 ~=
*.eye4id 1 = and or
start
1 .eye6id store
stop

cond
*.eye6 *.preveye6 5 !~=
*.eye6 *.preveye7 5 !~=
*.eye6 *.preveye5 5 !~=
start
0 .eye6id store
stop

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

'eye7 specific

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye9 5 ~=
*.eye8id 1 = and
*.eye7 *56 5 ~=
*.eye6id 1 = and or
start
1 .eye7id store
stop

cond
*.eye7 *.preveye7 5 !~=
*.eye7 *.preveye8 5 !~=
*.eye7 *.preveye6 5 !~=
start
0 .eye7id store
stop

cond
*.eye7 0 =
start
0 .eye7id store
stop

'eye8 specific

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 ~=
*.eye9id 1 = and
*.eye8 *.preveye7 5 ~=
*.eye7id 1 = and or
start
1 .eye8id store
stop

cond
*.eye8 *.preveye8 5 !~=
*.eye8 *.preveye9 5 !~=
*.eye8 *.preveye7 5 !~=
start
0 .eye8id store
stop

cond
*.eye8 0 =
start
0 .eye8id store
stop

'eye9 specific

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 ~=
*.eye1id 1 = and
*.eye9 *58 5 ~=
*.eye8id 1 = and or
start
1 .eye9id store
stop

cond
*.eye9 *.preveye9 5 !~=
*.eye9 *.preveye1 5 !~=
*.eye9 *.preveye8 5 !~=
start
0 .eye9id store
stop

cond
*.eye9 0 =
start
0 .eye9id store
stop

'the focuseye is set

cond
*.robage 20 mod 0 !=
*140 0 =
start
5 .focuseye *.eye1 sgn abs mult *.eye1id 1 sub abs mult store
6 .focuseye *.eye2 sgn abs mult *.eye2id 1 sub abs mult store
7 .focuseye *.eye3 sgn abs mult *.eye3id 1 sub abs mult store
8 .focuseye *.eye4 sgn abs mult *.eye4id 1 sub abs mult store
9 .focuseye *.eye5 sgn abs mult *.eye5id 1 sub abs mult store
1 .focuseye *.eye6 sgn abs mult *.eye6id 1 sub abs mult store
2 .focuseye *.eye7 sgn abs mult *.eye7id 1 sub abs mult store
3 .focuseye *.eye8 sgn abs mult *.eye8id 1 sub abs mult store
4 .focuseye *.eye9 sgn abs mult *.eye9id 1 sub abs mult store
stop

'the visual memory is stored

cond
start
*.eye1 .preveye1 store
*.eye2 .preveye2 store
*.eye3 .preveye3 store
*.eye4 .preveye4 store
*.eye5 .preveye5 store
*.eye6 .preveye6 store
*.eye7 .preveye7 store
*.eye8 .preveye8 store
*.eye9 .preveye9 store
stop

'Individuality Genes
'*******************

'check species and bot name

cond
*.eyef 0 >
*.in2 *.out2 =
*.myeye *.refeye %=
*.in4 *.bot1 != and
*.in4 *.bot2 != and
*.in4 *.bot3 != and
*.in4 *.bot4 != and
*.in4 *.bot5 != and
*.in4 *.bot6 != and
*.in4 *.bot7 != and
*.in4 *.bot8 != and
*.in4 *.bot9 != and
*.in4 *.bot10 !=
start
1 .newbot store
*.memcounter 1 add .memcounter store
stop

'select a memory location for in4

cond
*.newbot 1 =
*.memcounter 1 =
*.bot1 0 =
start
*.in1 .bot1 store
cond
*.bot1 0 !=
*.bot2 0 =
start
*.in1 .bot2 store
cond
*.bot2 0 !=
*.bot3 0 =
start
*.in1 .bot3 store
cond
*.bot3 0 !=
*.bot4 0 =
start
*.in1 .bot4 store
cond
*.bot4 0 !=
*.bot5 0 =
start
*.in1 .bot5 store
cond
*.bot5 0 !=
*.bot6 0 =
start
*.in1 .bot6 store
cond
*.bot6 0 !=
*.bot7 0 =
start
*.in1 .bot7 store
cond
*.bot7 0 !=
*.bot8 0 =
start
*.in1 .bot8 store
cond
*.bot8 0 !=
*.bot9 0 =
start
*.in1 .bot9 store
cond
*.bot9 0 !=
*.bot10 0 =
start
*.in1 .bot10 store
stop

'Turning Genes
'****************

'Turn to a veg

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye 0 =
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .setaim store
stop

'turn towards an enemy

cond
*.focuseye 1 =
*.refeye *.myeye !=
*.refeye 0 !=
start
420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
3 .stage store
stop

cond
*.focuseye 2 =
*.refeye *.myeye !=
*.refeye 0 !=
start
315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 3 =
*.refeye *.myeye !=
*.refeye 0 !=
start
210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 4 =
*.refeye *.myeye !=
*.refeye 0 !=
start
105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 6 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-420 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 7 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-315 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 8 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-210 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.focuseye 9 =
*.refeye *.myeye !=
*.refeye 0 !=
start
-105 *.refxpos *.refypos angle sub .aimdx store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

'Turn to conspec

cond
*.numties 2 <
*.robage 21 >
*.eyef 0 >
*.refeye *.myeye %=
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in4 1 =
*.refxpos *.refypos angle *.tieang !=
*.tin1 0 !=
start
*.refxpos *.refypos angle .setaim store
0 *.velup sub *.eyef sub *.fixpos mult ~ .up store
0 .stage store
stop

'Movement Genes
'****************

'Move Forward

cond
*.fixed 0 =
*.out4 1 !=
*.eyef 0 >
*.eyef 80 <
*.refeye *.myeye !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle -1 mult *.aim add
1256 add 1256 mod
dup dup dup dup dup 314 ceil swapint
314 floor 942 ceil 314 sub sub swapint
942 floor 942 sub add 2 div *.veldx sub .dx store
628 ceil -1 mult 314 add swapint
628 floor 628 sub add 2 div *.velup sub .up store
stop

cond
*.eyef 0 =
*.fixed 0 =
*.vel *.maxvel !=
start
*.maxvel *.vel sub .up store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye1 20 <
*.eye2 20 <
*.eye3 20 <
*.eye4 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .sx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.fixed 0 =
*.refaim -1 mult *.aim =
*.refvel -1 mult *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eye6 20 <
*.eye7 20 <
*.eye8 20 <
*.eye9 20 <
*.mass 1 >
*.refeye 0 !=
start
*.maxvel *.mass div *.vel sub .dx store
*.refxpos *.refypos angle *.setaim store
stop

cond
*.numties 0 >
*.trefvel *.vel = or
*.trefvel *.vel >
start
*.trefaim .setaim store
*.maxvel *.vel sub .up store
stop

'Attack/Defensive Genes
'*****************

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.eyef 0 =
*.refeye *.myeye = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
942 *.shang sub .setaim store
0 .shflav store
100 .mkshell store
26 .strvenom
.shoot .ploc store
stop

cond
*.fixed 0 =
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 70 >
*.refeye 0 !=
*.refxpos *.refypos angle *.tieang !=
start
*.nrg 4 *.pain add div .shootval store
-1 .shoot store
cond

cond
*.refaim *.aim !=
*.refvel *.vel = or
*.refeye *.myeye != and
*.out1 *.in1 !=
*.eyef 40 >
*.eyef 90 <
*.venom 70 <
*.refeye 0 !=
*.refxpos *.refypos angle *.tieang !=
start
*.refxpos *.refypos angle .aimshot store
*.setaim .shootval store
*.aim .shoot store
cond

'Create Venom and Poison

cond
*.nrg 6000 > and
*.venom 20 <
*.poison 20 <
start
*.nrg *.venom sub 7 div .strvenom store
*.nrg *.poison sub 6 div .mkpoison store
stop

cond
*.eyef 40 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.venom 0 >
*.refeye 0 !=
start
1 .venomsel store
cond
*.venomsel 1 =
start
728 .venloc store
*.myeye .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 2 =
start
.shoot .venloc store
-2 .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 3 =
start
.setaim .venloc store
*.xpos *.ypos angle .venval store
-3 .shoot store
*.venomsel 1 add .venomsel store
cond
*.venomsel 4 =
start
0 .venomsel store
stop

cond
*.eyef 0 =
*.pain 0 <
start
0 .shotselect store
stop

cond
*.nrg 3000 >
*.shell 20 <
start
*.nrg 5 div .mkshell store
stop

'Used for Info Shots under certain conditions

cond
*.fixed 0 =
*.eyef 40 >
*.refeye *.myeye !=
*.in1 *.out1 !=
*.refkills *.kills >
*.refeye 0 !=
start
.fixpos .shootval store
*.refxpos .fxpos store
*.refypos .fypos store
stop

'Shoot at the enemy using the 40 selection

cond
*.eyef 60 >
*.shotselect 0 !=
start
*.refxpos *.refypos angle *.eyef mod -1 mult .aimdx store
*.focuseye .focuseye store
2 140 store
*40 .shoot store
stop

'Disguise if mutated

cond
*.in2 *.dnalen !=
*.in2 *.out2 !=
*.refeye *.meye %=
*.refeye 0 !=
start
*.in2 .out2 store
stop

'Memory Loactions 80-81
'*******************

'Return to a trapped enemy if in pain

cond
*.pain 100 >
*.eyef 0 =
*.numties 0 =
*.robage 21 >
*.fixpos 0 =
start
*.fxpos *.fypos angle .setaim store
1 90 store
stop

cond
*.eyef 0 >
*.eyef 50 <
*90 1 =
*.xpos *.fxpos %=
*.ypos *.fypos %=
start
*.nrg 3 div .shootval store
-1 .shotselect store
stop


'Tie Genes
'****************

'Tie to a veg in Multi Bot Mode

cond
*.eyef 50 >
*.refeye 0 =
*.multimode 0 >
*.numties 1 =
start
1 *.tiecounter add .tiecounter store
*.tiecounter .tie store
stop

cond
*.stage 6 !=
*.trefeye 0 =
*.multimode 0 >
*.tielen 30 !=
*.in4 5 !=
start
210 *.tienum mult .fixang store
30 .fixlen store
70 .stiftie store
stop

'Tie to conspec

cond
*.in4 3 =
*.numties 2 <
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.myeye *.refeye %=
*.eyef 50 >
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
stop

cond
*.eyef 40 >
*.refeye 0 =
*.numties 3 <
*.refxpos *.refypos angle *.tieang !=
start
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
0 .shotselect store
75 *.aim add .setaim store
stop

'Read Ties

cond
start
*.robage mod *.numties *.tiepres add .readtie store
stop

'Tell Veg that You're taken

cond
*.trefeye 0 =
*.trefnrg 10 >
start
.tout1 .tieloc store
5 .tieval store
stop

'set the paramaters for the veggie, ie distance and angle

cond
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.multimode 0 =
start
*.readcounter .tienum store
60 .fixlen store
90 *.tienum add .fixang store
60 .stifftie store
stop

cond
*.numties 0 >
*.numties 0 > and
*.trefeye 0 = and
*.tielen 60 != or
*.tieang 90 *.tienum add !=
*.out4 1
start
*.readcounter .tienum store
180 *.tienum mult .fixang store
60 .fixlen store
60 .stifftie store
200 .tmemloc store
*.vel .tmemval store
stop

'Feed from Veg

cond
*.trefeye 0 =
*.numties 0 >
start
*.tiepres .readtie *.numties sgn mult store
.tiepres .memloc *.robage -1 mult 1 add sgn mult store
.numties .tmemloc *.robage -1 mult 1 add sgn mult store
55 10 rnd add .tie *.refeye sgn -1 mult 1 add sgn mult *.eye5 45 sub

sgn mult *.memval sgn -1 mult 1 add sgn mult *.robage sgn mult store
628 .fixang *.numties sgn mult store
200 .fixlen *.numties sgn mult store
*.tiepres .tienum *.numties sgn mult store
*.tiepres .readtie *.numties sgn mult store
.fixpos .tieloc *.numties sgn mult *.treffixed mult store
0 .tieval *.numties sgn mult *.treffixed mult store
80 .sharenrg *.multi mult store
-1 .tieloc store
-1000 .tieval store
100 .sharewaste *.multi mult store
stop

cond
*.nrg *.trefnrg <
*.numties 0 >
*.body 800 <
*.nrg 2100 <
*.trefeye *.myeye %=
start
50 .sharenrg *.multi mult store
stop

cond
*.multimode 1 =
*.waste 0 >
*.numties 0 >
*.multi 0 >
*.trefeye *.myeye %=
start
50 .sharewaste *.multi mult store
stop

'Delete Ties to enemies

cond
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres *.tienum store
*.trefaim *.aim sub .setaim store
*.tiepres .deltie store
0 .stage store
stop

cond
*.tiepres *.readcounter !=
*.numties 0 >
*.trefeye *.myeye !=
*.trefeye 0 !=
start
*.tiepres .tienum store
400 .tieval store
.tieval .tieloc store
50 .sharewaste *.multi mult store
stop

cond
*.numties 2 >
*.fixed 0 !=
*.tin1 0 !=
start
0 .fixpos store
6 .stage store
stop

cond
*43 2 >
*.nrg 10000 >
*.body 900 >
*.numties 0 >
start
*.tiepres .deltie store
0 .fixpos store
0 .multimode store
6 .tout1 store
stop

'Multibot Tie mode
'*****************************

cond
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 6 !=
start
*.readcounter .multimode store
stop

cond
*.multimode 0 >
*.multeyef *.eyef >
*.stage 6 !=
start
*.multrefvel *.vel sub .dn store
stop

'Turn both bots to face 90 degrees out.

cond
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 6 !=
start
210 .fixang store
70 .fixlen store
70 .stiftie store
stop


'Command Interpretation
'****************

cond
*.in4 7 =
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*43 3 <
start
50 .sexrepro store
*.refxpos *.refypos angle .aimshot store
-8 .shoot store
*.refvel *.vel sub .dn store
1 .fixpos store
0 .multimode store
7 .out5 store
*43 1 add 43 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.in5 7 =
*.out4 7 =
*43 3 <
start
0 .out4 store
*43 1 add 43 store
stop

cond
*.stage *.tout1 !=
start
*.stage .tout1 store
stop

cond
*.tin1 *.stage !=
start
*.tin1 .stage store
0 .fixpos store
*.numties .tout2 store
stop

cond
*.robage *.trefage >
*.numties *.tin2  >
*.tin2 2 <
*.kills 3 >
start
55 .tout1 store
stop

cond
*.in2 *.out2 = or
*.in1 *.bot1 = or
*.in1 *.bot2 = or
*.in1 *.bot3 = or
*.in1 *.bot4 = or
*.in1 *.bot5 = or
*.in1 *.bot6 = or
*.in1 *.bot7 = or
*.in1 *.bot8 = or
*.in1 *.bot9 = or
*.in1 *.bot10 =
*.in2 *.out2 =
*.out5 7 =
*.in4 7 =
start
0 .out5 store
0 .out4 store
stop

'Stage 2: Swarm Mode
'***************

'Swarm in a Circle:

cond
*.multi 0 >
*466 0 >
*.eye5 30 >
*.eye5 80 <
*.refeye *.myeye =
*.in4 1 =
*.numties 2 >
*.nrg 3000 >
*.stage 6 =
start
*.bxpos .bypos angle .setaim store
*.refvel *.vel sub .up store
1 .out4 store
stop

cond
*.refeye *.myeye %=
*.in1 *.out1 %=
*.in4 1 =
*.stage 6 =
start
*.tiepres 1 add .tie store
*.tiepres .readtie store
stop

cond
*.trefeye *.myeye %=
*.robage *.trefage >
*.stage 6 =
start
30 *.aim add .setaim store
*.maxvel *.vel sub .dn store
stop

cond
*.stage 6 =
*.trefeye *.myeye %=
*.robage *.trefage <
start
20 .fixlen
0 140 store
260 .fixang store
40 .stifftie store
*.trefvel *.vel sub .up store
*.trefaim .aim store
stop

cond
*.out4 1 =
*.poison 150 <
*.nrg 2000 <
start
*.nrg 9 div .mkpoison store
*.eyef .ploc store
stop

cond
*.multeyef *.eyef >
start
*.multvel *.vel sub .dn store
stop

cond
*.multeyef *.eyef =
*.trefaim *.aim %=
*.trefeye *.myeye %=
start
*.refvel *.vel sub .aim store
-1 .shotselect store
stop


'Stage 1B: The Sitting Predator
'*************************

'Become fixed

cond
*.multimode 0 =
*.numties 1 >
*.trefeye 0 =
*.fixpos 0 =
start
3 .out4 store
1 .fixpos store
70 .stiftie store
stop

cond
*.trefeye *.myeye %=
*.fixed 1 =
*.numties 2 = or
*.mutlimode 0 >
start
6 .out4 store
0 .fixpos store
50 .stiftie store
stop

'Become the Swarm

cond
*.numties 2 >
*.trefeye 0 = or
*.stage 6 !=
*.fixed 0 =
*.tin1 0 !=
start
6 .stage store
stop

'Stage 5 Genes: The Waiting trap
'**********************

cond
*.stage 5 =
*.robage 26 =
start
9 140 store
stop

cond
*.stage 5 =
*.robage 25 = or
*.nrg 5000 >
start
50 .repro store
*.tiecounter 1 add .tiecounter store
*.tiecounter .tie store
stop

'Wait for the tie to harden and then set the adolecesants memory

cond
*.stage 5 =
*.multi 0 >
start
*.stage .tieloc store
55 .tieval store
70 .stifftie store
stop

cond
*.trefeye *.myeye %=
*.stage 5 =
*.tielen 40 >
start
40 .fixlen store
70 .stifftie store
stop

cond
*.stage 5 =
start
.setaim .tieloc store
*.aim .tieval store
stop

cond
*.stage 5 =
*.maxvel *.numties div *.vel !=
start
*.maxvel *.numties div *.vel .aim store
stop

cond
*.stage 5 =
*.numties 3 =
*.xpos *.bxpos %=
*.ypos .bypos %=
*.robage 200 >
*.kills 2 >
start
1 .fixpos store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye 0 =
*.kills 3 >
start
.fixpos .tieloc store
1 .tieval store
stop

cond
*.stage 5 =
*.numties 3 =
*.fixed 1 =
*.trefeye *.myeye %=
start
55 .sharenrg *.multi mult store
stop

cond
*.stage 5 !=
*140 9 =
start
0 140 store
stop

'Stage 3-War

cond
*.stage 3 =
*.tiepres 0 >
start
*.tiepres .deltie store
stop

cond
*.eyef 0 >
*.refeye *.myeye !=
start
*.maxvel *.vel sub .up store
*.refxpos *.refypos angle .setaim store
stop

cond
*.stage 3 =
*.eyef 40 >
*.refeye *.myeye !=
start
30 *.pain sub .shootval store
-1 .shoot store
stop

cond
*.tin1 3 =
start
3 .stage store
stop

'Stage 5-5 Instructions:
'********************

cond
*140 9 !=
*.numties 0 >
*.trefeye *.myeye =
*.multimode 0 =
*.stage 55 =
start
*.readcounter .multimode store
stop

cond
*140 9 !=
*.multimode 0 >
*.multeyef *.eyef >
*.stage 55 =
start
*.multrefvel *.vel sub .dn store
stop

'Turn both bots to face 90 degrees out.

cond
*140 9 !=
*.multimode 0 >
*.trefeye *.myeye %=
*.trefeye 0 !=
*.tielen 70 !=
*.tieang 210 !=
*.stage 55 =
start
240 .fixang store
70 .fixlen store
70 .stiftie store
stop

cond
*.stage 55 =
*.trefeye *.myeye %=
start
*.trefvel *.vel sub .aim store
55 .sharenrg *.multi mult store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.venom 100 <
start
*.nrg 6 div .strvenom store
stop

cond
*.stage 55 =
*.nrg 4000 >
*.eyef 0 =
*.poison 50 <
start
*.nrg 5 div .mkpoison store
.eyef .ploc store
stop

cond
*.stage 55 =
*.nrg 5000 >
*.eyef 0 =
*.poison 0 >
*.venom 0 >
start
*.nrg 3 div .shootval store
stop

cond
*.stage 55 =
*.kills 5 >
start
.stage .tieloc store
0 .tieval store
stop

cond
*.stage 55 =
*.kills 5 >
start
.fixpos .tieloc store
0 .tieval store
0 .stage store
stop

'Dietary Genes
'***************

cond
*.nrg 3000 >
*.body 1000 <
*.pleas 0 >
start
*.pleas 2 div .strbody store
stop

'Feed when hungry from body

cond
*.nrg 500 <
*.body 0 >
*.numties 0 =
start
*.body *.pain add 2 div .fdbody store
stop

'Reproductive Genes
'****************

cond
*.fixed 0 !=
*.nrg 6000 >
*43 5 <
start
60 .repro store
*43 1 add 43 store
stop

cond
*.numties 2 <
*.trefeye 0 =
*.nrg 4000 >
*43 6 <
start
50 .repro store
*43 1 add 43 store
stop

'MultiMode Only

cond
*.multimode 0 >
*.nrg 4000 >
*.trefeye *.myeye = or
*.refeye *.myeye =
start
*.multimode *.tienum store
*.tieang .setaim store
7 .out4 store
stop

'Reset Values
'**************

cond
*.numties 0 =
*.fixed 0 !=
*.out4 7 !=
start
55 .stage store
0 .fixpos store
stop

cond
*.numties 0 =
start
0 .fixpos store
0 .tiecounter store
stop

cond
*.fixed 0 != and
*.out4 7 != or
*.out5 7 != or
*.trefeye *.myeye %=
start
0 .fixpos store
0 .stage store
stop

cond
*.numties 0 >
*.readcounter *.multimode >
start
0 .multimode store
stop

cond
*.numties 0 >
*.readcounter *.multimode =
*.trefeye 0 =
start
0 .multimode store
stop

cond
*.readcounter *.multimode =
start
213 .tieloc store
0 .tieval store
stop

cond
*.readcounter *.multimode =
start
151 .tieloc store
*.multimode .tieval store
stop
end

Enjoy. The next addition will be a universal translator for ins and outs and expanded memory features, expect a very large dna length for the next bot, but I have some time to review the Slim Evo 2 compared to the Slim Evo 3 to see why it was better, possibly the switches for genes are more efficient in 2. Several genes will always run, and it takes a lot of energy to run a single Slim 2, about 3 veg's total, that's why the reproductive genes are spread out in each stage, so while it cannot find more food, it can create scouts for food. My goal is to create a bot that uses two bots for eyes, and two bots for shots, with two or four in the back with all the veggies, will most likely utilized birthplace recall to keep familes near to protet each other.

Pages: 1 [2]