Poll

good idea

good idea
0 (0%)
needs work
0 (0%)
will help me :)
0 (0%)
not so good
0 (0%)
bad
0 (0%)
N00B
0 (0%)
sux
0 (0%)

Total Members Voted: 0

Author Topic: I flamma killer  (Read 3014 times)

Offline theblaze

  • Bot Builder
  • **
  • Posts: 82
    • View Profile
I flamma killer
« on: October 19, 2009, 05:24:03 AM »
heres the code
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'uses tie feeding
'and shooting
'more to come(I hope)
cond
*.refdn
20
>
start
  1
  *40
  add
  40
  store
stop

cond
*.eye5
0
=
start
  1
  *40
  add
  40
  store
stop

cond
  *.refdn
  20
  >
  start
  100
  .aimdx
  store
stop

cond
  *40
  200
  >
  start
  1
  40
  store
stop

cond
  *.eye1
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  59
  .aimsx
  store
stop

cond
  *.eye2
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  46
  .aimsx
  store
stop

cond
  *.eye3
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  31
  .aimsx
  store
stop

cond
  *.eye4
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  16
  .aimsx
  store
stop

cond
  *.eye5
  0
  >
  *.eye5
  50
  <
  *.refdn
  20
  <
start
  5
  .up
  store
stop

cond
  *.eye5
  49
  >
  *.refdn
  20
  <
  *.refnrg
  500
  >
  *.refshoot
  0
  =
start
  -1
  .shoot
  store
stop

cond
  *.eye5
  49
  >
  *.refdn
  20
  <
  *.refshoot
  0
  >
start
  .dn
  .shoot
  store
  5000
  .shootval
  store
stop

cond
  *.eye5
  49
  >
  *.refdn
  20
  <
  *.refnrg
  500
  <
  *.nrg
  500
  <
  *.refshoot
  0
  =
start
  -1
  .shoot
  store
stop

cond
  *.eye5
  49
  >
  *.refdn
  20
  <
  *.refnrg
  500
  <
  *.nrg
  499
  >
start
  200
  .aimdx
  store
stop

cond
  *.eye6
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  15
  .aimdx
  store
stop

cond
  *.eye7
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  30
  .aimdx
  store
stop

cond
  *.eye8
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  45
  .aimdx
  store
stop

cond
  *.eye9
  0
  >
  *.refdn
  20
  <
  *.eye5
  0
  =
start
  60
  .aimdx
  store
stop

cond
*.eye1
0
=
*.eye2
0
=
*.eye3
0
=
*.eye4
0
=
*.eye5
0
=
*.eye7
0
=
*.eye8
0
=
*.eye9
0
=
*40
100
<
start
  4
  .up
  store
  5
  .aimdx
  store
stop

cond
*.eye1
0
=
*.eye2
0
=
*.eye3
0
=
*.eye4
0
=
*.eye5
0
=
*.eye7
0
=
*.eye8
0
=
*.eye9
0
=
*40
100
>
start
  4
  .up
  store
  5
  .aimsx
  store
stop

cond
  *.nrg
  10000
  >
start
  400
  .aimdx
  store
  20
  .repro
  store
stop

cond
1
0
=
start
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
0
.dn
store
stop

'initialize 1
cond
*.robage 0 =
start
31998 rnd 2 add 55 store
1 .tie store
stop

'initialize 2
cond
*.robage 1 =
start
1 .deltie store
stop

cond
*.eye2 *.eye8 !=
*.eye4 *.eye6 !=
*.eye4 0 >
start
*.eye2 *.eye8 sub .aimsx store
stop

cond
*.eye4 *.eye6 !=
start
*.eye4 *.eye6 sub .aimsx store
stop

cond
*.refeye *.myeye =
start
200 .aimsx store
stop

cond
*.vel 40 <
*.refeye *.myeye !=
start
40 *.vel sub .up store
stop

cond
*.nrg 4000 >
*.eye5 30 <
start
50 .repro store
stop

cond
*.eye5 50 >
*.refpoison 0 =
start
-1 .shoot store
stop

cond
*.eye5 30 >
*.eye4 *.eye6 %=
*.eye5 77 !=
*.refeye *.myeye !=
start
*55 .tie store
*55 .readtie store
stop

cond
*.trefeye *.myeye =
start
*55 .deltie store
stop

cond
*.numties 0 >
start
-1 .tieloc store
-1000 .tieval store
*55 .tienum store
stop

cond
*.slime 100 <
start
50 .mkslime store
stop

end



to do (aka need help with)
create shell
create poison
and the other one

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
I flamma killer
« Reply #1 on: October 21, 2009, 01:12:52 PM »
Are you using the latest version?  The main install on the download site is for 2.1, and sets up all the directories and stuff, but it is ancient to an extreme.  The latest versions (2.44.1+ I believe) have bug fixes and new features (slime, shell, etc.) and the like.  They also allow for more expressive DNA formatting, so it becomes easier to read.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
I flamma killer
« Reply #2 on: October 23, 2009, 09:35:20 AM »
and I flamma is still the most high-profile combat bot...
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
I flamma killer
« Reply #3 on: November 05, 2009, 11:28:33 AM »
It can be a litle confusing to start out using all the tools at once, since it gets hard to tell what is working properly and if it's realy having an effect.

This code beats I_flamma without shell, venom or poison, with just a few simple genes.
Having the basic genes in place goes a long way, and makes it a lot easier to tell if the new tools you're adding are working properly. (Firing shots/venom at someone is useless if you're too small to cause any damage, asf...)
The sysvars page should explain how to use anything in there.

Code: [Select]
'Birth gene
cond
*.robage 0 =
start
*.maxvel .sx store
150 .aimdx store
.deltie inc
stop

'Reproduction and scouting gene
cond
*.eyef 0 =
*.refup *.myup = or
start
*.body 3000 >
140 .aimsx store
30 .repro store
not
5 .sx store
stop

'Attack gene
cond
*.eyef 0 !=
*.refup *.myup !=
*.shflav 0 =
start
*.refxpos *.refypos angle .setaim store
0 .aimshoot store
*.veldx .sx store
*.refvelup 15 add .up store
10 .shootval store
-6 .shoot store
stop

'Growth gene
cond
*.body 2 mult *.nrg <
start
100 .strbody store
stop

'Shrink gene
cond
*.body 2 mult *.nrg >
start
100 .fdbody store
stop

'Counter attack gene
cond
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
30 .shootval store
-6 .shoot store
0 .shflav store
stop

Notice how the counterattack gene would overwrite some of the sysvars used by the attack gene (If both genes could be triggered at the same time that is).
Also the reproduction gene uses an inline condition, which is a seperate set of conditions working "inside" and across the genes. So this means that if body is over 3000, then the next condition (A "not", which is true when body is not above 3000) would be false, and since the boolean is not cleared it will also affect the other genes.
Basicaly, while reproducing the other genes won't work. (If you wanted them to you would use clearbool or true at the end of the gene using inline conditions.)
Personaly I get best results when starting over from scratch, then building a small base that accomplishes it's goal well, then build on that and start over from that point whenever new behaviors don't seem to work properly. If you're building on code that "misbehaves" or doesn't accomplish it's goal well enough, you'll be struggeling with more bugs or failed goals for each new gene you add.
« Last Edit: December 22, 2011, 11:43:20 AM by Shasta »