New AI system can train robots for armies: Study