Darwinbots Forum

Code center => Suggestions => Topic started by: abyaly on June 01, 2008, 02:57:53 PM

Title: Ties should be referred to by the same number on both ends
Post by: abyaly on June 01, 2008, 02:57:53 PM
Current behavior:
If a bot A stores 123 in .tie and creates a tie to bot B, the following happens
1) bot A can access the tie as tie number 123
2) bot B can access the tie as tie number 1 (if it had no ties previously; otherwise it uses the least available +ve integer)

Suggested behavior:
If bot A stores 123 in .tie and creates a tie to bot B, both bots should refer to that tie as 123
Title: Ties should be referred to by the same number on both ends
Post by: EricL on June 02, 2008, 10:05:02 AM
This has been discussed to death.  There are good reasons not to have the tied bot's tie port be the same same as the tying bots.
Title: Ties should be referred to by the same number on both ends
Post by: abyaly on June 04, 2008, 04:57:57 PM
I am having trouble finding discussion of this topic. Could you say something on the issue or link me to a topic about it?
Title: Ties should be referred to by the same number on both ends
Post by: EricL on June 04, 2008, 06:16:26 PM
Sure.  There are a bunch of reasons.

First, a bot should not suddenly aquire multiple ties on a single tie port due to ties it didn't create.  If every bot goes around doing .tie inc for example, then bots that already have a tie with tie port1 would suddenly get another on tieport 1, making it problematic to delete one but not the other.

Second, I don't think it's proper for bot A to be able to code to attack bot B through its choice of tie numbers.  A bot should not be able to delibertly hang ties on specific tie ports at the tied bot's end of the tie and thus mess with the targets internal tie logic.  This is important for multibots.

Thrid, a bot should be able to detect when it gets tied to through *.tiepres.  That it, *.tiepres should change if a bot gets tied to.  This would not necessarily be the case if the tie port was the same at both ends I.e. in the case where the tie has the same tie port as the last one it created.  Also very critical for MBs.

Forth, by the same token, *.tiepres should change when the last tie created gets deleted.  

Fifth, bots should be able to code simple logic for deletion of ties they didn't create.   I.e. use tie ports of 9999 or whatever for their own ties but always delete ties if *.tiepres is less than 10.

Sixth, bot A should not gain insite into the tie ports being used by bot B when bot B ties to it.  It could use this knowledge for .deltie info shot or similar attacks.

It mostly comes down to uniqueness of tie ports.  There's a separate bug filed I'm workign on that relates to ties that are delibertly created with the same tie port.  Multipel ties on the same tie port are fine if that's what the bot wants to do that, but IMHO ties created by other bots should get their own unique tie port at the target bot end.
Title: Ties should be referred to by the same number on both ends
Post by: abyaly on June 10, 2008, 01:41:08 PM
I see. I should mention then that bots currently can recieve multipe ties on the same port. I'll investigate the cause when I get home, but my first guess would be multiple ties during the same cycle.