Added stagnation.py. It's mostly a straight copy, and the code quality is quite bad