How artificial intelligence helped save world trade