I\'m working on an AI homework, and despite my professor\'s suggestions, I have no intention of writing this assignment in lisp. However, I do want to write it recursiv
How deep does the Python stack go?
The default recursion limit in python is 1000 frames. You can use sys.setrecursionlimit(n)
to change that at your own risk.
If you're set on using python, I would suggest using a pattern more suited to the language. If you want to use the recursive style search, and need arbitrary stack depth, you can make use of python's enhanced generators (coroutines) to create a "trampoline pattern" (there an example in PEP342)
and despite my professor's suggestions, I have no intention of writing this assignment in lisp
If the exercise is intended to be recursion-based, a tail-call optimized language, like a lisp, is probably your best bet.