This reads to me as a more elegant way of expressing what I was looking to do: it needs no source access, so there is no rewrite pass needed and nothing to obfuscate. I also think it will extend to strategies that do not simulate, resolving one of my blockers.
However, I do not think it addresses niceness without recognition. You learn what your opponent plays if it knows you will cooperate, but in real play it may not determine this, and act differently.
There are also issues with detecting that you are being simulated: a lookup will return much faster than a simulation. You may also need to enforce that strategies cannot run judge.run(opponent, fresh_copy(self)) or such.
This reads to me as a more elegant way of expressing what I was looking to do: it needs no source access, so there is no rewrite pass needed and nothing to obfuscate. I also think it will extend to strategies that do not simulate, resolving one of my blockers.
However, I do not think it addresses niceness without recognition. You learn what your opponent plays if it knows you will cooperate, but in real play it may not determine this, and act differently.
There are also issues with detecting that you are being simulated: a lookup will return much faster than a simulation. You may also need to enforce that strategies cannot run judge.run(opponent, fresh_copy(self)) or such.