Artificial intelligence: the opportunities and threats