Artificial intelligence: Threats and opportunities