added test of ai_is_active() function