The world might seem to be on the brink of a humanoid-robot heyday. New breakthroughs in artificial intelligence promise the type of capable, general-purpose robots previously seen only in science fiction—robots that can do things like assemble cars, care for patients, or tidy our homes, all without being given specialized instructions. It’s an idea that…