Intelligent light-driven microrobots