Author Topic: Order of Actions  (Read 7498 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Order of Actions
« on: March 14, 2005, 01:43:55 PM »
This will help everyone when writing bots.
If something is unclear, tell me and I'll look it up more specifically.

1.  Readtie is set, and reads tie information into Trefs
2.  delgene happens
3a. Communication using ties occurs.
3b. Ties are updated (that is, things like sharenrg, deleting ties, and feeding through ties.  Does not include firing ties though)
4a. The bot turns.
4b. Position is updated (things like accelerations, velocity, colisions, etc.  Also updates the eye positions)
5.  Slime and shell are made.
6.  Shoot commands occur
7.  Viruses are shot
8.  Boyancy is set
9.  storing body, venom, and poison
10. feeding from body
11. Firing of ties.
12. reproducing
13. Death

Note that all of this happens after the DNA is executed.  The DNA effects the memory locations for commands, and only after all the DNA executes do the above happen.
« Last Edit: March 14, 2005, 02:01:21 PM by Numsgil »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Order of Actions
« Reply #1 on: March 14, 2005, 01:50:27 PM »
Don't forget that ties are updated in two seperate steps.

The first step allows for tie comunications like setting values in other robots memories. During this step all ties of all robots are scanned.

The second step is for sharing, tie-feeding etc.

I changed it to work this way when I discovered that my "leach" defence only worked on robots with a higher ID number in the robots array. If they had a lower one then they fed before my leach could activate so it never worked.

 :D  PY  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Order of Actions
« Reply #2 on: December 05, 2007, 01:52:12 PM »
I failed to set .delgene with an infoshot.
Code: [Select]
1 .shootval store
.delgene .shoot store
First I thought because shots happen after delgene. But then realized that if it were the reason, the following shouldn't work either (taken from wiki):
Code: [Select]
.aimdx .shoot store
628 .shootval store
Could anyone explain what's going on?

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Order of Actions
« Reply #3 on: December 05, 2007, 02:20:14 PM »
The .delgene memory location is immune to memory shots.  It is explicitly excepted in the code and is the only mem location so immune apparently.  Don't ask me why.  Before my time.
Many beers....

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Order of Actions
« Reply #4 on: December 05, 2007, 02:24:53 PM »
I thought there where more, and the answer why this is probibited is simple enough, this is a way too overpowered weapon that could be used in the leagues, deleting genes with a simple shot seems overpowered to me, and someone has probably though desame way.
Oh my god, who the hell cares.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Order of Actions
« Reply #5 on: December 05, 2007, 02:41:57 PM »
Quote from: Peter
I thought there where more...
.delgene appears to be the only one prevented outright.

Four others are (redundantly) capped to values of 100 or less in the shots routine:
.fdbody
.strbody
.strvenom
.strpoison
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Order of Actions
« Reply #6 on: December 05, 2007, 02:55:10 PM »
Delgene should also be blocked from ties and venom.  Viruses can use it, though.  delgene was originally added as a method for bots to rid themselves of viruses, but honestly, it's never really fit in well with the rest of the program.

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Order of Actions
« Reply #7 on: December 05, 2007, 03:56:52 PM »
Quote from: Numsgil
Delgene should also be blocked from ties and venom.
You mean I can
Code: [Select]
*.tiepres .tienum store
1 .tieval store
.delgene .tieloc store
?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Order of Actions
« Reply #8 on: December 05, 2007, 04:06:52 PM »
You shouldn't be able to, but that particular hole might not have been plugged.

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Order of Actions
« Reply #9 on: December 05, 2007, 04:09:03 PM »
Quote from: Numsgil
You shouldn't be able to, but that particular hole might not have been plugged.
Cool! Gone to write killer bot right now