warbo comments on Prisoner's Dilemma (with visible source code) Tournament - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (232)
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?
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.