Darwinbots Forum

Bots and Simulations => DNA - General => DNA Tools => Topic started by: Gobo on December 01, 2007, 01:57:40 PM

Title: Sanger is good for your 1S bots
Post by: Gobo on December 01, 2007, 01:57:40 PM
Inspired with Maca's Nano (http://www.darwinbots.com/Forum/index.php?showtopic=2009), I decided to write my own 1S bot with innovative (as I thought) idea. But then it appeared, that Maca implemented this idea ealier in Animal Archaea (http://www.darwinbots.com/Forum/index.php?showtopic=2202)
Nevertheless, there is a proof of concept.

Nanobacter independens
Code: [Select]
always {
    *.eye5 > 0 && *.myeye == *.refeye && .aimdx
            || *.eye5 > 30 && .shoot
            || *.refeye != *.myeye && *.eye6 != *.eye4 && .aimdx
            || *.nrg > 20000 && .repro
            || *.vel < 30 && .up
        = *.eye5 > 0 && *.myeye == *.refeye && 31
                || *.eye5 > 30 && -1
                || *.refeye != *.myeye && *.eye6 - *.eye4
                || *.nrg > 20000 && 30
                || 30 - *.vel;
}
There is compiled DNA.
Code: [Select]
start

*.eye5 sgn sqr *.myeye *.refeye sub sgn abs -- abs mult 31 mult
dup sgn abs -- abs *.eye5 30 sub sgn sqr -1 mult mult add
dup sgn abs -- abs *.refeye *.myeye sub sgn abs *.eye6 *.eye4 sub mult mult add
dup sgn abs -- abs *.nrg 20000 sub sgn sqr 30 mult mult add
dup sgn abs -- abs 30 *.vel sub mult add

*.eye5 sgn sqr *.myeye *.refeye sub sgn abs -- abs mult .aimdx mult
dup sgn abs -- abs *.eye5 30 sub sgn sqr .shoot mult mult add
dup sgn abs -- abs *.refeye *.myeye sub sgn abs *.eye6 *.eye4 sub sgn abs mult .aimdx mult mult add
dup sgn abs -- abs *.nrg 20000 sub sgn sqr .repro mult mult add
dup sgn abs -- abs 30 *.vel sub sgn sqr .up mult mult add

store

stop