do you compare source code alphabetically, and favour X over Y on even rounds and Y over X on odd rounds?
Great idea! I’ve updated the following heuristic using that.
There is one thing that is different between the programs: the code that you will add to be executed in the later rounds (the payload). As I said, CloneBot will ignore it when judging whether its opponent is a clone. But if the opponent is a clone, it will use this heuristic to decide who goes first:
compare both payloads lexicographically
if the difference in length is the same parity as the round, the shortest plays 3
otherwise, the longest plays 3
This is fair, deterministic, and needs 0 turn to communicate. There’s no point in tweaking your payload in the hope of starting with 3 more often. The only problem are ties, which are unllikely, and adding your name as a comment solves it.
Why also compare length? Because otherwise, the payloads of extreme length (very short or very long) would have very stable alternating priority, while the ones in the middle would be more subject to randomness. This way, it’s the same randomness for everybody.
Also, it may be a good idea to make the level of defection against outsiders depend on the round number. i.e. cooperate at first to maximize points, then after some number of rounds, when you’re likely to be a larger proportion of the pool, switch to defecting to drive the remaining bots extinct more quickly.
That seems reasonable. I’m just worried that we might let greedy or even cooperating bots take too much lead. Ideally, as soon as the clique reaches criticals mass, it should starve its opponents. The ‘as soon’ depends on what proportion of the pool we’ll initially be.
Great idea! I’ve updated the following heuristic using that.
There is one thing that is different between the programs: the code that you will add to be executed in the later rounds (the payload). As I said, CloneBot will ignore it when judging whether its opponent is a clone. But if the opponent is a clone, it will use this heuristic to decide who goes first:
compare both payloads lexicographically
if the difference in length is the same parity as the round, the shortest plays 3
otherwise, the longest plays 3
This is fair, deterministic, and needs 0 turn to communicate. There’s no point in tweaking your payload in the hope of starting with 3 more often. The only problem are ties, which are unllikely, and adding your name as a comment solves it.
Why also compare length? Because otherwise, the payloads of extreme length (very short or very long) would have very stable alternating priority, while the ones in the middle would be more subject to randomness. This way, it’s the same randomness for everybody.
That seems reasonable. I’m just worried that we might let greedy or even cooperating bots take too much lead. Ideally, as soon as the clique reaches criticals mass, it should starve its opponents. The ‘as soon’ depends on what proportion of the pool we’ll initially be.