Author Topic: Tieloc order evaluation bug  (Read 3233 times)

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Tieloc order evaluation bug
« on: September 28, 2008, 07:40:35 PM »
It seems that if two bots are simultaneously attempting to modify each other's tieloc, the result is based on bot evaluation order.
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 Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Tieloc order evaluation bug
« Reply #1 on: September 28, 2008, 08:17:24 PM »
That's bad.  I'm moving this to bugs and fixes

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Tieloc order evaluation bug
« Reply #2 on: September 29, 2008, 08:46:08 AM »
Also had these results when one bot attempts to modify tieloc and another tries to write to another location. Sometimes it will modify the location it intended to and sometimes it will write to the new one. Probably based on eval. order.

Some possible fixes:
a ) put tieloc writing before regular tie communication; make it fail if both bots are attempting to do it at the same time.
b ) put tieloc writing after tie communication, but before tie feeding. fail if both bots are doing it.
c ) forbid using tieloc to write to tieloc.


C is probably easiest to implement. B and C would damage some of fruitfly's functionality, but A introduces a trivial defense against ties (write 0 to opponent's tieloc and delete the tie)
« Last Edit: September 29, 2008, 08:46:57 AM by abyaly »
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)