Karl Marx didn’t live to see the rise of artificial intelligence, but he had a good sense of where things might be heading.