Open james016 opened 2 years ago
Hi @james016. Thanks for raising this. That is certainly annoying but the call to copy.deepcopy()
is pretty integral to how the players get created and adjusted.
I will try to set aside some time to think about an alternative solution but, for now, I think your workaround will have to do. I don't know if I'm comfortable making global changes to the system recursion limit as part of matching
.
Sorry to disappoint and thanks again for opening this up.
I stumbled on this issue and explored a bit more about the Python recursion limit and found a StackOverflow answer giving an elegant way of wrapping the setting of recursionlimit
using with
. The article has a bunch of other interesting advice and solutions regarding deep recursion in Python too.
I bumped into
RecursionError
in thedeepcopy
reproduced byIt cased by the
deepcopy
ofplayers
. By settingrecursionlimit
to a higher value can reduce the problem in this case with 400x400 matching task, I found. But it may be not reduced fundamentally.