Artificial Intelligence and the threat to humanity