I’m not familiar with it either, but if nothing else, you can pass a counter that shows the number of iterations you’ve gone through and stop when it gets too high.
What do you plan on doing when you run out of stack space? You can’t just replace your code with a cooperate bot or a defect bot after a certain level, since they’ll defect if they think you’ll do the same thing either way, and you’ll defect if you think they’ll defect etc.
What you need is something along the lines of cooperating if their code is equivalent to yours, and defecting if it’s different. You have to do this in under ten seconds, and you have to get it to cooperate even if they have a slightly different idea of what’s equivalent.
Does that include tail-calls in mutual recursion? Even if you were going to return whatever your opponent’s code did, you probably couldn’t count on them doing the same.
I’m not that familiar with Scheme, but is there some way to see how much stack space you have left and stop before an overflow?
I’m not familiar with it either, but if nothing else, you can pass a counter that shows the number of iterations you’ve gone through and stop when it gets too high.
What do you plan on doing when you run out of stack space? You can’t just replace your code with a cooperate bot or a defect bot after a certain level, since they’ll defect if they think you’ll do the same thing either way, and you’ll defect if you think they’ll defect etc.
What you need is something along the lines of cooperating if their code is equivalent to yours, and defecting if it’s different. You have to do this in under ten seconds, and you have to get it to cooperate even if they have a slightly different idea of what’s equivalent.
Scheme requires tail-call optimisation, so if you use tail-recursion then you’ll never overflow.
Does that include tail-calls in mutual recursion? Even if you were going to return whatever your opponent’s code did, you probably couldn’t count on them doing the same.
Yes: all tail-calls are guarantied not to exhaust resources. The precise definition of what is tail is in the spec.