New method for automated control leverages advances in AI