Your code doesn’t know if it’s being evaluated by the opponent or it’s running “for real”. If it knew, the program would be remarkably easy: if (simulated) { say “I cooperate!” } else { defect }.
It’s not hard to recognize that you’re stuck in a recursive trap and need to get out of there after nine seconds, but you still don’t know what to output.
If I know early enough the ten-second time limit exactly how long into the ten seconds I am, I can be sure enough that I’m the original.
Another possibility would be to include a random chance on the order of .1% that I will set a global flag that will follow down levels of simulation, and then simulate my opponent simulating me. If I get the flag, I have high probability that my opponent is simulating me on himself; I don’t want to set that flag with high probability, because I want my opponents’ (me cooperatebot) and (me defectbot) evaluations to return correctly.
But now I’m focusing on this particular implementation of the competition, not trying to provide useful information to the question that the competition is about.
Proposed meta-rule: Programs should not make attempts to determine if they are being scored or not in order to change behavior; attempts to identify and break out of recursive loops are encouraged.
Your code doesn’t know if it’s being evaluated by the opponent or it’s running “for real”. If it knew, the program would be remarkably easy: if (simulated) { say “I cooperate!” } else { defect }.
It’s not hard to recognize that you’re stuck in a recursive trap and need to get out of there after nine seconds, but you still don’t know what to output.
If I know early enough the ten-second time limit exactly how long into the ten seconds I am, I can be sure enough that I’m the original.
Another possibility would be to include a random chance on the order of .1% that I will set a global flag that will follow down levels of simulation, and then simulate my opponent simulating me. If I get the flag, I have high probability that my opponent is simulating me on himself; I don’t want to set that flag with high probability, because I want my opponents’ (me cooperatebot) and (me defectbot) evaluations to return correctly.
But now I’m focusing on this particular implementation of the competition, not trying to provide useful information to the question that the competition is about.
Proposed meta-rule: Programs should not make attempts to determine if they are being scored or not in order to change behavior; attempts to identify and break out of recursive loops are encouraged.