Author Topic: Lionfish 3 (F1) MacadamiaNuts - 15.11.07  (Read 1207 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
    • http://www.franontanaya.com/blog/
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
« Last Edit: November 15, 2007, 07:08:25 AM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Lionfish 3 (F1) MacadamiaNuts - 15.11.07
« Reply #1 on: November 15, 2007, 10:29:41 AM »
Quote from: MacadamiaNuts
Note: I had to substract 1 to *.thisgene to make somehow a gene delete itself.

Else sections appear to increment the gene counter on which thisgene is built.  I think this is so you can see in the gene activations dialog which part of the gene actually fired.  This has the effect of making actual genenumber N higher than you would otherwise expect where N is the number of Else statements in preceeding genes.  I'll take a look and do some noddling and see what can/should be done about this.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Lionfish 3 (F1) MacadamiaNuts - 15.11.07
« Reply #2 on: November 15, 2007, 04:38:08 PM »
The reasoning was that the start or else block is the gene, and a cond is just a controller for multiple genes.  For instance, you could have a gene structure like this:

cond
...
start
...
else
...
start
...
start
...

And the program would act like this was 4 genes being controlled by a single cond statement.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Lionfish 3 (F1) MacadamiaNuts - 15.11.07
« Reply #3 on: May 02, 2014, 02:49:52 PM »
Moving to SB.