Author Topic: Diatomus Lorius  (Read 3607 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Diatomus Lorius
« on: January 07, 2010, 05:35:16 PM »
Not the best bot ever made, basically a better version of Animal Minimalis. I just wrote this to refresh my DB coding skills, as well as try out a thing or two...

Code: [Select]
def conspec 4291

def head 1
def tail 2


cond
 *.robage 0 =
start
 .conspec dup .out1 store .tout1 store
 .head dup .out2 store .tout2 store
 *.in3 dup .out3 store .tout3 store
 .tie inc
stop

cond
 *.numties 0 =
start
 -32000 32000 rnd dup .out3 store .tout3 store
 50 .repro store
 .tail dup .out2 store .tout2 store
stop

cond
 *.tout1 *.tin1 !=
 *.numties 1 > or
start
 *.tiepres .deltie store
stop
 
cond
 *.tin3 *.tout3 !=
 *.tin3 0 !=
start
 *.tin3 dup .out3 store .tout3 store
stop

start
5 *.velsx sub .sx store
 40 .stifftie store
 50 .tielen store
 *.body 500 sub dup .fdbody store
 - .strbody store
 50 .sharenrg store
 20 *.velup sub .up store
  -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1

*.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5

sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0

floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor

mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9

*.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub

sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub

sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor

mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2

   *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8

*.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6

sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0

floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult

*.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult

*.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3

*.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3

*.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7

*.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7

sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0

floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult

*.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult

*.eye4 *.eye8 sub sgn ++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4

*.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3

sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn

++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++

sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult

*.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4

*.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5

*.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6

sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn

++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn

mult add .focuseye store
stop

cond
 *.in1 *.out1 !=
 *.eye5 40 > and
 *.refshoot 0 >
 *.refshoot 0 =
 *.body 1000 <
 *.refbody 100 > and and or and
start
 *.refxpos *.refypos angle .setaim store
 -6 .shoot store
 *.refxpos .out4 store
 *.refypos .out5 store
 *.timer .out6 store
stop

cond
 *.eyef 0 >
 *.in1 *.out1 !=
 *.refshoot 0 >
 *.refshoot 0 =
 *.refbody 100 > and or and
start
 *.refxpos *.refypos angle .setaim store
 35 *.velup sub .up store
stop

cond
 *.in1 *.out1 =
 *.out2 .head =
 *.in3 *.out3 !=
 *.in2 .tail =
start
 *.refxpos *.refypos angle .setaim store
stop

cond
 *.in6 *.out6 >
 *.in1 *.out1 =
 *.in3 *.out3 !=
start
 *.in4 *.in5 angle .setaim store
stop

cond
 *.eyef 0 =
 *.out6 0 >
start
 *.out4 *.out5 angle .setaim store
stop

cond
 *.tin6 *.tout6 >
start
 *.tin4 dup .tout4 store .out4 store
 *.tin4 dup .tout5 store .out5 store
stop

cond
 *.nrg 8000 >
start
 500 .aimdx store
 *.tiepres .deltie store
stop
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Diatomus Lorius
« Reply #1 on: January 12, 2010, 12:03:17 AM »
btw. anybody noticed the migration-style behaviour? It's very rare, but interesting to watch bots marching in lines into the great unknown (for them at least   )
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan