Difference between revisions of "BotTxt"
(The Bee Genes) |
(→Fruit Flies v0.21) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 641: | Line 641: | ||
− | 'The Bee Gene: | + | 'The Bee Gene: UPDATE! Now Capable of defeating the Devincio_Eversor in a equal unmutating simulation. Still working on Virus gene. |
'=================== | '=================== | ||
+ | <pre> | ||
'These genes attempt to create a situation similair to a hive. It takes a while for them to get | 'These genes attempt to create a situation similair to a hive. It takes a while for them to get | ||
'collected and decide order of dominance, but that is because it is halfway unfinished. The | 'collected and decide order of dominance, but that is because it is halfway unfinished. The | ||
Line 650: | Line 651: | ||
'Feel free to make any changes to these offline. I am open to ideas for handling the various | 'Feel free to make any changes to these offline. I am open to ideas for handling the various | ||
'other ranks and their genes. All of the search genes are not original, that was not the goal. | 'other ranks and their genes. All of the search genes are not original, that was not the goal. | ||
− | 'phase 1 initialization | + | 'phase 1 initialization. |
cond | cond | ||
Line 659: | Line 660: | ||
*51 .tie store | *51 .tie store | ||
40 40 store | 40 40 store | ||
+ | 1 41 store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.robage 1 = | ||
+ | start | ||
+ | 0 41 store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.numties 0 = | ||
+ | *.body 1000 > | ||
+ | *.nrg 10000 > | ||
+ | start | ||
+ | 25 .repro store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.tiepres *.feedtie = | ||
+ | *.trefevenom *.myvenom != | ||
+ | start | ||
+ | -1000 .tieval store | ||
+ | *.tieval 1000 div .tieloc store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.robage 300 < | ||
+ | *.nrg 1200 > | ||
+ | *.numties 0 != | ||
+ | *.trefeye 82 != | ||
+ | *.trefeye 0 != | ||
+ | *.vtimer 0 = | ||
+ | *41 0 = | ||
+ | start | ||
+ | 0 .fixang store | ||
+ | *.thisgene .mkvirus store | ||
+ | 2 .vloc store | ||
+ | *.tiepres .deltie store | ||
+ | 1 41 store | ||
+ | cond | ||
+ | *.nrg 12000 > | ||
+ | *.numties 0 != | ||
+ | start | ||
+ | 40 .repro store | ||
+ | 31 .aimright store | ||
+ | 21 .out2 store | ||
+ | *51 .tienum store | ||
+ | -1000 .tieval store | ||
+ | 1 .tieloc store | ||
+ | stop | ||
+ | |||
+ | 'update the ins and outs | ||
+ | |||
+ | cond | ||
+ | *.refeye *.myeye = | ||
+ | *.in1 *.out1 != | ||
+ | start | ||
+ | *.out1 .in1 store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.refeye *.myeye = | ||
+ | *.in2 *.out2 != | ||
+ | start | ||
+ | *.out2 .in2 store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.numties 0 > | ||
+ | start | ||
+ | *51 .readtie store | ||
stop | stop | ||
Line 671: | Line 743: | ||
21 .out2 store | 21 .out2 store | ||
stop | stop | ||
+ | |||
+ | *.refxpos *.refypos angle .aim store | ||
cond | cond | ||
Line 689: | Line 763: | ||
start | start | ||
40 *.vel sub .up store | 40 *.vel sub .up store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.refeye *.myeye = | ||
+ | *.eye5 50 > | ||
+ | start | ||
+ | *.refaim *.aim sub .setaim store | ||
stop | stop | ||
Line 699: | Line 780: | ||
mult -100 | mult -100 | ||
stop | stop | ||
+ | |||
' Gene 8 wide search 2 | ' Gene 8 wide search 2 | ||
Line 845: | Line 927: | ||
*.tieangle .aim store | *.tieangle .aim store | ||
*51 .deltie store | *51 .deltie store | ||
− | |||
stop | stop | ||
Line 931: | Line 1,012: | ||
-1000 .tieval store | -1000 .tieval store | ||
-1 .tieloc store | -1 .tieloc store | ||
+ | *51 .readtie store | ||
+ | *.waste *.trefwaste sub .sharewaste .multi store | ||
stop | stop | ||
Line 950: | Line 1,033: | ||
start | start | ||
*51 .tienum store | *51 .tienum store | ||
− | 10 .sharewaste store | + | 10 .sharewaste .multi store |
stop | stop | ||
Line 988: | Line 1,071: | ||
cond | cond | ||
*.nrg 12000 < | *.nrg 12000 < | ||
− | *.body | + | *.body 200 > |
start | start | ||
50 .fdbody store | 50 .fdbody store | ||
Line 995: | Line 1,078: | ||
cond | cond | ||
*.refeye 0 != | *.refeye 0 != | ||
− | *. | + | *.eye5 60 > |
− | *. | + | *.refeye 82 != |
+ | *.venom 0 > | ||
start | start | ||
50 .vloc store | 50 .vloc store | ||
Line 1,004: | Line 1,088: | ||
cond | cond | ||
− | *.refeye *. | + | *.refeye 82 != |
− | *.eye5 | + | *.venom 100 < |
+ | *.eye5 60 > | ||
start | start | ||
-1 .shoot store | -1 .shoot store | ||
Line 1,013: | Line 1,098: | ||
cond | cond | ||
− | *. | + | *.robage 10 = |
− | *. | + | start |
− | *. | + | *.nrg 50 div .strvenom store |
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.robage 200 = | ||
+ | start | ||
+ | *.nrg 40 div .strpoison store | ||
+ | *.eye5 .ploc store | ||
+ | *.nrg 75 div .strvenom store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.robage 500 = | ||
+ | start | ||
+ | *.nrg 60 div .strpoison store | ||
+ | *.shoot .ploc store | ||
+ | *.nrg 85 div strvenom store | ||
+ | stop | ||
+ | |||
+ | cond | ||
+ | *.robage 900 = | ||
start | start | ||
− | + | *.nrg 90 div .strpoison store | |
+ | *.refeye .ploc store | ||
stop | stop | ||
Line 1,025: | Line 1,131: | ||
*.slime 200 < | *.slime 200 < | ||
start | start | ||
− | + | 30 .mkslime store | |
− | 50 .shareslime store | + | 50 .shareslime .multi store |
stop | stop | ||
Line 1,034: | Line 1,140: | ||
*.slime *.trefslime > | *.slime *.trefslime > | ||
start | start | ||
− | 50 .shareslime store | + | 50 .shareslime .multi store |
stop | stop | ||
Line 1,051: | Line 1,157: | ||
*.numties 0 > | *.numties 0 > | ||
*.body 1000 < | *.body 1000 < | ||
+ | *.trefeye *.myeye != | ||
start | start | ||
*51 .tienum store | *51 .tienum store | ||
Line 1,056: | Line 1,163: | ||
-1 .tieloc store | -1 .tieloc store | ||
*51 .readtie store | *51 .readtie store | ||
− | *.waste .sharewaste store | + | *.waste .sharewaste .multi store |
stop | stop | ||
+ | |||
+ | cond | ||
+ | *498 0 > | ||
+ | *.waste 100 or | ||
+ | *.trefeye 0 = | ||
+ | cond | ||
+ | 1047 407 store | ||
+ | -4 .tieloc store | ||
+ | stop | ||
cond | cond | ||
Line 1,063: | Line 1,179: | ||
*.waste 800 < | *.waste 800 < | ||
*.body 1000 < | *.body 1000 < | ||
− | *.trefeye | + | *.trefeye 82 != |
start | start | ||
-1000 .tieval store | -1000 .tieval store | ||
Line 1,070: | Line 1,186: | ||
cond | cond | ||
− | *. | + | *.robage 2 = |
start | start | ||
− | 50 .mkslime store | + | *.nrg 50 div .mkslime store |
stop | stop | ||
cond | cond | ||
− | *.refeye | + | *.refeye 82 != |
*.eye5 50 > | *.eye5 50 > | ||
start | start | ||
Line 1,089: | Line 1,205: | ||
stop | stop | ||
end | end | ||
+ | </pre> | ||
+ | ===Antbot=== | ||
+ | This bot is VERY advanced, and may require lots of patience to understand the inner workings. | ||
+ | |||
+ | 'vars | ||
+ | def youngqueen 0 | ||
+ | def queen 1 | ||
+ | def drone 2 | ||
+ | def worker 3 | ||
+ | def scout 4 | ||
+ | |||
+ | 'custom memory locations | ||
+ | def temp 990 | ||
+ | def type 991 | ||
+ | def queenxpos 992 | ||
+ | def queenypos 993 | ||
+ | def dumpdist 994 | ||
+ | def hiveid 995 | ||
+ | |||
+ | 'Initialization | ||
+ | ''What type of ant am I? | ||
+ | ''Set eyes and conspec | ||
+ | cond | ||
+ | *.robage 0 = | ||
+ | start | ||
+ | 1000 rnd .temp store | ||
+ | .youngqueen *.temp sgn -- abs .type mult store | ||
+ | .drone *.temp sgn .type mult store | ||
+ | .scout *.temp 200 sub sgn 0 floor .type mult store | ||
+ | .worker *.temp 300 sub sgn 0 floor .type mult store | ||
+ | |||
+ | 1235 .out1 store | ||
+ | |||
+ | -436 .eye9dir store | ||
+ | -327 .eye8dir store | ||
+ | -218 .eye7dir store | ||
+ | -109 .eye6dir store | ||
+ | 109 .eye4dir store | ||
+ | 218 .eye3dir store | ||
+ | 327 .eye2dir store | ||
+ | 436 .eye1dir store | ||
+ | 109 .eye1width store | ||
+ | 109 .eye2width store | ||
+ | 109 .eye3width store | ||
+ | 109 .eye4width store | ||
+ | 109 .eye5width store | ||
+ | 109 .eye6width store | ||
+ | 109 .eye7width store | ||
+ | 109 .eye8width store | ||
+ | 109 .eye9width store | ||
+ | stop | ||
+ | |||
+ | 'First generation is always a queen | ||
+ | start | ||
+ | *.thisgene .delgene store | ||
+ | .youngqueen .type store | ||
+ | stop | ||
+ | |||
+ | 'OCULUS | ||
+ | 'Update bot | ||
+ | cond | ||
+ | start | ||
+ | *.hiveid .out4 store | ||
+ | *.type .out2 store | ||
+ | *.nrg 3 div *.body sub dup .strbody store - .fdbody store | ||
+ | -4 *.eye1 sgn mult *.eye2 sgn -- abs mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult | ||
+ | *.eye7 sgn -- abs mult *.eye8 sgn -- abs mult *.eye9 sgn -- abs mult 4 *.eye9 sgn mult *.eye2 sgn -- abs mult *.eye3 sgn -- abs mult | ||
+ | *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult *.eye8 sgn -- abs mult add -3 *.eye2 sgn | ||
+ | mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult *.eye8 sgn -- | ||
+ | abs mult add 3 *.eye8 sgn mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn | ||
+ | -- abs mult add -2 *.eye3 sgn mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult add 2 | ||
+ | *.eye7 sgn mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult add -1 *.eye4 sgn mult *.eye5 sgn -- abs mult | ||
+ | *.eye6 sgn -- abs mult add 1 *.eye6 sgn mult *.eye5 sgn -- abs mult add 0 *.eye5 sgn mult add .focuseye store | ||
+ | |||
+ | 12 *.type .scout sub sgn abs -- abs 3 mult ++ mult *.vel sub .up store | ||
+ | *.type .queen sub sgn abs -- abs .fixpos store | ||
+ | *.tiepres .tienum store | ||
+ | 500 rnd 500 add .dumpdist *.type .scout sub sgn abs -- abs mult store | ||
+ | stop | ||
+ | |||
+ | 'I am a drone and should turn towards everything | ||
+ | cond | ||
+ | *.eyef 0 != | ||
+ | *.type .drone = | ||
+ | start | ||
+ | *.refxpos *.refypos angle .setaim store | ||
+ | stop | ||
+ | |||
+ | 'I'm a worker/young queen, no point turning towards conspecs | ||
+ | cond | ||
+ | *.eyef 0 != | ||
+ | *.type .worker = | ||
+ | *.type .youngqueen = or | ||
+ | *.out1 *.in1 != | ||
+ | start | ||
+ | *.refxpos *.refypos angle .setaim store | ||
+ | stop | ||
+ | |||
+ | 'I am a young queen and am big and fat, so I mature | ||
+ | cond | ||
+ | *.type .youngqueen = | ||
+ | *.body 10000 > | ||
+ | start | ||
+ | .fixpos inc | ||
+ | .queen .type store | ||
+ | *.xpos .queenxpos store | ||
+ | *.ypos .queenypos store | ||
+ | 32000 rnd .hiveid store | ||
+ | stop | ||
+ | |||
+ | 'I have no hive and you are a queen, I'll join yours | ||
+ | cond | ||
+ | *.queenxpos 0 = | ||
+ | *.queenypos 0 = | ||
+ | *.type .queen != | ||
+ | *.type .youngqueen != | ||
+ | *.in2 .queen = | ||
+ | start | ||
+ | *.refxpos .queenxpos store | ||
+ | *.refypos .queenypos store | ||
+ | *.in4 .hiveid store | ||
+ | stop | ||
+ | |||
+ | 'Mature queens turn so there's enough reproduction space. | ||
+ | cond | ||
+ | *.type .queen = | ||
+ | start | ||
+ | 20 .aimdx store | ||
+ | stop | ||
+ | |||
+ | 'Drones and workers feed the queen | ||
+ | cond | ||
+ | *.in1 *.out1 = | ||
+ | *.in4 *.hiveid = | ||
+ | *.type .drone = | ||
+ | *.type .worker = or | ||
+ | *.in2 .queen = | ||
+ | *.nrg 500 > | ||
+ | start | ||
+ | *.nrg 500 sub 1000 ceil .shootval store | ||
+ | -2 .shoot store | ||
+ | stop | ||
+ | |||
+ | 'The queen is dead, I am a huge drone sitting in her place, I think I'll become the new queen. | ||
+ | cond | ||
+ | *.type .drone = | ||
+ | *.queenxpos *.queenypos dist 15 < | ||
+ | *.in2 .queen != | ||
+ | *.nrg 30000 >= | ||
+ | start | ||
+ | .fixpos inc | ||
+ | .queen .type store | ||
+ | stop | ||
+ | |||
+ | 'Drones harvest food from workers to bring to the queen so workers can keep harvesting | ||
+ | cond | ||
+ | *.hiveid *.in4 = | ||
+ | *.type .drone = | ||
+ | *.in2 .worker = | ||
+ | *.eye5 40 > | ||
+ | *.refnrg 1000 > | ||
+ | start | ||
+ | -1 .shoot store | ||
+ | stop | ||
+ | |||
+ | 'I am a drone near a queen, but have no food, so I'll move away. | ||
+ | cond | ||
+ | *.in1 *.out1 = | ||
+ | *.in2 .queen = | ||
+ | *.type .drone = | ||
+ | *.nrg 500 <= | ||
+ | start | ||
+ | *.maxvel *.velup add .dn store | ||
+ | stop | ||
+ | |||
+ | 'I am a huge Drone/Worker, better go and give some of that food I harvested to the Queen. | ||
+ | cond | ||
+ | *.type .drone = | ||
+ | *.nrg 15000 > and | ||
+ | *.type .worker = | ||
+ | *.body 1000 > and or | ||
+ | start | ||
+ | *.queenxpos *.queenypos angle .setaim store | ||
+ | stop | ||
+ | |||
+ | 'I am a scout and my cargo is near the queen, I'll dump it and go find some more. | ||
+ | ''It's fixed, so it won't run away. | ||
+ | cond | ||
+ | *.type .scout = | ||
+ | *.numties 1 = | ||
+ | *.treffixed 0 != | ||
+ | start | ||
+ | *.tiepres .deltie store | ||
+ | 314 .aimdx store | ||
+ | 20 .up store | ||
+ | stop | ||
+ | |||
+ | 'I am a scout without cargo and see food, let's get it! | ||
+ | cond | ||
+ | *.type .scout = | ||
+ | *.numties 0 = | ||
+ | *.in1 *.out1 != | ||
+ | *.reffixed 0 = | ||
+ | *.nrg 0 > | ||
+ | *.eyef 0 > | ||
+ | start | ||
+ | *.refxpos *.refypos angle .setaim store | ||
+ | stop | ||
+ | |||
+ | 'I am a scout without cargo and am close to food, so I'll tie to it. | ||
+ | cond | ||
+ | *.type .scout = | ||
+ | *.in1 *.out1 != | ||
+ | *.nrg 0 > | ||
+ | *.eye5 40 > | ||
+ | *.reffixed 0 = | ||
+ | *.numties 0 = | ||
+ | start | ||
+ | .tie inc | ||
+ | stop | ||
+ | |||
+ | 'I am a scout with cargo, better bring it back so the others can eat it. | ||
+ | ''Might as well take some of the spoils myself so the load isn't as heavy. | ||
+ | cond | ||
+ | *.type .scout = | ||
+ | *.numties 1 = | ||
+ | start | ||
+ | *.queenxpos *.queenypos angle .setaim store | ||
+ | 40 .sharenrg store | ||
+ | 1 .sharewaste store | ||
+ | stop | ||
+ | |||
+ | 'I am a scout and my cargo is near the queen, I'll dump it and go find some more | ||
+ | ''Let's fix it in place so it doesn't run away. | ||
+ | cond | ||
+ | *.type .scout = | ||
+ | *.numties 1 = | ||
+ | *.queenxpos *.queenypos dist *.dumpdist < | ||
+ | start | ||
+ | .fixpos .tieloc store | ||
+ | .tieval inc | ||
+ | stop | ||
+ | |||
+ | 'I'm not a scout and I see food, let's eat it! | ||
+ | cond | ||
+ | *.eye5 40 > | ||
+ | *.out1 *.in1 != | ||
+ | *.type .scout != | ||
+ | start | ||
+ | -6 .shoot store | ||
+ | stop | ||
+ | |||
+ | 'Waste dump! | ||
+ | cond | ||
+ | *.waste 200 > | ||
+ | start | ||
+ | *.waste .shootval store | ||
+ | -4 .shoot store | ||
+ | stop | ||
+ | |||
+ | 'I am a Queen, so I should really make a colony | ||
+ | cond | ||
+ | *.type .queen = | ||
+ | *.nrg 5000 > | ||
+ | start | ||
+ | 5 .repro store | ||
+ | stop | ||
− | === | + | ===Fruit Flies v0.21=== |
− | <pre></pre> | + | A very simple organism, it adapts to oponents through '''natural selection'''. |
+ | It's also very potent dispite being very simple. | ||
+ | It initialy took the first place in the F1 league but has dropped a few places since then. | ||
+ | There's no advanced behavior, it uses a wide eye5 and turns around itself then ties to any oponent it sees. | ||
+ | It has 4 different ways to attack and it selects on at random when starting the sim. | ||
+ | The selected attack type is stored in the epigenetic memmory locations and is carried on to any children. | ||
+ | Theres a chance that it will change it's attack type, but most offspring will use the same attack as the parent. | ||
+ | |||
+ | This means that an oponent who tries to leech energy through a tie will promote the use of counter leeching. | ||
+ | A bot with counter leeching will fall to the attack which uses "reverse counter leeching" (Pushing -1 or -6 into .tieloc) | ||
+ | |||
+ | Basicaly the bot doesn't worry about what the oponent is doing, it chooses an attack, those who chose right will thrive and spread while those who chose wrong will dies out. | ||
+ | Because it's very small and simple it can reproduce fast and will therefor be able to adapt to it's oponent in the midle of an F1 fight. | ||
+ | |||
+ | This is just a good example to show how a very simple organism with a few tricks can be much stronger than large complex organisms. | ||
+ | And to show that epigenetic memmory isn't just for evo bots, it can be very usefull even in the F1 league. | ||
+ | |||
+ | <pre> | ||
+ | 'Fruit Flies v0.21 (for DB2.43.1L) | ||
+ | 'By Moonfisher : 28-09-08 | ||
+ | 'A very simple tie feeder for F1. | ||
+ | 'Beats EtchII and everything else I've tried it on so far. So it should beat the current F1 league I think. | ||
+ | 'The reproduction gene is capped at 1000, if it's still too slow try 700, although that could change the results. | ||
+ | 'No fancy eyes or conspec or anything of that sort, just a very simple strategy. | ||
+ | 'v0.2 : Now addapts to it's oponent through natural selection. | ||
+ | 'It also beats most oponents a lot faster, but has a slightly harder time beating Etch II. | ||
+ | 'It's also now one gene and generaly shorter, planning to use it as a virus for an alge. | ||
+ | 'v0.21 : Now beats v0.1 tongue.gif | ||
+ | |||
+ | def maxpop 1000 | ||
+ | def alge 13 | ||
+ | |||
+ | def rand 110 | ||
+ | def type 973 | ||
+ | |||
+ | cond | ||
+ | *.nrg 15 > | ||
+ | *.numties 0 != or | ||
+ | start | ||
+ | .fixpos dec | ||
+ | |||
+ | '-- Birth | ||
+ | *.robage 0 = | ||
+ | 314 .aimright store | ||
+ | .deltie inc | ||
+ | 300 .eye5width store | ||
+ | .dnalen .memloc store | ||
+ | .dnalen .tmemloc store | ||
+ | 15 rnd .rand store | ||
+ | |||
+ | *.rand 5 < and | ||
+ | *.rand .type store | ||
+ | |||
+ | *.type 0 = | ||
+ | 5 rnd .type store | ||
+ | |||
+ | |||
+ | '-- Reproduction | ||
+ | *.body 5 > | ||
+ | *.nrg 80 > and | ||
+ | *.totalmyspecies .maxpop 2 mult < and | ||
+ | *.maxvel .dn store | ||
+ | 50 .repro store | ||
+ | |||
+ | *.totalmyspecies .maxpop < | ||
+ | *.nrg 200 > and | ||
+ | 50 *.body 10 mult sub 0 floor .strbody store | ||
+ | |||
+ | '-- Shrinking | ||
+ | not | ||
+ | *.body 1 > and | ||
+ | *.body 10 mult 10 sub 0 floor .fdbody store | ||
+ | |||
+ | |||
+ | '-- Tie feeding | ||
+ | *.numties 0 != | ||
+ | *.tiepres .tienum store | ||
+ | |||
+ | *.tmemval *.dnalen = | ||
+ | *.numties 1 > or and | ||
+ | *.numties .deltie store | ||
+ | |||
+ | *.numties 0 != | ||
+ | *.robage 1 > and | ||
+ | *.trefxpos *.trefypos angle .setaim store | ||
+ | 99 .sharenrg store | ||
+ | |||
+ | dupbool | ||
+ | *.memval .alge = and | ||
+ | *.trefxpos *.xpos sub abs *.trefypos *.ypos sub abs pyth 5 div 10 sub 0 floor *.maxvel ceil .up store | ||
+ | *.velsx .dx store | ||
+ | |||
+ | dropbool | ||
+ | dupbool | ||
+ | *.type 1 = and | ||
+ | .tieval .tieloc store | ||
+ | 3200 .tieval store | ||
+ | *.memval .alge = and | ||
+ | .tieloc .shoot store | ||
+ | -1 .shootval store | ||
+ | |||
+ | dropbool | ||
+ | dupbool | ||
+ | *.type 2 = and | ||
+ | .shootval .tieloc store | ||
+ | -31999 .tieval store | ||
+ | |||
+ | dropbool | ||
+ | dupbool | ||
+ | *.type 3 = and | ||
+ | .tieloc .tieloc store | ||
+ | -6 .tieval store | ||
+ | *.memval .alge = and | ||
+ | .tieval .shoot store | ||
+ | 3200 .shootval store | ||
+ | |||
+ | dropbool | ||
+ | *.type 3 > and | ||
+ | .tieloc .tieloc store | ||
+ | -1 .tieval store | ||
+ | *.memval .alge = and | ||
+ | .tieval .shoot store | ||
+ | 3200 .shootval store | ||
+ | |||
+ | |||
+ | '-- Hunting | ||
+ | *.numties 0 = | ||
+ | *.body 1 = and | ||
+ | dupbool | ||
+ | *.eye5 0 = | ||
+ | *.memval *.dnalen = or and | ||
+ | 350 .aimright store | ||
+ | |||
+ | dropbool | ||
+ | *.eye5 0 != and | ||
+ | *.memval *.dnalen != and | ||
+ | *.refbody 20 > | ||
+ | *.totalmyspecies 600 > or and | ||
+ | *.refxpos *.refypos angle .setaim store | ||
+ | .tie inc | ||
+ | *.memval .alge = and | ||
+ | *.velsx .dx store | ||
+ | *.refvelup 15 add *.maxvel ceil 0 floor .up store | ||
+ | .fixpos .shoot store | ||
+ | 1 .shootval store | ||
+ | stop | ||
+ | |||
+ | end | ||
+ | </pre> |
Latest revision as of 08:01, 17 March 2009
DB Bots
The idea here is to collect Bots and their text here ...
so people can go through and ask questions about how
various genes work.
Click on discussion and start one.
Contents
C_Circumgirans
' Comisia Circumgirans ' ' Robot NanniMorettiano ' (you'd need to know some italian politics ' to understand that... I hope you don't) ' Evolved 2002 from c. ancestralis ' ' A very efficient robot, it has the ability ' to move in swarms (swarms that become ' round when there is no food in sight, ' so the name). cond *.eye6 0 != start 21 40 store 17 .aimdx store stop cond start 16 .aimsx store stop cond *.eye8 -1 != start -4 .dn store 4 .up store stop cond *.aimdx 0 > start -1 .shoot store 6 .nrg store stop cond *.refsx 6181 !%= *.nrg 6181 > start 430 .aimdx store 50 .repro store 42 .out1 store 37 stop end
Devincio_Dominator_Invincibalis
'Devincio_Dominator_Invincibalis 'uses tie defence system '*********************** 'initialize '********* cond *.robage 0 = start 42 55 store .tie inc stop cond *.robage 1 = start .deltie inc stop cond *.robage 300 > *.nrg 3000 > *.body 5000 < start 100 .strbody store stop cond *.body 100 > *.nrg 500 < start 100 .fdbody store stop ' move forward '**************** cond *.refeye *.myeye != *.numties 0 = start *.maxvel *.vel sub .up store stop 'turn towards food '************************* 'avoid other conspecifics '**************************** cond start mult mult 0 0 stop cond *.eye4 *.eye6 > start mult mult -5 -25 stop cond *.eye6 *.eye4 > start mult mult 5 25 stop cond *.eye3 *.eye5 > *.eye3 *.eye4 > *.eye3 *.eye6 > start mult mult -8 -80 stop cond *.eye7 *.eye5 > *.eye7 *.eye6 > *.eye7 *.eye4 > start mult mult 8 80 stop cond *.eye1 *.eye5 > *.eye1 *.eye4 > *.eye1 *.eye6 > *.eye1 *.eye3 > *.eye1 *.eye7 > start mult mult -14 -140 stop cond *.eye9 *.eye5 > *.eye9 *.eye4 > *.eye9 *.eye6 > *.eye9 *.eye3 > *.eye9 *.eye7 > start mult mult 14 140 stop ' Avoid conspecifics ' *********************** cond *.refeye *.myeye = start mult mult 0 85 stop 'reproduce '*********** cond *.robage 50 < *.eye5 50 < *.nrg 1500 > start 50 .repro store mult mult 0 250 stop cond *.nrg 5000 > *.eye5 50 < start 40 .repro store mult mult 0 250 stop 'Feed '****** cond *.tiepres *51 != *.numties 0 > start *.tiepres .tienum store 1000 .tieval store .tieval .tieloc store stop cond *.multi 1 = start *.tiepres .deltie store 99 .sharenrg store stop cond *52 2 = start *51 .deltie store 0 52 store stop cond *52 0 > start *51 .tienum store -1000 .tieval store -1 .tieloc store 52 inc stop ' sever ties to conspecifics ' ***************************** cond *.trefeye *55 = start *.tiepres .deltie store stop ' delete painful tie ' ****************** cond *.numties 0 > *.pain 500 > start *.tiepres .deltie store stop 'Tie to an enemy '******************** cond *.eye5 50 > *.eye6 *.eye4 %= *.refeye *.myeye != *.robage 0 > start 800 rnd 100 add 51 store *51 .tie store *51 .readtie store mult mult 0 0 52 inc stop ' Actually rotate ' ***************** cond start .aimdx store .dx store stop cond *.refeye *.myeye != *.refeye 1 != *.eye5 50 > start -6 .shoot store stop cond *.waste 100 > start 1 .backshot store -4 .shoot store *.waste .shootval store stop cond *.poison 1000 < *.nrg 1000 > start 10 .strpoison store stop end
Devincio_Eversor
'Devincio_Eversor ' *** Tie Destroyerr *** '*********************** 'initialize '********* cond *.robage 0 = start 8 rnd 2 add 51 store 45 55 store *51 .tie store stop ' move forward '**************** cond *.refeye *55 != start 30 *.vel sub .up store stop cond *.refeye *55 != *.refeye 0 != *.eye5 80 > start 40 *.vel sub .up store stop cond *.refeye *55 = *.eye5 50 > start 2 .dn store stop 'turn towards food '************************* 'avoid other conspecifics '**************************** cond start mult 0 stop cond '*.eye4 *.eye5 > *.eye4 *.eye6 > start mult -15 stop cond '*.eye6 *.eye5 > *.eye6 *.eye4 > start mult 15 stop cond *.eye3 *.eye5 > *.eye3 *.eye4 > *.eye3 *.eye6 > start mult -50 stop cond *.eye7 *.eye5 > *.eye7 *.eye6 > *.eye7 *.eye4 > start mult 50 stop cond *.eye1 *.eye5 > *.eye1 *.eye4 > *.eye1 *.eye6 > *.eye1 *.eye3 > *.eye1 *.eye7 > start mult -100 stop cond *.eye9 *.eye5 > *.eye9 *.eye4 > *.eye9 *.eye6 > *.eye9 *.eye3 > *.eye9 *.eye7 > start mult 100 stop ' Avoid conspecifics ' *********************** cond *.refeye *55 = start mult 85 stop 'reproduce '*********** cond *.nrg 4000 > *.eye5 0 = start 25 .repro store mult 250 stop 'Tie to an enemy '******************** cond *.eye5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *55 != start *51 .tie store mult 0 stop ' Actually rotate ' ***************** cond start .aimdx store stop ' sever ties to conspecifics ' ***************************** cond *.trefeye *55 = start *51 .deltie store stop 'Spin when attacked '************************* cond *.shdn 0 < *.pleas -10 < start 620 .aimsx store stop cond *.hitdn 0 != start 620 .aimsx store stop 'Feed '****** cond *.numties 0 > start *51 .tienum store -1000 .tieval store -1 .tieloc store *51 .readtie store stop cond *.numties 0 > *.waste 100 > *.trefeye 0 = start 1000 .tieval store -4 .tieloc store stop cond *.slime 90 < start 50 .mkslime store stop cond *.refeye *55 != *.eye5 50 > start -1 .shoot store stop end
Hunter V2.13
'New generation Hunter bot with state of the art features '*********************** 'reproduce '********* cond *.nrg 4000 > start 60 .repro store 628 .aimsx store 1 40 store stop cond *.robage 0 = start 1 .tie store stop cond *.robage 1 = start 314 .aimdx store stop cond *.robage 3 = start 314 .aimsx store stop cond *40 0 != start 40 inc stop cond *.eye5 80 < *.refeye 18 != start 30 *.vel sub 3 div .up store stop 'turn towards enemies or food '************************* cond *.eye1 *.eye5 > *.eye1 *.eye9 > start 100 .aimsx store '5 .sx store stop cond *.eye9 *.eye5 > *.eye9 *.eye1 > start -100 .aimsx store '5 .dx store stop cond *.eye3 *.eye5 > *.eye3 *.eye7 > start 50 .aimsx store '5 .sx store stop cond *.eye7 *.eye5 > *.eye7 *.eye3 > start -50 .aimsx store '5 .dx store stop cond *40 3 = start 628 .aimdx store 0 40 store stop 'avoid conspecifics '**************************** cond *.refeye 18 = '*.eye5 30 > start 120 .aimsx store stop 'shoot at enemy '****************** cond *.eye5 50 > *.refeye 18 != start -1 .shoot store stop 'delete ties '********* cond *.numties 0 > start 1 .deltie store stop cond start 100 .mkslime store stop end
'The Bee Gene: UPDATE! Now Capable of defeating the Devincio_Eversor in a equal unmutating simulation. Still working on Virus gene.
'===================
'These genes attempt to create a situation similair to a hive. It takes a while for them to get 'collected and decide order of dominance, but that is because it is halfway unfinished. The 'warriors, drones and secondary queens do not occur because their genes are giving me a 'headache. They have a tendancy to reproduce less often the larger they get, leaving more food 'for them to become fatter, and eventually a queen. They diet themselves according to rank. 'Feel free to make any changes to these offline. I am open to ideas for handling the various 'other ranks and their genes. All of the search genes are not original, that was not the goal. 'phase 1 initialization. cond *.robage 0 = start 8 rnd 2 add 51 store 45 55 store *51 .tie store 40 40 store 1 41 store stop cond *.robage 1 = start 0 41 store stop cond *.numties 0 = *.body 1000 > *.nrg 10000 > start 25 .repro store stop cond *.tiepres *.feedtie = *.trefevenom *.myvenom != start -1000 .tieval store *.tieval 1000 div .tieloc store stop cond *.robage 300 < *.nrg 1200 > *.numties 0 != *.trefeye 82 != *.trefeye 0 != *.vtimer 0 = *41 0 = start 0 .fixang store *.thisgene .mkvirus store 2 .vloc store *.tiepres .deltie store 1 41 store cond *.nrg 12000 > *.numties 0 != start 40 .repro store 31 .aimright store 21 .out2 store *51 .tienum store -1000 .tieval store 1 .tieloc store stop 'update the ins and outs cond *.refeye *.myeye = *.in1 *.out1 != start *.out1 .in1 store stop cond *.refeye *.myeye = *.in2 *.out2 != start *.out2 .in2 store stop cond *.numties 0 > start *51 .readtie store stop 'pahse 2: collector, fighter or queen cond *.nrg 12000 > *.numties 0 != start 40 .repro store 31 .aimdx store 21 .out2 store stop *.refxpos *.refypos angle .aim store cond *.eye2 *.eye8 != start *.eye2 *.eye8 sub .aimsx store stop cond *.eye4 *.eye6 != start *.eye4 *.eye6 sub 2 div .aimsx store stop cond *.vel 40 < start 40 *.vel sub .up store stop cond *.refeye *.myeye = *.eye5 50 > start *.refaim *.aim sub .setaim store stop ' Gene 7 wide search 1 cond *.eye1 *.eye5 > *40 40 = *.nrg 9000 < start mult -100 stop ' Gene 8 wide search 2 cond *.eye9 *.eye5 > *40 40 = *.nrg 9000 < start mult 100 stop cond start .aimdx store stop cond *.eye4 *.eye6 > start 90 .out2 store -20 .aimdx store stop cond *.eye6 *.eye4 > start -90 .out2 store 20 .aimdx sore stop cond *.eye3 *.eye5 > *.eye3 *.eye4 > *.eye3 *.eye6 > start 80 .out2 store -40 .aimdx store stop cond *.eye7 *.eye5 > *.eye7 *.eye6 > *.eye7 *.eye4 > start -80 .out2 store 40 .aimdx store stop cond *.eye1 *.eye5 > *.eye1 *.eye4 > *.eye1 *.eye6 > *.eye1 *.eye3 > *.eye1 *.eye7 > start 70 .out2 store -60 .aimdx store stop cond *.eye9 *.eye5 > *.eye9 *.eye4 > *.eye9 *.eye6 > *.eye9 *.eye3 > *.eye9 *.eye7 > start -70 .out2 store 60 .aimdx store stop ' Gene 3. Move forward cond *.numties != 2 *.vel 20 < *.refeye 9 != start 30 *.vel sub 2 div .up store stop cond *.robage 150 > start 31 .out2 store stop cond *.tielen 800 > *.numties 1 = start 500 .fixlen store stop 'external communications cond *.numties 2 < *.eye5 40 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *.myeye = start *51 .tie store stop cond *.eye5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *.myeye = *.in2 0 != *.in2 21 != start *.in2 .aimdx store stop cond *.eye5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *.myeye != *.refties *.myties = start *40 .out1 store 1 *40 add 40 store stop 'internal commands from the queen cond *.out2 21 = *.numties 0 != *.nrg 28000 < *.out1 50 != start *51 .deltie store 50 .out2 store stop 'attack other ties cond *.numties 0 != *.trefeye *.myeye != *.trefvenom *.myvenom != start *.tieangle .aim store *51 .deltie store stop 'collect food command cond *.in2 50 = *.refeye *.myeye = start 50 .out2 store 40 *40 store 0 *.out2 store stop cond *.numties 3 < *.out2 50 = *.eye5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *.myeye != start *51 .tie store stop cond *.numties 3 = *.out2 50 = *.in2 21 != *.vel 20 < start 20 .vel store stop cond *.numties 0 != *.trefeye *.myeye = *.trefvel *.vel != *.trefangle *.myangle != *40 100 != start *.trefvel .vel store *trefangle .myangle store stop cond *.numties 1 = *40 100 != start 100 40 store stop cond *.numties 3 = *.out2 50 = *.in2 21 = *.eye 5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *.myeye = start *51 .tie store 76 .out2 store stop 'eatself when searching for food cond *.out2 50 = *.trefeye *55 != *.nrg 5000 < *.body 300 < start 300 .fdbody store stop cond *.out2 50 = *.trefeye *55 != *.nrg 3000 < *.body 100 < *.numties 0 != start *51 .tienum store -1000 .tieval store -1 .tieloc store *51 .readtie store *.waste *.trefwaste sub .sharewaste .multi store stop 'feed eachother cond *.numties = 2 *.trefeye *.myeye = *.nrg *.trefnrg > start *51 .tienum store 10 .sharenrg .multi store stop cond *.numties = 2 *.trefeye *.myeye = *.waste *.trefwaste > start *51 .tienum store 10 .sharewaste .multi store stop cond *.numties 0 > *.numties 4 = *.in2 50 = *.nrg 1000 < *.trefeye *.myeye != start *51 .tienum store -1000 .tieval store -1 .tieloc store *51 .readtie store stop cond *.waste 100 > *.trefeye *.myeye != *.numties 4 = *.in2 50 = *.nrg 1000 < start 1000 .tieval store -4 .tieloc store stop 'store away food for when it gets bad cond *.nrg 29000 > *.body 900 < start 50 .strbody store stop cond *.nrg 12000 < *.body 200 > start 50 .fdbody store stop cond *.refeye 0 != *.eye5 60 > *.refeye 82 != *.venom 0 > start 50 .vloc store 50 .venval store -3 .shoot store stop cond *.refeye 82 != *.venom 100 < *.eye5 60 > start -1 .shoot store stop 'create venom cond *.robage 10 = start *.nrg 50 div .strvenom store stop cond *.robage 200 = start *.nrg 40 div .strpoison store *.eye5 .ploc store *.nrg 75 div .strvenom store stop cond *.robage 500 = start *.nrg 60 div .strpoison store *.shoot .ploc store *.nrg 85 div strvenom store stop cond *.robage 900 = start *.nrg 90 div .strpoison store *.refeye .ploc store stop cond *.numties 0 != *trefeye *.myeye = *.slime 200 < start 30 .mkslime store 50 .shareslime .multi store stop cond *.numties 0 != *trefeye *.myeye = *.slime *.trefslime > start 50 .shareslime .multi store stop cond *.numties 0 != *.eye5 30 > *.eye5 *.eye4 = *.eye5 *.eye6 = *.refeye *55 != start *51 .tie store stop cond *.waste 800 < *.numties 0 > *.body 1000 < *.trefeye *.myeye != start *51 .tienum store -1000 .tieval store -1 .tieloc store *51 .readtie store *.waste .sharewaste .multi store stop cond *498 0 > *.waste 100 or *.trefeye 0 = cond 1047 407 store -4 .tieloc store stop cond *.numties 0 > *.waste 800 < *.body 1000 < *.trefeye 82 != start -1000 .tieval store -4 .tieloc store stop cond *.robage 2 = start *.nrg 50 div .mkslime store stop cond *.refeye 82 != *.eye5 50 > start -1 .shoot store stop cond *.numties 0 = *.nrg 25000 > start 50 .repro store stop end
Antbot
This bot is VERY advanced, and may require lots of patience to understand the inner workings.
'vars def youngqueen 0 def queen 1 def drone 2 def worker 3 def scout 4 'custom memory locations def temp 990 def type 991 def queenxpos 992 def queenypos 993 def dumpdist 994 def hiveid 995 'Initialization What type of ant am I? Set eyes and conspec cond *.robage 0 = start 1000 rnd .temp store .youngqueen *.temp sgn -- abs .type mult store .drone *.temp sgn .type mult store .scout *.temp 200 sub sgn 0 floor .type mult store .worker *.temp 300 sub sgn 0 floor .type mult store 1235 .out1 store -436 .eye9dir store -327 .eye8dir store -218 .eye7dir store -109 .eye6dir store 109 .eye4dir store 218 .eye3dir store 327 .eye2dir store 436 .eye1dir store 109 .eye1width store 109 .eye2width store 109 .eye3width store 109 .eye4width store 109 .eye5width store 109 .eye6width store 109 .eye7width store 109 .eye8width store 109 .eye9width store stop 'First generation is always a queen start *.thisgene .delgene store .youngqueen .type store stop 'OCULUS 'Update bot cond start *.hiveid .out4 store *.type .out2 store *.nrg 3 div *.body sub dup .strbody store - .fdbody store -4 *.eye1 sgn mult *.eye2 sgn -- abs mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult *.eye8 sgn -- abs mult *.eye9 sgn -- abs mult 4 *.eye9 sgn mult *.eye2 sgn -- abs mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult *.eye8 sgn -- abs mult add -3 *.eye2 sgn mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult *.eye8 sgn -- abs mult add 3 *.eye8 sgn mult *.eye3 sgn -- abs mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult add -2 *.eye3 sgn mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult *.eye7 sgn -- abs mult add 2 *.eye7 sgn mult *.eye4 sgn -- abs mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult add -1 *.eye4 sgn mult *.eye5 sgn -- abs mult *.eye6 sgn -- abs mult add 1 *.eye6 sgn mult *.eye5 sgn -- abs mult add 0 *.eye5 sgn mult add .focuseye store 12 *.type .scout sub sgn abs -- abs 3 mult ++ mult *.vel sub .up store *.type .queen sub sgn abs -- abs .fixpos store *.tiepres .tienum store 500 rnd 500 add .dumpdist *.type .scout sub sgn abs -- abs mult store stop 'I am a drone and should turn towards everything cond *.eyef 0 != *.type .drone = start *.refxpos *.refypos angle .setaim store stop 'I'm a worker/young queen, no point turning towards conspecs cond *.eyef 0 != *.type .worker = *.type .youngqueen = or *.out1 *.in1 != start *.refxpos *.refypos angle .setaim store stop 'I am a young queen and am big and fat, so I mature cond *.type .youngqueen = *.body 10000 > start .fixpos inc .queen .type store *.xpos .queenxpos store *.ypos .queenypos store 32000 rnd .hiveid store stop 'I have no hive and you are a queen, I'll join yours cond *.queenxpos 0 = *.queenypos 0 = *.type .queen != *.type .youngqueen != *.in2 .queen = start *.refxpos .queenxpos store *.refypos .queenypos store *.in4 .hiveid store stop 'Mature queens turn so there's enough reproduction space. cond *.type .queen = start 20 .aimdx store stop 'Drones and workers feed the queen cond *.in1 *.out1 = *.in4 *.hiveid = *.type .drone = *.type .worker = or *.in2 .queen = *.nrg 500 > start *.nrg 500 sub 1000 ceil .shootval store -2 .shoot store stop 'The queen is dead, I am a huge drone sitting in her place, I think I'll become the new queen. cond *.type .drone = *.queenxpos *.queenypos dist 15 < *.in2 .queen != *.nrg 30000 >= start .fixpos inc .queen .type store stop 'Drones harvest food from workers to bring to the queen so workers can keep harvesting cond *.hiveid *.in4 = *.type .drone = *.in2 .worker = *.eye5 40 > *.refnrg 1000 > start -1 .shoot store stop 'I am a drone near a queen, but have no food, so I'll move away. cond *.in1 *.out1 = *.in2 .queen = *.type .drone = *.nrg 500 <= start *.maxvel *.velup add .dn store stop 'I am a huge Drone/Worker, better go and give some of that food I harvested to the Queen. cond *.type .drone = *.nrg 15000 > and *.type .worker = *.body 1000 > and or start *.queenxpos *.queenypos angle .setaim store stop 'I am a scout and my cargo is near the queen, I'll dump it and go find some more. It's fixed, so it won't run away. cond *.type .scout = *.numties 1 = *.treffixed 0 != start *.tiepres .deltie store 314 .aimdx store 20 .up store stop 'I am a scout without cargo and see food, let's get it! cond *.type .scout = *.numties 0 = *.in1 *.out1 != *.reffixed 0 = *.nrg 0 > *.eyef 0 > start *.refxpos *.refypos angle .setaim store stop 'I am a scout without cargo and am close to food, so I'll tie to it. cond *.type .scout = *.in1 *.out1 != *.nrg 0 > *.eye5 40 > *.reffixed 0 = *.numties 0 = start .tie inc stop 'I am a scout with cargo, better bring it back so the others can eat it. Might as well take some of the spoils myself so the load isn't as heavy. cond *.type .scout = *.numties 1 = start *.queenxpos *.queenypos angle .setaim store 40 .sharenrg store 1 .sharewaste store stop 'I am a scout and my cargo is near the queen, I'll dump it and go find some more Let's fix it in place so it doesn't run away. cond *.type .scout = *.numties 1 = *.queenxpos *.queenypos dist *.dumpdist < start .fixpos .tieloc store .tieval inc stop 'I'm not a scout and I see food, let's eat it! cond *.eye5 40 > *.out1 *.in1 != *.type .scout != start -6 .shoot store stop 'Waste dump! cond *.waste 200 > start *.waste .shootval store -4 .shoot store stop 'I am a Queen, so I should really make a colony cond *.type .queen = *.nrg 5000 > start 5 .repro store stop
Fruit Flies v0.21
A very simple organism, it adapts to oponents through natural selection. It's also very potent dispite being very simple. It initialy took the first place in the F1 league but has dropped a few places since then. There's no advanced behavior, it uses a wide eye5 and turns around itself then ties to any oponent it sees. It has 4 different ways to attack and it selects on at random when starting the sim. The selected attack type is stored in the epigenetic memmory locations and is carried on to any children. Theres a chance that it will change it's attack type, but most offspring will use the same attack as the parent.
This means that an oponent who tries to leech energy through a tie will promote the use of counter leeching. A bot with counter leeching will fall to the attack which uses "reverse counter leeching" (Pushing -1 or -6 into .tieloc)
Basicaly the bot doesn't worry about what the oponent is doing, it chooses an attack, those who chose right will thrive and spread while those who chose wrong will dies out. Because it's very small and simple it can reproduce fast and will therefor be able to adapt to it's oponent in the midle of an F1 fight.
This is just a good example to show how a very simple organism with a few tricks can be much stronger than large complex organisms. And to show that epigenetic memmory isn't just for evo bots, it can be very usefull even in the F1 league.
'Fruit Flies v0.21 (for DB2.43.1L) 'By Moonfisher : 28-09-08 'A very simple tie feeder for F1. 'Beats EtchII and everything else I've tried it on so far. So it should beat the current F1 league I think. 'The reproduction gene is capped at 1000, if it's still too slow try 700, although that could change the results. 'No fancy eyes or conspec or anything of that sort, just a very simple strategy. 'v0.2 : Now addapts to it's oponent through natural selection. 'It also beats most oponents a lot faster, but has a slightly harder time beating Etch II. 'It's also now one gene and generaly shorter, planning to use it as a virus for an alge. 'v0.21 : Now beats v0.1 tongue.gif def maxpop 1000 def alge 13 def rand 110 def type 973 cond *.nrg 15 > *.numties 0 != or start .fixpos dec '-- Birth *.robage 0 = 314 .aimright store .deltie inc 300 .eye5width store .dnalen .memloc store .dnalen .tmemloc store 15 rnd .rand store *.rand 5 < and *.rand .type store *.type 0 = 5 rnd .type store '-- Reproduction *.body 5 > *.nrg 80 > and *.totalmyspecies .maxpop 2 mult < and *.maxvel .dn store 50 .repro store *.totalmyspecies .maxpop < *.nrg 200 > and 50 *.body 10 mult sub 0 floor .strbody store '-- Shrinking not *.body 1 > and *.body 10 mult 10 sub 0 floor .fdbody store '-- Tie feeding *.numties 0 != *.tiepres .tienum store *.tmemval *.dnalen = *.numties 1 > or and *.numties .deltie store *.numties 0 != *.robage 1 > and *.trefxpos *.trefypos angle .setaim store 99 .sharenrg store dupbool *.memval .alge = and *.trefxpos *.xpos sub abs *.trefypos *.ypos sub abs pyth 5 div 10 sub 0 floor *.maxvel ceil .up store *.velsx .dx store dropbool dupbool *.type 1 = and .tieval .tieloc store 3200 .tieval store *.memval .alge = and .tieloc .shoot store -1 .shootval store dropbool dupbool *.type 2 = and .shootval .tieloc store -31999 .tieval store dropbool dupbool *.type 3 = and .tieloc .tieloc store -6 .tieval store *.memval .alge = and .tieval .shoot store 3200 .shootval store dropbool *.type 3 > and .tieloc .tieloc store -1 .tieval store *.memval .alge = and .tieval .shoot store 3200 .shootval store '-- Hunting *.numties 0 = *.body 1 = and dupbool *.eye5 0 = *.memval *.dnalen = or and 350 .aimright store dropbool *.eye5 0 != and *.memval *.dnalen != and *.refbody 20 > *.totalmyspecies 600 > or and *.refxpos *.refypos angle .setaim store .tie inc *.memval .alge = and *.velsx .dx store *.refvelup 15 add *.maxvel ceil 0 floor .up store .fixpos .shoot store 1 .shootval store stop end