I finally found a good way to learn deciding when an agent should stop · PitHub