Darwinbots Forum

Code center => Bugs and fixes => Topic started by: abyaly on September 28, 2008, 07:40:35 PM

Title: Tieloc order evaluation bug
Post by: abyaly 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.
Title: Tieloc order evaluation bug
Post by: Numsgil on September 28, 2008, 08:17:24 PM
That's bad.  I'm moving this to bugs and fixes
Title: Tieloc order evaluation bug
Post by: abyaly 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)