Musk was speaking to Walter Isaacson, the president and C.E.O. of the Aspen Institute, on stage at Vanity Fair's New Establishment Summit in San Francisco. Musk, uncharacteristically wearing a suit, detailed his fears after teasing the announcement of Tesla's secretive project called "the D."
"I don't think anyone realizes how quickly artificial intelligence is advancing. Particularly if [the machine is] involved in recursive self-improvement . . . and its utility function is something that's detrimental to humanity, then it will have a very bad effect," said Musk.
"If its [function] is just something like getting rid of e-mail spam and it determines the best way of getting rid of spam is getting rid of humans . . . " Musk trailed off, as the crowd laughed.
Isaacson asked Musk if his well-publicized desire to retire on Mars, part of the inspiration behind Musk's spacecraft company, SpaceX, could help him outrun the evil machines.
"No—more likely than not that if there's some . . . apocalypse scenario, it may follow people from Earth," said Musk.