NASA’s Curiosity rover landed on Mars in 2012, in part to analyze rocks to see whether the Red Planet was ever habitable (or inhabited). But now the robot has gone off script, picking out its own targets for analysis—precisely as planned. Directing a robot’s every move from another planet isn’t easy. Communication with programmers can be delayed by hours, thanks to issues with bandwidth and the alignment of relay satellites and antennas. So Curiosity was programmed to fill communications gaps by aiming its ChemCam—which shoots objects with a laser to analyze the resulting particles—at mostly random targets. Last year, NASA scientists found a better solution. They uploaded a piece of software called Autonomous Exploration for Gathering Increased Science (AEGIS) adapted from the older Opportunity rover. Curiosity can now scan each new location and use artificial intelligence to find promising targets for its ChemCam. Compared with the estimated 24% success rate of random aiming at picking out outcrops—a prime target for investigation—the current version of AEGIS lets the rover find them 94% of the time, researchers report today in Science Robotics. Further updates will refine the rover’s ability to evaluate and prioritize targets—hopefully none of them friendly.