Artificial intelligence in the long view: from mechanical intelligence to cyber-social systems