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

Pages: 1 2 [3]
31
DNA - General / Defvars with same name as sysvars
« on: April 15, 2007, 07:23:25 AM »
I see in Blue on Blue that Jez defined a variable aimright, which can be used the same way as aimdx. When you define a variable that way, what happens? Are you no longer able to access the sysvar by its name? Or does it just not work?

32
F1 bots / Etch (F1)(Vir)(abyaly)-10.04.2007
« on: April 10, 2007, 10:19:46 PM »
Code: [Select]
'Etch
'Dirty F1 virus bot by abyaly
'For version 2.43
'April 10, 2007


def safety 940
def nacho 1234
def id 5674
def rrr 942
def status 53
def ally 1
def veggie 2
def enemy 3

cond
'Initializing....
  *.robage 0 =
start
  .tie inc
  140 .eye5width store
  .nacho .safety store
  2 .mkvirus store
  .id .out5 store
  .shoot .ploc store
  100 rnd .rrr store
stop

cond
'Deadly virus!
  *.safety .nacho !=
start
  *.maxvel .dn *.robage -- abs sgn -- - mult store
  50 .repro store
  317 .aimdx store
  *.body .fdbody store
  .strpoison inc
  .shoot .ploc store
  *.tiepres .deltie store
stop

cond
'aim at what parent was looking at before it reproduced
  *.robage 1 =
start
  .deltie inc
  314 .aimdx store
stop

cond
'nothing interesting? run away!
  *.robage 2 =
  *.eye5 0 =
  *.in5 .id = or
start
  *.maxvel .dn store
stop

cond
'I see something..   what is it?
  *.eye5 0 >
start
'Oh, you. Hi again, I guess.
  .ally
*.in5 .id sub sgn abs -- - mult
*.refbody 5 sub - sgn abs
*.refkills sgn -- - add sgn mult
*.refshell sgn -- - mult
*.refslime sgn -- - mult
*.refshoot 3 sub sgn abs -- - mult
  .status store

'Its a veggie! Let's eat it!
  .veggie .status
*.status .ally sub sgn abs mult
*.refshoot sgn -- - mult
*.refaimsx sgn -- - mult
*.refshell sgn -- - mult
*.refslime sgn -- - mult
*.refvenom sgn -- - mult
*.refkills sgn -- - mult
*.refeye sgn -- - mult
*.refup sgn -- - mult
  store

'You're not my race and you're not food.. you must be trying to kill me!
  .enemy .status
*.status .ally sub sgn abs mult
*.status .veggie sub sgn abs mult
  store
stop

cond
'Let's spin around and move until we see something interesting
  *.status .ally =
  *.eye5 0 = or
  *.robage 2 >
start
  317 .aimdx store
  *.robage dup 2 mod add 4 mod 2 mult
  .up *.robage 2 mult 4 mod sgn 3 mult add store
stop

cond
'You're not an ally, so I need to aim at you accurately
  *.eye5 0 >
  *.status .ally !=
  *.robage 1 >
start
  *.refxpos *.refypos angle .setaim store
  *.refvelup 80 *.eye5 sub add *.velup abs - floor .up store
  *.refveldx .dx store
stop

cond
'You're poisonous! Shooting you could be dangerous, so I need to fix that.
  *.eye5 50 >
  *.status .ally !=
  *.refpoison 0 >
start
  -3 .shoot store
  *.venom .strvenom store
  *.venom .shootval store
  .strpoison .vloc store
  -1000 .venval store
stop

cond
'Let's eat the veggie and infect it so enemies cant eat it.
  *.eye5 70 >
  *.status .veggie =
  *.refpoison 0 =
start
  -1 .shoot store
  .vshoot *.vtimer 1 sub sgn abs -- - mult inc
stop

cond
'You're an enemy, so you must die!
  *.eye5 50 >
  *.status .enemy =
  *.refpoison 0 =
start
  .shootval *.robage *.rrr add 5 mod 0 sub sgn abs -- - mult
  .mkslime  *.robage *.rrr add 5 mod 1 sub sgn abs -- - mult add
  .mkshell  *.robage *.rrr add 5 mod 2 sub sgn abs -- - mult add
  .strvenom *.robage *.rrr add 5 mod 3 sub sgn abs -- - mult add
  .fixpos   *.robage *.rrr add 5 mod 4 sub sgn abs -- - mult add
  .shoot store
  10000 .shootval store
stop

cond
'Boring maintenance
start
  *.body .fdbody store
  10 *.venom sub 0 floor .strvenom store
  5 *.poison sub 0 floor .strpoison store
  *.tiepres dup sgn abs .deltie mult store
  0 .fixpos *.fixed mult store
stop

cond
'At two cycles, I'm now old enough to reproduce.
  *.nrg 1000 >
  *.robage 2 >
start
  50 .repro store
  317 .aimdx store
stop

33
Single store / One Man Bucket (SS)(F2)(abyaly)-03.04.07
« on: April 03, 2007, 09:34:55 AM »
Code: [Select]
'One Man Bucket
'Single Store bot by abyaly
'For version 2.43
'03-04-07



'I probably haven't optimized several of
'these values, but they aren't that interesting
'
'Memloc and value for conspec ident
def mem 941
def id 3211
'Amount of waste to accumulate before expelling it
def wasteval 1000
'attack distance
def eyerange 30
'age for non-initialization actions
'(lowering this number without removing init
'actions may cause strange things to happen)
def startage 4
'amount of shell to make
def shellsize 300
'amount of energy to gain before making shell
def shellthres 700
'eye width for eye5 placed during init.
def eyewidth 140

cond
start
.id
  *.robage 0 sub abs sgn -- abs mult
'no add for first one

.id
  *.robage 1 sub abs sgn -- abs mult
add

.id
  *.robage 2 sub abs sgn -- abs mult
add

.mem
  *.robage 3 sub abs sgn -- abs mult
add

.eyewidth
*.robage 4 sub abs sgn -- abs mult
add

99
  *.robage .startage sub sqr sgn mult
  *.paralyzed 0 sub sqr sgn mult
  *.nrg 50 sub sqr sgn mult
add

*.maxvel
  *.robage .startage sub sqr sgn mult
  *.paralyzed 0 sub sqr sgn mult
  *.nrg 50 sub sqr sgn -- abs mult
add

100
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn mult
  *.nrg 500 sub sqr sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
add

-4
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn mult
  *.shootval *.waste sub abs sgn -- abs mult
add

*.waste
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn mult
  *.shootval *.waste sub abs sgn mult
add

*.refvelup
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn -- abs mult
add

*.refxpos *.refypos angle
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn mult
  *.robage 2 mod 1 sub abs sgn -- abs mult
add

-6
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn -- abs
  *.robage 2 mod 1 sub abs sgn add sgn mult
add

*.refxpos *.refypos angle
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn mult
  *.robage 2 mod 1 sub abs sgn -- abs mult
add

10
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn -- abs
  *.robage 2 mod 1 sub abs sgn add sgn mult
  *.refvelup -5 sub - sqr sgn -- abs mult
add

300
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.velscalar 0 sub sqr sgn
  *.numties 0 sub abs sgn add sgn
  *.robage 20 mod 0 sub abs sgn add sgn mult
add

100
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.velscalar 0 sub abs sgn -- abs mult
  *.numties 0 sub abs sgn -- abs mult
  *.robage 20 mod 0 sub abs sgn -- abs mult
add

300
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn mult
  *.eye5 0 sub abs sgn -- abs mult
add

100
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn -- abs mult
  *.body 1000 sub - sqr sgn mult
  *.eye5 0 sub abs sgn -- abs mult
add

50
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn -- abs mult
  *.body 1000 sub - sqr sgn -- abs mult
  *.eye5 0 sub abs sgn -- abs mult
add
'---------------------------------------------------
.tie
  *.robage 0 sub abs sgn -- abs mult
'no add for first one

.deltie
  *.robage 1 sub abs sgn -- abs mult
add

.mem
  *.robage 2 sub abs sgn -- abs mult
add

.memloc
  *.robage 3 sub abs sgn -- abs mult
add

.eye5width
*.robage 4 sub abs sgn -- abs mult
add

.repro
  *.robage .startage sub sqr sgn mult
  *.paralyzed 0 sub sqr sgn mult
  *.nrg 50 sub sqr sgn mult
add

.dn
  *.robage .startage sub sqr sgn mult
  *.paralyzed 0 sub sqr sgn mult
  *.nrg 50 sub sqr sgn -- abs mult
add

.mkshell
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn mult
  *.nrg 500 sub sqr sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
add

.shoot
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn mult
  *.shootval *.waste sub abs sgn -- abs mult
add

.shootval
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn mult
  *.shootval *.waste sub abs sgn mult
add

.up
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn -- abs mult
add

.setaim
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn mult
  *.robage 2 mod 1 sub abs sgn -- abs mult
add

.shoot
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refvelup 5 sub - sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn -- abs
  *.robage 2 mod 1 sub abs sgn add sgn mult
add

.setaim
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn mult
  *.robage 2 mod 1 sub abs sgn -- abs mult
add

.up
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn mult
  *.eye5 .eyerange sub sqr sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.refage 2 sub sqr sgn mult
  *.refxpos *.refypos angle *.aim sub abs sgn -- abs
  *.robage 2 mod 1 sub abs sgn add sgn mult
  *.refvelup -5 sub - sqr sgn -- abs mult
add

.aimdx
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.velscalar 0 sub sqr sgn
  *.numties 0 sub abs sgn add sgn
  *.robage 20 mod 0 sub abs sgn add sgn mult
add

.dn
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.memval .id sub abs sgn -- abs mult
  *.eye5 0 sub sqr sgn mult
  *.velscalar 0 sub abs sgn -- abs mult
  *.numties 0 sub abs sgn -- abs mult
  *.robage 20 mod 0 sub abs sgn -- abs mult
add

.aimdx
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn mult
  *.eye5 0 sub abs sgn -- abs mult
add

.strbody
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn -- abs mult
  *.body 1000 sub - sqr sgn mult
  *.eye5 0 sub abs sgn -- abs mult
add

.repro
  *.robage .startage sub sqr sgn mult
  .shellsize *.shell sub sqr sgn -- abs
  *.nrg .shellthres sub sqr sgn -- abs add sgn mult
  *.paralyzed 0 sub abs sgn -- abs mult
  *.waste .wasteval sub sqr sgn -- abs mult
  *.nrg 1000 sub - sqr sgn -- abs mult
  *.body 1000 sub - sqr sgn -- abs mult
  *.eye5 0 sub abs sgn -- abs mult
add
store
stop

And here is the same bot except using mutually exclusive COND blocks
Code: [Select]
'One Man Bucket (Extended)
'Single Store bot by abyaly
'In expanded form
'For version 2.43
'03-04-07





'I probably haven't optimized several of
'these values, but they aren't that interesting
'
'Memloc and value for conspec ident
def mem 941
def id 3211
'Amount of waste to accumulate before expelling it
def wasteval 1000
'attack distance
def eyerange 30
'age for non-initialization actions
'(lowering this number without removing init
'actions may cause strange things to happen)
def startage 4
'amount of shell to make
def shellsize 300
'amount of energy to gain before making shell
def shellthres 700
'eye width for eye5 placed during init.
def eyewidth 140

cond
*.robage 0 =
start
.id .tie store
stop

cond
*.robage 1 =
start
.id .deltie store
stop

cond
*.robage 2 =
start
.id .mem store
stop

cond
*.robage 3 =
start
.mem .memloc store
stop

cond
*.robage 4 =
start
.eyewidth .eye5width store
stop

cond
*.robage .startage >
*.paralyzed 0 >
*.nrg 50 >
start
99 .repro store
stop

cond
*.robage .startage >
*.paralyzed 0 >
*.nrg 50 <=
start
*.maxvel .dn store
stop

cond
*.robage .startage >
.shellsize *.shell >
*.nrg 500 >
*.paralyzed 0 =
start
100 .mkshell store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval >
*.shootval *.waste =
start
-4 .shoot store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval >
*.shootval *.waste !=
start
*.waste .shootval store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 .eyerange >
*.memval .id !=
*.refage 2 >
*.refvelup 5 >=
start
*.refvelup .up store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 .eyerange >
*.memval .id !=
*.refage 2 >
*.refvelup 5 <
*.refxpos *.refypos angle *.aim !=
*.robage 2 mod 1 =
start
*.refxpos *.refypos angle .setaim store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 .eyerange >
*.memval .id !=
*.refage 2 >
*.refvelup 5 <
*.refxpos *.refypos angle *.aim =
*.robage 2 mod 1 != or
start
-6 .shoot store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 .eyerange <=
*.eye5 0 >
*.memval .id !=
*.refage 2 >
*.refxpos *.refypos angle *.aim !=
*.robage 2 mod 1 =
start
*.refxpos *.refypos angle .setaim store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 .eyerange <=
*.eye5 0 >
*.memval .id !=
*.refage 2 >
*.refxpos *.refypos angle *.aim =
*.robage 2 mod 1 != or
*.refvelup -5 >=
start
10 .up store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 0 >
*.memval .id =
*.velscalar 0 >
*.numties 0 != or
*.robage 20 mod 0 != or
start
300 .aimdx store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.eye5 0 >
*.memval .id =
*.velscalar 0 =
*.numties 0 =
*.robage 20 mod 0 =
start
100 .dn store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.nrg 1000 <
*.eye5 0 =
start
300 .aimdx store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.nrg 1000 >=
*.body 1000 <
*.eye5 0 =
start
100 .strbody store
stop

cond
*.robage .startage >
.shellsize *.shell <=
*.nrg .shellthres <= or
*.paralyzed 0 =
*.waste .wasteval <=
*.nrg 1000 >=
*.body 1000 >=
*.eye5 0 =
start
50 .repro store
stop

34
Veggies / Prickly_Alga (Veg)(Abylaly)-02.04.07
« on: April 02, 2007, 08:54:02 AM »
Code: [Select]
' Prickly_Algae
' Inedible Vegetable by abyaly

cond
start
  *.maxvel .dn *.robage -- abs sgn -- - mult store
  50 .repro store
  315 .aimdx *.robage sgn mult store
  *.body .fdbody store
  .strpoison inc
  .shoot .ploc store
  *.tiepres .deltie store
stop
end

35
Bot Tavern / Deadliest Virus -ever-
« on: April 02, 2007, 08:51:12 AM »
Code: [Select]
cond
*.safety .nacho !=
start
  *.maxvel .dn *.robage -- abs sgn -- - mult store
  50 .repro store
  315 .aimdx store
  *.body .fdbody store
  .strpoison inc
  .shoot .ploc store
  *.tiepres .deltie store
stop
If this thing hits a veggie, say goodbye to eating veggies  unless you were specifically prepared for it.
To get normal vegs back you need to wipe these vegs out (which is quite daunting, since their repro is practically a repop event in itself). While watching a bot with zero offensive capabilities (*.refeye 0 = shooting condition) sweep the league using this thing, nothing managed to get normal vegs back. Now I need to add some killing methods to it  

36
Short bots / Aura (1G)(abyaly)-29.03.07
« on: March 29, 2007, 06:23:07 PM »
Code: [Select]
'Aura
 'Antisocial F1/F2 bot by abyaly
 'Uses one very large eye
 
 def bornaim 941
 def IDcheck 946
 def enemy 947
 def ID 1234
 
 cond
 start
 
 314 .setaim *.robage 1 sub sqr sgn mult store
 .out5 inc
 
 *.in5 *.in4 add *.memval add *.refage 10000 mod sub .ID sub sgn abs
 *.in5 *.in4 add *.memval add *.refage 10000 mod sub .ID sub 1 add sgn abs mult .enemy store
 
 .aimdx inc
 
 '**************************************************************
 'avoid conspecs
 '**************************************************************
 *.refxpos *.xpos sub *.refveldx add 10 *.nrg 20 div ceil 5 floor mult
 *.refypos *.ypos sub *.refveldn add dup mult *.refxpos *.xpos sub *.refveldx add dup mult add sqr div
 .sx
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.numties 0 sub sgn abs 1 sub abs mult
   *.enemy 0 sub sgn abs 1 sub abs mult
 store
 
 *.refypos *.ypos sub *.refveldn add 10 *.nrg 20 div ceil 5 floor mult
 *.refypos *.ypos sub *.refveldn add dup mult *.refxpos *.xpos sub *.refveldx add dup mult add sqr div
 .up
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.numties 0 sub sgn abs 1 sub abs mult
   *.enemy 0 sub sgn abs 1 sub abs mult
 store
 
 '**************************************************************
 'eat/chase
 '**************************************************************
 
 -6 3 4 add
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refxpos *.refypos dist 150 div -1 mult .shootval
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refxpos *.refveldx *.veldx add 2 mult add
 *.refypos *.refveldn *.velup add 2 mult add
 angle - *.aim add .aimshoot
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refveldx *.refveldx *.refxpos *.xpos sub mult
 *.refveldn *.refypos *.ypos sub mult add
 *.refxpos *.xpos sub dup mult
 *.refypos *.ypos sub dup mult add div
 *.refxpos *.xpos sub mult sub .dx
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refveldn *.refveldx *.refxpos *.xpos sub mult
 *.refveldn *.refypos *.ypos sub mult add
 *.refxpos *.xpos sub dup mult
 *.refypos *.ypos sub dup mult add div
 *.refypos *.ypos sub mult sub .dn
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refxpos *.xpos sub 97 *.eyef sub 40 ceil mult
 *.refypos *.ypos sub dup mult *.refxpos *.xpos sub dup mult add sqr div - .sx
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 *.refypos *.ypos sub 97 *.eyef sub 40 ceil mult
 *.refypos *.ypos sub dup mult *.refxpos *.xpos sub dup mult add sqr div - .up
   *.robage 1 sub sqr sgn mult
   *.eyef 0 sub sqr sgn mult
   *.enemy 0 sub sqr sgn mult
 store
 
 '**************************************************************
 'misc
 '**************************************************************
 'ties
 *.tiepres .deltie
   *.robage 1 sub sqr sgn mult
   *.numties 0 sub sqr sgn mult
 store
 
 'body & nrg
 *.nrg *.body sub 2 div 10 mult .strbody
   *.nrg *.body sub sqr sgn mult
 store
 *.body *.nrg sub 2 div .fdbody
   *.body *.nrg sub sqr sgn mult
 store
 
 'shell
 *.body *.shell sub 0 floor .mkshell
   *.body *.shell sub sgn abs mult
 store
 
 'waste
 -4 3 4 add
   *.waste 100 sub sqr sgn mult
 store
 *.waste .shootval
   *.waste 100 sub sqr sgn mult
 store
 
 'antiviral
 .delgene inc
 .delgene inc
 
 '**************************************************
 'repro1
 '**************************************************
 4 rnd 100 mult *.bornaim add .setaim
   *.robage 1 sub sqr sgn mult
   *.eyef sgn 1 sub abs mult
 store
 
 4 rnd 100 mult *.bornaim add .bornaim
   *.robage 1 sub sqr sgn mult
   *.eyef sgn 1 sub abs mult
 store
 
 50 .repro
   *.robage 1 sub sqr sgn mult
   *.eyef sgn 1 sub abs mult
 store
 
 '**************************************************
 'repro2
 '**************************************************
 4 rnd 100 mult *.bornaim add .setaim
   *.robage 1 sub sqr sgn mult
   60 *.eyef sub sqr sgn mult
   *.nrg 10000 sub sqr sgn mult
   *.body 10000 sub sqr sgn mult
 store
 
 4 rnd 100 mult *.bornaim add .bornaim
   *.robage 1 sub sqr sgn mult
   60 *.eyef sub sqr sgn mult
   *.nrg 10000 sub sqr sgn mult
   *.body 10000 sub sqr sgn mult
 store
 
 50 .repro
   *.robage 1 sub sqr sgn mult
   60 *.eyef sub sqr sgn mult
   *.nrg 10000 sub sqr sgn mult
   *.body 10000 sub sqr sgn mult
 store
 
 '**************************************************
 'born
 '**************************************************
 1 .tie *.robage sgn 1 sub abs mult store
 1220 .eye1width *.robage sgn 1 sub abs mult store
 1220 .eye2width *.robage sgn 1 sub abs mult store
 1220 .eye3width *.robage sgn 1 sub abs mult store
 1220 .eye4width *.robage sgn 1 sub abs mult store
 1220 .eye5width *.robage sgn 1 sub abs mult store
 1220 .eye6width *.robage sgn 1 sub abs mult store
 1220 .eye7width *.robage sgn 1 sub abs mult store
 1220 .eye8width *.robage sgn 1 sub abs mult store
 1220 .eye9width *.robage sgn 1 sub abs mult store
 9 rnd 4 sub .focuseye *.robage sgn 1 sub abs mult store
 
 .IDcheck .memloc
   *.memloc .IDcheck sub sgn abs mult
 store
 
 500 rnd .IDcheck *.robage sgn 1 sub abs mult store
 500 rnd .out4 *.robage sgn 1 sub abs mult store
 
 .ID *.IDcheck sub *.out4 sub .out5 1 add .out5
   *.robage sgn 1 sub abs mult
 store
 
 *.aim 628 add 1256 mod .bornaim
   *.robage sgn 1 sub abs mult
 store
 
 1 .deltie
   *.robage 1 sub abs sgn 1 sub abs mult
 store
 
 '**************************************************
 'ID correction
 '**************************************************
 .ID *.IDcheck sub *.out4 sub *.robage 10000 mod add .out5
   *.out5 *.out4 *.IDcheck add add *.robage 10000 mod sub .ID sub sgn abs mult
 store
 
 stop

37
Bugs and fixes / Bugs in 2.43
« on: March 26, 2007, 09:45:57 AM »
In the bot info panel, shell is displayed as slime.


Also,  
~ *.eye5 VOID floor & |
Is sometimes getting added onto the end of the DNA some bot children when this bot repros. I have only been able to produce this bug when running a league. The bug will not reoccur if I load the bugged sim.
It occurs in every match, unless it gets wiped out too fast to do much repro.

38
Newbie / Hello
« on: March 24, 2007, 07:15:43 PM »
I realized I forgot to say hi thread before, so im making a belated hi now. Hello. btw, I like the new version now

39
Bot Tavern / Shell, Venom, and Body Shots
« on: September 12, 2006, 08:18:52 PM »
Could someone tell me how to determine if a body shot or venom shot will be effective against a shelled bot and how to determine how much shell erodes when a bot is attacked?

40
Suggestions / Torroidal sims
« on: June 03, 2006, 07:12:24 PM »
In future versions, it would be great if bot sight continued to the other side of the map in torroidal sims. And if bots (especially multibots) didn't "pop" over to the other side when one of their parts reached the edge.

41
DNA - General / Multibot orientation
« on: May 19, 2006, 12:02:33 PM »
I've noticed that when a bot is part of a multibot, the directions that .up .dn .sx and .dx accelerate are different from what they usually are. How is this orientation decided and how can I alter it?

42
Tips and Tricks / Bot Diffusion
« on: May 04, 2006, 08:49:32 PM »
If your bots are all living together in a lump, it makes your species much less likely to find food, no matter how fast you rotate. So because of that you need a system to help scatter your bots accross the field.
For that purpose, I made the 'diffusion' gene present in the bot Turbo.
Code: [Select]
cond
*.refeye *.myeye =
*.eye5 0 >
start
10 .dx store
314 .aimdx store
stop
The down side is that bots surrounded by conspecs will spend a LOT of energy doing this. The up side is that the bots on the far side of the group will move away from its family.

A problem encountered by this gene is that only the ones on the far end of the mass do very serious diffusing. And if you want the bots to space out more evenly, shouldnt the acceleration be based on the distance? Vector's diffusion is based on this concept.
Code: [Select]
cond
*.eye5 0 >
*.refeye *.myeye =
start
314 .aimdx store
*.maxvel *.vel add *.eye5 mult 50 div 15 ceil .dx store
stop

The diffusion now based on current velocity and distance. The 50 scales down the energy spent, and the 15 puts a cap on how much can be spent per cycle in this way. If you put bots with genes like this into an environment where vegs are scarce, this increases the species survival rate immensely.

43
Short bots / Vector 1.0 (1G)(Abyaly)-04.05.06
« on: May 03, 2006, 10:10:52 PM »
Code: [Select]
'Vector 1.0 by abyaly
'Public SG version
'Communicates the location of food to conspecs
'I will release a legible and commented version once it is finished
'Which will be some time after finals are over ^^

cond
start
 *.refveldx 4 *.eye5 0 sub sqr dup div *.eye5 41 sub -1 mult sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 *.maxvel *.vel sub 1 *.eye5 0 sub sqr dup div *.eye5 41 sub -1 mult sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 *.maxvel *.vel sub 1 *.eye5 0 sub sqr dup div *.eye5 41 sub -1 mult sqr dup div mult *.refeye *.myeye sub dup div 1 sub abs mult *.memval 0 sub sqr dup div *.in1 0 sub sqr dup div add sgn *.in2 0 sub sqr dup div add sgn mult mult store
 *.refveldx 4 *.eye5 0 sub sqr dup div *.eye5 41 sub -1 mult sqr dup div mult *.refeye *.myeye sub dup div 1 sub abs mult *.memval 0 sub sqr dup div *.in1 0 sub sqr dup div add sgn *.in2 0 sub sqr dup div add sgn mult mult store
 *.refvelup 1 *.eye5 sub sqr dup div 40 mult *.refeye *.myeye sub dup div 1 sub abs mult *.memval 0 sub sqr dup div *.in1 0 sub sqr dup div add sgn *.in2 0 sub sqr dup div add sgn mult mult store
 *.refveldx 4 *.eye5 sub sqr dup div 40 mult *.refeye *.myeye sub dup div 1 sub abs mult *.memval 0 sub sqr dup div *.in1 0 sub sqr dup div add sgn *.in2 0 sub sqr dup div add sgn mult mult store
 *.refaim 19 *.eye5 sub sqr dup div 40 mult *.refeye *.myeye sub dup div 1 sub abs mult *.memval 0 sub sqr dup div *.in1 0 sub sqr dup div add sgn *.in2 0 sub sqr dup div add sgn mult mult store
 314 5 *.eye5 0 sub sqr dup div *.refeye *.myeye sub dup div 1 sub abs mult *.in1 0 sub dup div 1 sub abs *.in2 0 sub dup div 1 sub abs mult *.memval 0 sub dup div 1 sub abs mult 9 rnd 0 sub dup div 1 sub abs add sgn mult mult store
 *.maxvel *.vel add *.eye5 mult 50 div 15 ceil 4 *.eye5 0 sub sqr dup div *.refeye *.myeye sub dup div 1 sub abs mult *.in1 0 sub dup div 1 sub abs *.in2 0 sub dup div 1 sub abs mult *.memval 0 sub dup div 1 sub abs mult 9 rnd 0 sub dup div 1 sub abs add sgn mult mult store
 330 *.robage 0 sub dup div 1 sub abs mult inc
 467 *.robage 1 sub dup div 1 sub abs mult inc
 51 *.memloc sgn -1 mult 1 add 474 mult store
 0 51 *51 sgn mult *.eye5 sgn 1 sub abs *.refeye *.myeye sub dup div 1 sub abs add sgn mult store
 1 51 *.eye5 sgn mult *.refeye *.myeye sub dup div mult *.refeye sgn mult store
 800 *.out1 dup div mult dec
 800 *.eye5 sgn mult *.memval sgn *.refeye *.myeye sub dup div add sgn mult inc
 801 *.out2 dup div mult dec
 801 *.eye5 sgn mult *.in1 *.memval add dup div *.refeye *.myeye sub dup div add sgn mult inc
 *.eye1 -4 mult *.eye2 -3 mult *.eye3 -2 mult *.eye4 -1 mult *.eye6 1 mult *.eye7 2 mult *.eye8 3 mult *.eye9 4 mult add add add add add add add add *.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9 add add add add add add add add div 34 mult *.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9 add add add add add add add add dup div *.eye5 sgn 1 sub dup div mult *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult 5 mult store
 330 *.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9 add add add add add add add add dup div 1 sub dup mult *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult 5 mult store
 *.refxpos *.refypos angle 19 *.robage sgn mult *.refeye *.myeye sub dup div mult *.refxpos *.refypos angle *.aim sub dup div mult *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult *.eye5 sgn mult store
 *.shang 314 add 5 *.shdn *.shdx *.shsx add add dup div mult *.refeye *.myeye sub dup div 1 sub dup div *.refeye sgn 1 sub sgn abs add mult store
 100 313 *.nrg 500 sub sqr sgn mult 500 *.body sub sqr sgn mult store
 *.body 0 floor 312 *.body sgn mult 100 *.nrg sub sqr sgn mult store
 *.body 50 sub 0 floor 100 ceil 312 *.body 50 sub sqr sgn mult 800 *.nrg sub sqr dup div mult store
 60 300 30 *.eye4 *.eye5 *.eye6 add add 3 div sub sqr sgn mult *.nrg 600 sub sgn mult store
 100 *.shell sub 0 floor 100 ceil 100 *.shell sub sgn abs 822 mult store
 *.waste 8 *.waste 10 sub sgn mult store
 -4 7 *.waste 10 sub sgn mult store
 -6 7 *.eye5 40 sub sqr dup div *.refeye 0 sub dup div 1 sub abs mult mult store
 4 8 *.eye5 40 sub sqr dup div *.refeye 0 sub dup div 1 sub abs mult mult store
 *.refvelup 1 *.eye5 40 sub sqr dup div *.refeye 0 sub dup div 1 sub abs mult mult store
 *.refveldx 4 *.eye5 40 sub sqr dup div *.refeye 0 sub dup div 1 sub abs mult mult store
 -6 7 *.refshell 20 sub sqr sgn mult *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 4 8 20 *.refshell 20 sub sqr sgn mult *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 -1 7 *0 20 sub sqr sgn 1 sub abs mult *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 32 8 *0 20 sub sqr sgn 1 sub abs mult *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 *.refvelup 1 *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 *.refveldx 4 *.eye5 40 sub sqr dup div *.refeye 0 sub sqr dup div mult *.refeye *.myeye sub dup div mult mult store
 340 inc
 340 inc
end

44
Interesting behaviour bots / Turbo (IB)(F2)(Abyaly)-04.05.06
« on: May 03, 2006, 10:08:38 PM »
'Turbo by abyaly
'Moves very fast by reproducing
'Fully commented
'edit: fixed typo in search algo description


cond
start

'Birth Control
'************************************************************
.tie *.robage 0 sub dup div 1 sub abs mult inc
.deltie *.robage 1 sub dup div 1 sub abs mult inc
'************************************************************



'*************************Navigation*************************
'Search algorithm
'Execution Conditions:
'(Sum(*.eyeX) != 0) (*.eye5 == 0) (*.shdn == 0) (*.shdx == 0) (*.shsx == 0)
'Action:
'.aimdx = 34[-4(*.eye1)-3(*.eye2)-2(*.eye3)-*.eye4+*.eye6+2(*.eye7)+3(*.eye8)+4(*.eye9)]/Sum(*.eyeX)
'************************************************************
*.eye1 -4 mult *.eye2 -3 mult *.eye3 -2 mult *.eye4 -1 mult
*.eye6 1 mult *.eye7 2 mult *.eye8 3 mult *.eye9 4 mult
add add add add add add add add
*.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9
add add add add add add add add div 34 mult
  *.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9
  add add add add add add add add dup div
  *.eye5 sgn 1 sub dup div mult
  *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult
.aimdx mult store
'************************************************************
'Spin
'Execution Conditions:
'(Sum(*.eyeX) == 0) (*.shdn == 0) (*.shdx == 0) (*.shsx == 0)
'Action:
'.aimdx = 350
'************************************************************
350
*.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9
  add add add add add add add add dup div 1 sub dup mult
  *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult
.aimdx mult store
'*************************Navigation Ends********************
'Precision Aiming
'Execution Conditions:
'(*.robage > 0) (*.refeye != *.myeye) (*.refxpos *.refypos angle != *.aim)
'(*.shdn == 0) (*.shdx == 0) (*.shsx == 0)
'Action:
'.setaim = *.refxpos *.refypos angle
'************************************************************
*.refxpos *.refypos angle .setaim
  *.robage sgn mult
  *.refeye *.myeye sub dup div mult
  *.refxpos *.refypos angle *.aim sub dup div mult
  *.shdn *.shdx *.shsx add add dup div 1 sub dup mult mult
  *.eye5 sgn mult
store
'************************************************************
stop
'Diffusion
'************************************************************
cond
*.refeye *.myeye =
*.eye5 0 >
start
10 .dx store
314 .aimdx store
stop
'************************************************************
'Self Cannibalism
'************************************************************
cond
*.nrg 1000 <
*.body 0 >
start
100 *.body ceil .fdbody store
stop
'************************************************************
'Suicide Repro/Follow food
'************************************************************
cond
*.eye5 0 >
*.eye3 50 <
*.eye5 40 <
*.eye4 40 <
*.eye6 40 <
*.eye7 50 <
*.nrg 4000 <
*.refeye *.myeye !=
start
99 .repro store
*.refvel .up store
*.refveldx .dx store
stop
'************************************************************
'Non-Suicidal Repro/Follow food
'************************************************************
cond
*.refeye *.myeye !=
*.eye5 0 >
*.eye3 50 <
*.eye5 40 <
*.eye4 40 <
*.eye6 40 <
*.eye7 50 <
*.nrg 3999 >
start
50 .repro store
*.refvel .up store
*.refveldx .dx store
stop
'************************************************************
'About-Face at age 1
'It isnt 0 so that the birth tie can sever
'If you make the parent self-destruct after
'suicidal repro this is no longer an issue
'************************************************************
cond
*.robage 1 =
start
628 .aimdx store
stop
'************************************************************
'Follow and attack food
'************************************************************
cond
*.eye5 25 >
*.refeye *.myeye !=
start
-6 .shoot store
16 .shootval store
*.refvel .up -1 floor store
*.refveldx .dx store
stop
'************************************************************
'React to being shot
'************************************************************
cond
.shflav -1 =
.shflav -6 = or
*.shup 0 !=
*.shdn 0 != or
*.shdx 0 != or
*.shsx 0 != or
start
*.shang 314 add .aimdx store
stop
'************************************************************
end

45
Suggestions / refdxpos, refuppos, refsxpos, refdnpos
« on: April 27, 2006, 10:21:06 PM »
I was looking through the wiki and though I found refvars for x pos and y pos, I was surprised these werent in there. Since there are no trig functions either, I can't find a way to make bots calculate them accurately.  

Pages: 1 2 [3]