Author Topic: Tribolisv1.0(F2MB)(Bacillus)5/10/08  (Read 2425 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« on: October 05, 2008, 04:27:49 AM »
This version did pretty well in F2, although it got stuck with ZeeBeeDee 2.1 because they kept ramming all the veggies away   . It did raise an issue with my bot, though, so I'll think of a way to fix it in the next version.

Code: [Select]
'Tribolis 1.0
'A multibot by Bacillus
'Updates from previous version:
'LOTS of tweaking

'Issues with Tribolis:
''Branching limbs didn't work properly

'SYSVARS

''Amount to wait before panicking
def patience 997

''Amount of ties last cycle
def prevties 998

''Type of body part
def type 999

'Body to sustain
def sustbody 350

'Defense controls
def sustshell 988
def sustpoison 989

'Body part variables
def head 1
def middle 2
def tail 3

'Velocity Variables
''MinV-minimum velocity sustained by organism
def minv 40
''Acc-scale by which speed increases
''smaller numbers result in big, sluggish worms
''optimum lies between 1 and 4
def acc 1

'IO PORTS
''1-Species conspec
''2-Cell Type
''3-Xpos
''4-Ypos
''5-Shell Info
''6-Poison Info
''8-Worm size
''9-Cell ID

'BEGIN DNA
'Initialize cell
''Form tie, set as head
''Conspec
cond
 *.robage 0 =
start
 2 .tie store
 654 .out1 store
 .head .type store
 654 .tout1 store
stop

cond
 *.robage 1 =
start
 628 .aimdx store
stop

''Init part 2-set cell ID
cond
 *.robage 25 =
 *.numties 0 >
 *.eye5 40 <
start
 *.tin9 ++ .tout9 store
stop

'Start out as head
cond
 *.numties 0 =
start
 .head .type store
stop

'If single cell and big enough, divide and form diatom
''Should become new tail
cond
 *.numties 0 =
 *.nrg 2000 >
 *.eye5 40 <
start
 .tout9 store
 .tail .type store
 60 .repro store
stop

'HEAD DNA REGION

'Head update
''Speed determined by cell ID eg. worm size
''OCULUS II
''Move tie out of the way
cond
 *.type .head =
start
 .minv *.tout9 .acc mult add *.velup sub .up store
 628 .fixang store
 *.tout9 .tout8 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

'Head seeks food
cond
 *.type .head =
 *.eyef 0 >
 *.in1 *.out1 !=
start
 *.refxpos *.refypos angle .setaim store
stop

'If head sees no food and is under attack, turn
cond
 *.type .head =
 *.eyef 0 =
 *.in1 *.out1 = or
 *.shflav 0 !=
start
 *.shang .aimdx store
stop

'Head feeds; if stunned by tail, feed faster
cond
 *.in1 *.out1 !=
 *.eye5 40 >
 *.type .head =
start
 32 *.reffixed 32 add .shootval store
 -6 .shoot store
 *.veldx .sx store
 *.velup 2 sub .dn store
stop

'BODY DNA REGION

'Update
cond
 *.type .middle =
start
 .tout7 dec
 *.tin8 .tout8 store
 *.tout9 .acc mult *.velup sub .up store
stop

'Body disposes of waste
cond
 *.type .middle =
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

'Feed when swimming past food
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
start
 4 *.reffixed 28 mult add .shootval store
 -1 *.refpoison sgn -5 mult add .shoot store
stop

'(Hopefully) dissolve multibots
''TEMPORARY GENE
cond
 *.type .middle =
 *.eye5 30 >
 *.in1 *.out1 !=
 *.refmulti 0 !=
start
 1 .shootval store
 .deltie .shoot store
stop


'Fix broken organsims
''Patience is needed
cond
 *.type .middle =
 *.numties 1 =
start
 .patience inc
stop
''OK, time to break up
cond
 *.type .middle =
 *.numties 1 =
 *.patience 25 =
start
 0 .patience store
 *.tiepres .deltie store
stop

'TAIL DNA REGION

'Tail sensor
cond
 *.type .tail =
 *.shflav 0 !=
start
 *.shang .aimdx store
stop

'Spin around
cond
 *.type .tail =
 *.shflav 0 =
 *.eyef 30 <
 *.in1 *.out1 = or and
start
 1256 rnd .setaim store
stop

'Tail stuns prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.eye5 30 >
 *.reffixed 0 =
start
 .shootval inc
 .fixpos .shoot store
stop

'Tail forces prey to shed nrg
''Useful for getting the head to locate prey
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.reffixed 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -2 .venval store
 .shoot .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'Instakill venom
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.refshoot 0 >
 *.eye5 30 >
start
 10 .strvenom store
 -31999 .venval store
 .shootval .vloc store
 *.venom .shootval store
 -3 .shoot store
stop

'Tail forces change of direction
cond
 *.type .tail =
 *.in1 *.out1 !=
 *.memval 0 >
 *.eye5 30 >
start
 *.refxpos *.refypos angle 628 add .shootval store
 .setaim .shoot store
stop

'DEFENSE SYSTEM

'Kill off foreign ties
cond
 *.tin1 *.tout1 !=
start
 *.tiepres .deltie store
stop

'Remember shots
cond
 *.shflav -1 =
 *.shflav 0 > or
start
 .shoot .ploc store
 .sustpoison inc
stop

cond
 *.shflav -6 =
 *.shflav -3 = or
start
 .sustshell inc
stop

'Relay shot info
cond
 *.tin5 *.tout5 >
start
 *.tin5 .sustshell store
stop

cond
 *.tin6 *.tout6 >
start
 *.tin6 .sustpoison store
stop

'REPRODUCTION

'Form new cell
cond
 *.numties 1 =
 *.type .head =
 *.nrg 5500 *.tout9 100 mult add >
 *.eye5 30 <
 *.robage 25 >
start
 .middle .type store
 50 .repro store
 314 .aimdx store
stop

'Worm bursts due to attack/tension-create lots of new little embryos
cond
 *.prevties *.numties >
 *.nrg 4000 >
start
 .tout9 store
 .deltie inc
stop

'GENERAL MAINTENANCE

'Every now and then, share shell around
''Not immediately to prevent overproduction
cond
 *.timer 50 mod 1 =
start
 50 .shareshell store
stop

'End of cycle
''Lots of maintenance code
start
 .paralyzed .memloc store
 .shflav store
 40 .stifftie store
 *.sustshell *.nrg 6 div ceil .tout5 store
 *.sustpoison *.nrg 6 div ceil .tout6 store
 *.sustshell 10 add *.shell sub .mkshell store
 *.sustpoison 5 add *.poison sub .strpoison store
 -15 *.type .tail sub sgn abs -- abs mult 100 *.type .middle sub sgn

abs -- abs mult add .eye5width store
 *.type .tout2 store
 *.numties .prevties store
 *.type .middle sub sgn abs -- abs 314 mult *.timer 2 mod 2 mult --

mult dup  .aimshoot store
 .eye5dir store
 50 .sharenrg store
 50 .sharewaste store
 .sustbody *.tout9 10 mult add *.body sub dup .strbody store -  .fdbody

store
 0 .fixpos store
 0 .backshot store
 *.mkvirus .delgene 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
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #1 on: October 06, 2008, 08:29:04 PM »
I looked into the MB league rules, and it said that *.multi had to be in the conditions somewhere. Is that still the case? I'd also be interested if anyone knew if there are still functioning non-linear (eg. Not worms  ) multibots out there.
"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 Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #2 on: October 06, 2008, 09:15:38 PM »
MB league is mostly honor based.  If you say it's a MB we'll believe you (though you probably should have some permanent ties )

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #3 on: October 06, 2008, 09:19:00 PM »
I'm running MB as I type. No-one elsereally cares about MB apart from a novelty design, so really I'm doing it for myself (I'll still post results just out of interest, even if only two peapole know most the bots in there  )
EDIT=> Seems that most bots are either really stupid or aren't really Multibots.
« Last Edit: October 06, 2008, 09:20:07 PM by bacillus »
"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 Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #4 on: October 06, 2008, 11:26:07 PM »
Part of the problem with MB is that it's a combat league, but if combat is your primary focus you probably shouldn't be a MB in the first place.  MBs really serve an aesthetic role that's hard to rank.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #5 on: October 07, 2008, 12:10:15 AM »
Tribolis has potential to go high up the league, and Seasnake is pretty solidly embeddedin the F1 league. I think that speaks for itself.
EDIT=> I see what you mean, you mean that bots could be equally good without cells hanging on to them being useless. Yeah, I guess, but that's part of the challenge, isn't it?  
« Last Edit: October 07, 2008, 12:12:53 AM by bacillus »
"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 Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #6 on: October 07, 2008, 03:09:21 AM »
Right.  How well would sea snake place without being a MB?  I'd wager it's pretty close to what it is now.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #7 on: October 07, 2008, 02:04:48 PM »
Quote from: Numsgil
Right.  How well would sea snake place without being a MB?  I'd wager it's pretty close to what it is now.
Well, at some time if I put some time into it. I would try to get one in top ten F1. I believe MB have the power to gain first in the leagues. I just needs some more additional coding. But at start I believe MB could even be better then normal bots if some effort and time is put into. Look for example at helios.

For my current MB's this doesn't count  . Both aren't really powerful MB's and doing and not thinking like a power-MB should do. Just body carriers.

One was just made to conquer the league and the other for a MB-tutorial. All there happens is just one that carries the other around. Building a really good MB will cost time and effort.
« Last Edit: October 07, 2008, 02:10:17 PM by Peter »
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #8 on: October 07, 2008, 06:02:14 PM »
When helios was the league stomper, it was at least mostly because it was using 3 ties for each bot, which was the max number of ties the program allowed.  So no tie feeders could eat it, and it had enough shell and poison to choke a horse so shot bots couldn't really feed off of it either.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Tribolisv1.0(F2MB)(Bacillus)5/10/08
« Reply #9 on: October 07, 2008, 07:06:45 PM »
Also because info shots weren't as well understood at that time.
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)