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

Pages: 1 [2] 3 4
16
The Gene depository / 6 genes for improved hunting
« on: January 25, 2008, 04:29:57 PM »
Here are a few simple solutions I've tried since the first versions of LF that helped hunting down tiny mobile bots like stickerbush and Shrinking Violet.

1. The paralizing venom shot

This strategy is so old that the sysvar to check if your bot has been hit by venom is '.paralized', but yet it's quite underrated. The idea is to paralize the veggie then feed from it. You need to paralize it when it runs away, so you shoot it with venom when it's at far range. You need the venom to last several cycles by storing an high value into .shootval. You shouldn't abuse shootval, tho, because it wastes energy.

Code: [Select]
*.refeye *.myeye !=
.eye5 10 > and
.eye5 50 < and
.fixpos .vloc store
1 .venval store
*.nrg 10 div 100 ceil .shootval store
-3 .shoot store

2. The confusion shot

Runaway bots are harder to get in range if they don't use wide eyes, since wide eyes have shorter range and they may not notice your bot even at shooting distance. So, since you are using venom anyway, you can force the bot to look away:

Code: [Select]
*.refaim *.aim sub abs 600 %=
*.refeye *.myeye != and
*.aim .venval store
.setaim .vloc store
*.nrg 10 div 100 ceil .shootval store
-3 .shoot store

3. The paralyzing tie

If you can tie the bot, which isn't so common in IM but anyway... you can paralyze it too through the tie. This isn't extremely accurate, but may work:

Code: [Select]
*.trefdn abs 20 >
*.refvel 20 > or
.fixpos .tieloc store
1 .tieval store

Place it where it overrides any tie feeding.

4. The path-cutting chaser

You'll find often that the classic x/y 'dumb' aiming is fooled by bots that turn as they flee. So you need to go not where the bot is, but where it will be:

Code: [Select]
*.refxpos *.refypos angle *.refveldx 2 mult sub .setaim store
I think this simple solution works quite well out of the box, but you may want to tweak the 2 mult constant, find a proper eye5 width and check that your bot isn't fooled by bots that can flee without looking thru eye5.

5. The leading shot

Same as above, but for your shots:

Code: [Select]
*.refveldx 3 mult .aimshoot store
But ask EricL if .aimshoot accepts negative numbers.  

6. The food spot recall

Bots tend to be generally dumb, we gotta face it. They like to wander away when they are still surrounded of yummy food, specially that of the peaceful and static kind. So making them recall where they feed the last time can help a lot. This is a bit more complex, but basically what I did is:

Code: [Select]
def xfood 51
def yfood 52
def recalls 53

*.pleas 500 >
*.xpos .xfood store
*.ypos .yfood store
-2 .recalls store

Note that you'll get positive .pleas when you are doing .fdbody, so to be sure the event was feeding and not body management you should use an higher value.

Then:

Code: [Select]
*.eye5 0 =
(add here periferic eyes check for clear if you want)
*.recalls abs 25 mult rnd 0 = and
*.xfood *.yfood angle .setaim store
*.recalls inc

You start with a negative value in recalls to avoid recalling when it's still feeding -you may use a counter instead. The bot will keep coming back to the feeding point, but slowly forgetting it so each time it wanders further away.

17
DNA - General / Contiguous free sysvars space?
« on: January 19, 2008, 02:06:41 PM »
I was wondering last afternoon about the requeriments for coding a rudimentary mapping system --remembering where shapes are and where food or enemy was found.

I think I could come up with something very primitive, but I would need some amount of contiguous free sysvars (def-ing them wouldn't help). I'm a bit lazy to track which memory locations aren't meaningful in the last version. Are there any +81 contiguous free sysvars below racial memory?

If not, could a safe extended memory byte array be added that could be accessed through an operator? Like:

x y readxms -> puts the xms(x,y) value in the stack.
value x y writexms -> puts value in the xms(x,y) safe memory location.

A 16 x 16 byte array would be good enough.

18
DNA - General / Stubborn conditional
« on: January 09, 2008, 12:38:48 PM »
I don't get it. I've got this code:

Code: [Select]
start
...
clearbool

*.waste 100 >
*.waste .shootval store
-4 .shoot store
clearbool

And the waste shoot executes always.

But if I use:

Code: [Select]
start
...
clearbool

*.waste 100 >
-4 .shoot store
*.waste .shootval store
clearbool

The condition works right. Why? I'm using 2.43y.

19
Evolution and Internet Sharing Sims / Evolving LF6
« on: December 20, 2007, 10:27:13 AM »
Last night I ran LF6 offline to see racial memory evolution. I put it in a 16kx12k toroidal sim with 25 anemone max as veggies, two intrasim teleporters and killer costs after 2000 cycles to force short generations.

Ran it for 135 generations, a bit slowed by graphing each 250 cycles (the graph drawing is slow under Linux). They don't say much:

[attachment=768:attachment]

But got some great results:

They widened their lateral eyes (1 & 9) from 30 to 100. I'm not sure what that means, because in a small sim they use xpos/ypos angle to aim. I think that could help when they are tiny and fast, and angle aiming actually puts them in "orbit".

They doubled their speed (racialmemory - actualspeed -> .up), from 100 to 200.

They raised their shell from 100 to 170. Last time I ran LF6 they did too, so most surely shell is giving them a great advantage.

vShoot went from 20 to 70.  The virus would cancel anemone's body feeding.

The other racial memory values didn't change much or didn't mean anything in that sim, but as test values none of them evolved randomly more than 25 units from the original value.

20
The Gene depository / Gene Collection: Virus
« on: December 17, 2007, 09:33:22 AM »
Lets post here Plug and Play virus genes.

Explain them so their meaning and purpose are clear.

21
F1 bots / Lionfish 6 (F1) MacadamiaNuts - 16.12.07
« on: December 16, 2007, 02:57:40 PM »
Better with mutations disabled.

Code: [Select]
def turnfactor 972
def reprothreshold 971
def speedlimit 973
def reproshare 974
def mymaxvenom 975
def mymaxpoison 976
def mymaxslime 977
def mymaxshell 978
def mymaxenergy 979
def myfareyes 980
def reprocooldown 51
def cloakmemloc 53
def imasettler 983
def mybodyfeed 981
def myvirusshot 982

cond
*.robage 20 >
*.thisgene 1 >
*.vtimer 0 =
start
*.thisgene .mkvirus store
100 .vshoot store
*.thisgene 1 sub .delgene store
*.thisgene 1 add .delgene 1 rnd mult store
*.thisgene .delgene *.out3 *.myeye 1 floor sub sgn abs 1 sub abs mult store
stop

cond
*.vtimer 0 =
*.nrg 2000 >
*.myvirusshot 0 >
start
*.myvirusshot .vshoot store
1 .mkvirus store
stop

cond
start
*.tiepres .tienum store
stop

cond
*.robage 6 =
*.reproshare 0 =
start
5 .turnfactor store
2 .reprothreshold store
100 .speedlimit store
50 .reproshare store
stop

cond
*.robage 12 =
*.mymaxenergy 0 =
start
100 .mymaxvenom store
100 .mymaxpoison store
300 .mymaxslime store
100 .mymaxshell store
5000 .mymaxenergy store
stop

cond
*.robage 16 =
*.mybodyfeed 0 =
start
30 .myfareyes store
30 .imasettler store
-500 .mybodyfeed store
10 .myvirusshot store
stop

cond
*.robage 21 =
10 rnd 1 =
start
*.reprothreshold 2 rnd 1 sub add 0 floor 6 ceil .reprothreshold store
stop

cond
*.robage 21 =
start
*.turnfactor 2 rnd 1 sub add 1 floor 50 ceil .turnfactor store
*.speedlimit 4 rnd 2 sub add 5 floor .speedlimit store
*.reproshare 4 rnd 2 sub add 1 floor .reproshare store
*.mymaxvenom 8 rnd 4 sub add .mymaxvenom store
*.mymaxpoison 8 rnd 4 sub add .mymaxpoison store
*.mymaxslime 8 rnd 4 sub add .mymaxslime store
*.mymaxshell 8 rnd 4 sub add .mymaxshell store
*.mymaxenergy 100 rnd 50 sub add 500 floor .mymaxenergy store
*.myfareyes 10 rnd 5 sub add 1 floor .myfareyes store
*.imasettler 10 rnd 5 sub add 1 floor .imasettler store
*.mybodyfeed 25 rnd 12 sub add -100 ceil .mybodyfeed store
*.myvirusshot 2 rnd 1 sub add 0 floor .myvirusshot store
stop

cond
*.refeye *.in3 =
start
0 .out4 store
0 .out5 store
stop

cond
*.trefeye *.myeye =
*.trefage 20 >
*.robage 20 >
*.reprocooldown 0 =
start
*.tiepres .deltie store
stop

cond
*.eye5 0 !=
*.refeye *.in3 sub sgn abs *.refeye *.myeye sub sgn abs add 0 !=
*.reftype 0 =
*.robage 13 >
*.reprocooldown 7 <
start
*.refveldx .dx store
-4 *.eye9 sgn mult
-3 *.eye8 sgn mult add
-2 *.eye7 sgn mult add
-1 *.eye6 sgn mult add
1 *.eye4 sgn mult add
2 *.eye3 sgn mult add
3 *.eye2 sgn mult add
4 *.eye1 sgn mult add
*.turnfactor mult
.aimsx store
*.refxpos *.refypos angle .setaim 32000 0 0 dist sub sgn 0 floor mult store
1 .tie *.eye5 40 sub sgn 0 floor mult store
*.refxpos .out4 store
*.refypos .out5 store
stop

cond
*.eye5 0 =
*.refeye *.myeye =
*.refeye *.in3 = and or
start
1200 rnd .aimshoot store
stop

cond
*.refeye *.in3 !=
*.refeye *.myeye != or
*.eye5 30 >
start
.focuseye .vloc store
.tieloc .vloc 1 rnd mult store
.sharenrg .vloc 1 rnd mult store
1 .venval store
stop

cond
*.robage 20 >
*.reprocooldown 0 =
start
*.speedlimit *.velup sub *.mass mult .up store
stop

cond
start
0 .fixpos store
0 .eye5dir store
0 .eye1dir store
0 .eye9dir store
1200 .eye5width store
*.myfareyes .eye1width store
*.myfareyes .eye9width store
0 .focuseye store
.eye4dir .vloc store
.eye6dir .vloc 1 rnd mult store
.eye5dir .vloc 1 rnd mult store
.eye5width .vloc 1 rnd mult store
.setaim .vloc 1 rnd mult store
-600 .venval store
2 .shootval store
-3 .shoot *.nrg 1000 sub sgn 0 floor mult store
-6 .shoot *.refeye *.myeye sub sgn abs *.refeye 1 floor *.in3 sub abs sgn add sgn mult *.eye5 40 sub sgn 0 floor mult store
-1 .shoot *.refeye *.myeye sub sgn abs *.refeye 1 floor *.in3 sub abs sgn add sgn mult *.refnrg *.refbody 10 mult sub sgn 0 floor
mult
*.eye5 40 sub sgn 0 floor mult store
-6 .shoot *.refpoison sgn mult *.refeye *.myeye sub sgn abs *.refeye 1 floor *.in3 sub abs sgn add sgn mult store
.shoot .vloc *.refage sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult *.timer 10 mod 8 sub 0 floor mult store
.fixpos .vloc *.refage sgn 1 sub abs mult *.eye5 55 sub sgn 0 floor mult *.timer 10 mod 8 sub 0 floor mult 1 rnd mult  store
1 .venval *.refage sgn 1 sub abs mult *.eye5 55 sub sgn 0 floor mult *.timer 10 mod 8 sub 0 floor mult store
100 .fixlen store
100 .tielen store
40 .stifftie store
.tieval .tieloc store
.fixpos .tieloc *.refvel 20 sub sgn 0 floor mult store
.fixpos .tieloc *.trefvel 20 sub sgn 0 floor mult store
.shoot .tieloc *.refaim *.aim sub abs 450 sub sgn 0 floor mult store
1000 .tieval store
*.reprocooldown 1 sub 0 floor .reprocooldown store
.shoot .ploc store
972 *.timer abs 15 mod add .out1 store
972 *.timer abs 15 mod add * .out2 store
*.myeye .out3 store
100 .shareslime store
stop

cond
*.refeye *.myeye =
*.refeye *.in3 =
*.refage *.robage >
*.robage 21 >
*.in1 971 >
start
*.in2 10 rnd 5 sub add *.in1 store
stop

cond
*.refeye *.myeye !=
*.refeye *.in3 != or
*.refbody 100 >
*.eye5 65 >
*.nrg 300 >
start
50 .shootval store
stop

cond
*.trefvel 20 <
*.trefbody *.mybodyfeed >
*.reprocooldown 0 =
*.robage 21 >
start
-6 .tieloc store
*.mybodyfeed .tieval store
stop

cond
*.mymaxvenom *.venom >
*.nrg *.mymaxvenom 5 mult >
start
10 .strvenom store
stop

cond
*.mymaxpoison *.poison >
*.nrg *.mymaxpoison 5 mult >
start
10 .mkpoison
store

cond
*.eye4 30 <
*.mass *.reprothreshold >
*.nrg *.mymaxenergy >
start
1200 rnd .setaim store
*.reproshare .repro store
20 .reprocooldown store
stop

cond
*.totalmyspecies *.imasettler <
*.eye4 30 <
*.body *.mymaxenergy 10 div >
*.nrg *.mymaxenergy >
start
1200 rnd .setaim store
50 .repro store
20 .reprocooldown store
stop

cond
*.nrg *.mymaxenergy >
start
100 .strbody store
else
100 .fdbody *.body 50 sub sgn 0 floor mult store
stop

cond
*.nrg 100 <
*.body 50 <
start
10 .fdbody store
stop

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

cond
*.reprocooldown 0 =
*.robage 30 >
*.trefeye *.myeye !=
start
99 .sharenrg store
100 .shareslime store
stop

cond
*.mymaxslime *.slime >
*.nrg *.mymaxslime 5 mult >
start
10 .mkslime store store
stop

cond
*.mymaxshell *.shell >
*.nrg *.mymaxshell 5 mult >
start
1 .mkshell store
stop

cond
*.edge 1 =
start
1200 rnd .setaim store
stop

cond
*.edge 0 =
*.eye4 *.eye5 >
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 > or
start
*.aim 157 sub .setaim store
stop

cond
*.edge 0 =
*.eye6 *.eye5 >
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 > or
start
*.aim 157 add .setaim store
stop

cond
*.refeye *.in3 =
*.refeye *.myeye =
*.eye5 30 <
*.in4 0 !=
*.in5 0 !=
start
*.in4 500 rnd 250 sub add *.in5 500 rnd 250 sub add angle .setaim store
else
150 .aimdx *.eye4 65 sub sgn 0 floor mult *.eye5 65 sub sgn 0 floor mult store
stop

cond
start
.memloc .memloc store
*.memval .memloc *.cloakmemloc sgn mult store
*.memval .cloakmemloc store
*.memval *.cloakmemloc  *.cloackmemloc sgn mult store
*.dnalen 999 store
stop

22
Internet Mode Commentary / Lionfish 6+ on IM
« on: December 15, 2007, 07:46:55 PM »
I finally got LF evolution & teaching fixed. It didn't successfully cross the internet barrier yet, but here it has run to 30th generation already against stickerbush veggies and I've got some noticeable changes.

971: the mass needed for reproduction was 2 and now it's 3 on average.

972: while vanilla bots turn using all eyes by a factor of 5 (against -4 -3 -2 -1 - 1 2 3 4), half I sampled were using a factor of ~16. The sim is bigger than 32k x 32k.

973: they dropped a bit of max speed. It was 100 and now it's ~85.

974: the % they gave to their offspring was 50 and I had bots that went on both directions, from 44 to 77.

975: no changes on venom: ~100 units max.

976: all but one were producing a bit more poison, from 100 to ~110.

977: no changes on slime: ~300 units max.

978: most of them were producing 120-140 shell units max, when they started with 100 only.

979: no big changes to the body management threshold, started with 5000 and all were ~4955.

980: the extra width for eye1 and eye9 was 30 and now there's values in the range 30 - 5.

981: the amount stored for body feeding was -500 and now it's ~-525.

982: the vshoot was 10, and now most have deactivated virus shooting.  

983: the settling threshold started at 30 and now was all through the range 30-9.

I sampled only bots that were at least 300 cycles old. If the birth tie breaks early they default part of the racial memory, but when they find an older bot -a survivor- they copy its values with some random variation.

23
Suggestions / Average memory values
« on: December 15, 2007, 06:44:32 PM »
I was sampling by hand some LF6 which finally seem to be evolving and thought it would be easier if the app just gave me the average for a given memory location.

A simple console command to introduce the memory location and output the global average for that species would be enough.

24
Internet Mode Commentary / The State of the Simulation
« on: December 14, 2007, 09:55:23 AM »
Open topic for updates about what's going on in the IM sims.

Multiply is ruling with Lionfish 5.x subversions going up and down. And stickerbush is still the king of the green hill.

25
The Gene depository / Smooth population control
« on: December 08, 2007, 11:55:51 PM »
Smoother than drycutting at a constant value:

Code: [Select]
cond
*.totalmyspecies 10 div 1 floor rnd 1 =
start
50 .repro store
stop

You may wanna drop in the usual energy/body thresholds.

26
Suggestions / Hash hacking shot
« on: November 30, 2007, 01:11:34 PM »
A non intrusive addon for current DB 2 which maybe would make happy metabolism people.

This would use the organism's hash -that riddled string stored at the end of saved bots-. You know, digesting something more often than less is about finding the right wrench to disassemble their stuff, which actually reflects the DNA structure in an (un)hashed fashion.

So, we could assign a few of the first hash characters to some traits. Like, the first letter to energy, the second to body, the third to shell, and so on.

Then, we'd have the hash hacking shot or... well, the enzymatic shot. This one uses .shootval as the byte code that must match the hash letter. If it's succesfull, eureka! you get something like a 50 .shootval powered shot with the cost of 1. If not, you get nothing. Of course it's gonna be cool for the bot if the rival species never change, once it figured the right enzyme to digest them. But, it isn't going to be so cool if they have lots of mutants, which will live happily and turn back to dominate. Or if actually it's living among many species.

27
Short bots / Lionfish 3 (F1) MacadamiaNuts - 15.11.07
« on: November 15, 2007, 07:05:43 AM »
Sorry for the unreadable madness. I just got used to code DNA this way. I'll explain any piece if someone asks for.

Note: I had to substract 1 to *.thisgene to make somehow a gene delete itself.

Code: [Select]
cond
*.vtimer 0 =
start
*.thisgene .mkvirus store
*.body 100 div .vshoot store
else
0 .delgene store
0 .shoot store
0 .sharenrg store
0 .tieloc store
1 .fixpos *971 1 sub sgn abs mult store
stop

cond
start
*.thisgene 1 sub .delgene store
1 971 *971 sgn 1 sub abs mult store
10000 972 *972 sgn 1 sub abs mult store
100 973 *973 sgn 1 sub abs mult store
1 974 *974 sgn 1 sub abs mult store
500 975 *975 sgn 1 sub abs mult store
stop

cond
start
*972 4 rnd 2 sub add 31900 ceil 972 100 rnd 99 sub 0 floor mult store
*973 4 rnd 2 sub add 5 floor 973 500 rnd 499 sub 0 floor mult store
*974 4 rnd 2 sub add 1 floor 974 500 rnd 499 sub 0 floor mult store
*975 4 rnd 2 sub add 1 floor 975 250 rnd 249 sub 0 floor mult store
*.dnalen 999 *.timer 23 mod sub store
*.dnalen 200 *.timer 146 mod sub store

*.refveldx .dx *.eye5 sgn mult *.refeye *.myeye sub abs sgn mult store

-80 *.eye9 sgn mult -60 *.eye8 sgn mult add -40 *.eye7 sgn mult add -20 *.eye6 sgn mult add 20 *.eye4 sgn mult add 40 *.eye3 sgn mult add 60 *.eye2 sgn mult add 80 *.eye1 sgn mult add .aimsx *.refeye *.myeye sub abs sgn mult store

*.refxpos *.refypos angle .setaim *.refeye *.myeye sub abs sgn mult *.eye5 sgn mult *.refxpos sgn mult *.refypos sgn mult 32000 0 0 dist sub sgn 0 floor mult store
*973 *.mass mult 1 floor *.maxvel ceil *.velup sub .up store
0 .fixpos store

0 .eye5dir store
1200 .eye5width store
1200 rnd .aimshoot *.eye5 sgn 1 sub abs mult store
1200 rnd .aimshoot *.refeye *.myeye sub sgn abs 1 sub abs mult store
.eye4dir .vloc store
.eye6dir .vloc 1 rnd mult store
.eye5dir .vloc 1 rnd mult store
.eye5width .vloc 1 rnd mult store
-600 .venval store

.focuseye .vloc  30 *.eye5 sub sgn 0 floor mult *.refeye *.myeye sub abs sgn mult store
.tieloc .vloc 1 rnd mult  30 *.eye5 sub sgn 0 floor  mult *.refeye *.myeye sub abs sgn mult store
.sharenrg .vloc 1 rnd mult  30 *.eye5 sub sgn 0 floor  mult *.refeye *.myeye sub abs sgn mult store
1 .venval 30 *.eye5 sub sgn 0 floor mult *.refeye *.myeye sub abs sgn mult store

2 .shootval store
50 .shootval *.eye5 65 sub sgn 0 floor mult *.nrg 300 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult store
-3 .shoot *.nrg 1000 sub sgn 0 floor mult store
-6 .shoot *.refeye *.myeye sub abs sgn mult *.eye5 50 sub sgn 0 floor mult store
-1 .shoot *.refeye *.myeye sub abs sgn mult *.refnrg *.refbody 10 mult sub sgn 0 floor mult *.eye5 50 sub sgn 0 floor mult store
.shoot .vloc *.refeye sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult *.vtimer 2 div abs sgn 1 sub abs mult store
.fixpos .vloc *.refeye sgn 1 sub abs mult *.eye5 55 sub sgn 0 floor mult *.vtimer 2 div abs sgn 1 sub abs mult 1 rnd mult store
1 .venval *.refeye sgn 1 sub abs mult *.eye5 55 sub sgn 0 floor mult *.vtimer 2 div abs sgn 1 sub abs mult store

77 .tie *.refeye *.myeye sub abs sgn mult *.eye5 50 sub sgn 0 floor mult *.refage sgn mult store
500 .fixlen store
40 .stifftie store

*.tiepres .tienum store
.tieval .tieloc store
.fixpos .tieloc 1 rnd mult store
1 .tieval store

1 .fixpos *.refeye *.myeye sub abs sgn mult *.eye5 65 sub sgn 0 floor mult store
1256 rnd .setaim *.body *972 sub sgn 0 floor mult *.nrg 2 mult *972 sub sgn 0 floor mult store
*974 .repro *.body *972 sub sgn 0 floor mult *.nrg 2 mult *972 sub sgn 0 floor mult store
*975 *.venom sub .strvenom *.nrg 300 sub sgn 0 floor mult store

.shoot .ploc store
1 .strpoison *.nrg 500 sub sgn 0 floor mult store
10 .strbody *.nrg 5000 sub sgn 0 floor mult store
10 .fdbody 500 *.nrg sub sgn 0 floor mult *.body sgn mult store
*.waste .shootval *.waste 100 div abs mult store
-4 .shoot *.waste 100 div abs sgn mult store

100 .sharenrg *972 100 add *.body sub sgn 0 floor mult *.robage 100 sub sgn 0 floor mult store
99 .shareslime store
*.mass .mkslime *.nrg 300 sub sgn 0 floor mult store
1 .shareshell *.shell 100 sub sgn 0 floor mult store

*.in1 .out1 store
*.in2 .out2 store
*.in3 .out3 store
*.in4 .out4 store
*.in5 .out5 store

.memloc .memloc store
*.memval .memloc *53 sgn mult store
*.memval 53 store
*.memval *53  *53 sgn mult store
stop

28
Bugs and fixes / mkpoison and xpos RESOLVED 2.43t
« on: November 08, 2007, 01:16:40 PM »
Duh, during a recent run with 43o, my bots didn't seem to be making any poison. I didn't go deep to see if it was a display problem or if they really weren't poisoning when hit.

Also, while ypos was returning the right value, xpos was always 0.

29
Simulation Emporium / The Zen Challenge
« on: October 21, 2007, 11:39:09 AM »
I'm setting up challenges when I'm not even running them myself... well I promise I'll try this one. As long as the English literature classes let me.  

These are the conditions for the Zen Challenge:

- The code size must not be over 256 bytes -comments excluded. Which is like:

xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx

- You shall not use any constant values apart of the sysvar you are storing in.
- You shall not use flow commands, and you cannot do operations to the sysvar you are storing in (no 1G mults on the sysvar).

So this is fine:

*.eye5 .shootval store
*.tiepres *.mass sgn sub abs mult .tie store

(sorry, mass was the first sysvar that come to my mind)

but not:

1 .tie *.tiepres 1 sub abs mult store

30
Suggestions / Virus, DNA hack instead of append
« on: September 26, 2007, 02:25:06 PM »
Saying in the other thread about slime deprecated by antivirus genes as virus defense, I thought about dropping this idea:

Virus could be inserted anywhere before a cond statement, where they would execute as a normal cond and they would make the next "cond-stop" block to be ignored -as real viruses fool the protein production to produce their own proteins instead. The virus would insert the picked gene with its "cond" turned into "hack". Like:

hack
etc etc =
start
etc etc store
stop

When referring to gene x, hacks and ignored genes would count as one. Using .delgene would both delete the virus and the gene. .mkvirus would pick only the hack, if any. Also, the .delgenes sysvar would be locked to 0 during the hack execution -I actually find that virus "eating" DNA is rather cheap and uninteresting.

To get rid of viruses that went through the slime defense, a bot would run:

x .repair store

which would delete one hack at once from gene x.

Bots could use a sumcheck to detect the hacked genes and repair them, but that means that the virus would be run at least once. Or forever if the virus happened to hack the repair gene.  

Also, hand made bots could come with hacks and repairs to modify its own DNA on special events, or to undo mutations. To make this mutation repair last long, I would add a .duplicate sysvar, that would place a copy of the gene above it, as a hack. If the mutation harms somehow the sumcheck, the bot can peel off the mutated hack, then duplicate again the copy of the gene that was inactive.

Pages: 1 [2] 3 4