Thanks for playing! The end condition I set is when a cycle produces exactly the same state as before, including all frogs, spiders, and boxes. Because once the same state appears again, that state will keep repeating over and over after that.