Author Topic: Animal_Archaea (SS)(MacadamiaNuts) - 10.08.2007  (Read 1609 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
    • http://www.franontanaya.com/blog/
Animal_Archaea (SS)(MacadamiaNuts) - 10.08.2007
« on: August 10, 2007, 01:01:58 PM »
A new one store bot with a different approach. This one can live forever. It can be expanded to include any kind of genes, with the only restriction of one operation per cycle and top genes having priority always over lower genes:

Code: [Select]
'Animal_Archaea 1.0
 'Author: MacadamiaNuts, 10.08.2007
 'Description: 1S bot for ecosims -it doesn't kill veggies-. It calculates first the value, any else genes are false once the first one true is found. Then it uses the same 1G conditions to drop the proper sysvar into the stack. It consumes 0.10-0.05 energy per cycle with F1 costs.
 
 start
 
 'VALUE BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 600 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 50 *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 *.tiepres *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 95 *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 1 *.numties sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 100 *.eye5 sub 2 div abs 1 add 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 10 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'SYSVAR BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 .eye5width 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 .repro *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .deltie *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .sharenrg *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .tie *.numties sgn ~ abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .up 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .strbody 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'STORE
 
 store
 stop
« Last Edit: March 28, 2008, 09:59:36 PM by Numsgil »
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
    • http://www.franontanaya.com/blog/
Animal_Archaea (SS)(MacadamiaNuts) - 10.08.2007
« Reply #1 on: August 11, 2007, 11:35:46 AM »
Renamed to something cooler.

This bot must be great for evosims. Any badly placed change would render it totally useless.
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
    • http://www.franontanaya.com/blog/
Animal_Archaea (SS)(MacadamiaNuts) - 10.08.2007
« Reply #2 on: August 12, 2007, 04:01:26 PM »
Just a sample of how this kind of bots evolve. I placed it on a sim with costs against extra conds, stores or logical operators, and point mutations disabled. I tried to sort it more or less how it was at start.

This is after 767,000 cycles, 290,000 bots born, generation 522, overall mutations 59.

It's too messy to read through it, but it's interesting how unlike the value genes, the sysvar ones are almost intact. I think 59 overall mutations after 522 generations may be low, even with point mutations disabled.

Code: [Select]
start

'VALUE BLOCK

and
 <
 0

*-1013 dup mod sgn abs 1 sub
600 600 *.eye5width sub sgn

sgn 1 sub abs
50 *.nrg 1000 sub sgn 0 sub *.eye5 50 mult floor != sgn 0 floor mult *.body 244 sub 0 floor mult
mult sgn dup add

*.numties *.tiepres rnd sub 1 sgn mult 500 floor 0 sgn sub *.trefnrg mult
mult add

dup sgn sgn
1 ~ *.numties 95 abs sub mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
mult *

dup abs -4 sub abs
1 *.numties sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult sgn *.refeye *.myeye sub *.trefnrg 750 mult sub sgn sgn -3 mult
mult

sub sgn
100 *.eye5 sub 2 div abs 1 *.vel floor sgn < 1 sub add sgn dup add mult
mult abs

1 sub abs
10 298 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
mult add

'SYSVAR BLOCK

0

dup abs 1 sub abs
535 600 *.eye5width sub sgn mult
mult add

dup sgn
300 abs sub 1 abs *.nrg 1000 sub < sgn 0 floor mult 43 *.eye5 sub sgn 0 sub sgn 0 floor mult
mult add

dup < 1 abs sgn sub or abs
467 *.numties *.trefnrg sub sgn 0 floor mult
mult add

dup sgn sgn 1 sub abs
830 *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor < mult
mult add

dup sgn abs -1 sub abs
330 *.numties sgn and ~ abs mult *.eye5 50 sub 708 mult floor 0 sgn < *.myeye sgn sub and abs *.trefnrg sub sgn 0 floor mult
mult add

dup sgn 1 or abs sub abs
1 10 *.vel sub sgn 0 floor mult
mult add

dup sgn abs 1 sub
313 260 *.body sub < sgn 1 floor mult *.nrg 1000 sub sgn 0 floor mult
mult add

store
cond
Sometimes you win, and sometimes you lose...