Artificial intelligence and foreign affairs