created ai_stop to modularize shutdown of ai object