Smart microrobots learn how to swim and navigate with artificial intelligence