Make sure the equality comparison only depends on things that affect functionality—i.e. it will declare any functionally equivalent programs equal even they use a different nameset for variables or something.
(Yes, I know that’s reducible to the halting problem; in practice, you’ll use a computable, polynomial time approximation for it that will inevitably have to throw out equivalent programs that are too complex or otherwise be too ‘clever’.)
It’s quite likely that the optimal behaviour should be different in case the program is functionally equal but not exactly equal.
If you’re playing yourself, then you want to cooperate.
If you’re playing someone else, then you’d want to cooperate if and only if that someone else is smart enough to check if you’ll cooperate; but if it’s decision doesn’t depend on yours, then you should defect.
Make sure the equality comparison only depends on things that affect functionality—i.e. it will declare any functionally equivalent programs equal even they use a different nameset for variables or something.
(Yes, I know that’s reducible to the halting problem; in practice, you’ll use a computable, polynomial time approximation for it that will inevitably have to throw out equivalent programs that are too complex or otherwise be too ‘clever’.)
Patrick discusses this issue here in some depth.
It’s quite likely that the optimal behaviour should be different in case the program is functionally equal but not exactly equal.
If you’re playing yourself, then you want to cooperate.
If you’re playing someone else, then you’d want to cooperate if and only if that someone else is smart enough to check if you’ll cooperate; but if it’s decision doesn’t depend on yours, then you should defect.