Author Topic: Genes: Keeping track of ties  (Read 3185 times)

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Genes: Keeping track of ties
« on: November 01, 2008, 07:11:12 AM »
Ok I developed this genes for multibot purposes they store the number of the recently formed tie into a memory location starting from 80 up if a tie is deleted the code is supposed  to check old locations if no energy is read back trough the address(if there is no bot on the other side) and write to that spot when the next tie is formed.
So basically tieinformation is stored from 80 till 80 add *.numties.


Code: [Select]
def suppotie 76
def tiecheck 75
def writpos 74
def inspect 73

cond
*.tiecheck *.numties >
start
*.readtie 80 >=
*.readtie 80 *.tiecheck add <= and
*.trefnrg 0 = and
*.readtie .writpos store
dropbool
80 *.inspect add * .readtie store
.inspect inc
*.inspect *.tiecheck >
0 .inspect store
stop


cond
*.tiepres *.suppotie !=
start
*.numties *.tiecheck >
*.numties .tiecheck store
*.numties .writpos store
dropbool
*.tiepres .suppotie store
*.tiepres 79 *.writpos add store
stop

There is till some weakness I need to correct someday that is that its does not update tiecheck(sves supposed number of ties) when the tie deleted was the last formed.
Also I can not givea hundred percent guarantee that everything works , I only know that for my bot everything did.
« Last Edit: August 28, 2010, 04:49:38 PM by Shasta »