A produce vending machine in China that allows payment via a QR code and measures weight upon removal | AFP via Getty Images The Coming Wars China’s black box superiority Artificial intelligence is giving Beijing a technological edge.

SHENZHEN, China — When I arrive at the 31-story Modern Industry Service Center in the Yantian district of Shenzhen, there is hardly a soul. The building is still being finished. A policeman takes me through dark halls covered with construction materials to a hidden elevator. I press the button to the top floor, where Malong Technologies has recently set up its offices.

Some of the glass windows have been blown away — the work of super Typhoon Mangkhut. Hong Kong is visible just across the harbor, and to the north the serpentine coast hides some of the best beaches in the region. Looking below, one can spot new skyscrapers rising all around, meant to attract a fresh wave of technology companies. The genomics lab where the entire genome of a Chinese man was recently sequenced is just a few streets away, but I’ve come to Yantian to see developments in artificial intelligence that could define the future of China — and with it the world.

Let’s start simple. One of the products Malong is betting on is an intelligent vending machine. Forget those primitive mechanical arms giving a push to your favorite candy or grabbing a bottle of soda. Coin operated vending machines? They existed in China a thousand years ago. The version sold by Malong is much simpler: You open it by scanning a code in your smartphone, take whatever items you want and a camera inside will identify those items and process the payment. These vending machines are now everywhere in Shenzhen.

I notice a second camera outside the machine and ask what it is for. “To monitor the environment,” is the answer. That means to prevent vandalism, for the time being, but it could also replace the existing payment method with facial recognition. Malong’s machines are meant to interact with the world outside, and they seem immeasurably more efficient than the cashier-free convenience stores that have also been popping up in China. Those need stockers to replenish inventory and all kinds of assistants to help people along.

The fundamental technology involved in these vending machines and a blossoming range of other applications is deep learning. Think about it this way: Rather than instructing a machine how to differentiate and recognize hundreds of objects, you feed it data and allow it to learn on its own — much like a human being.

Here’s the grand bargain, for AI but also for much of China: power vs. intelligibility.

How does it do this? What are the defining traits of a soda bottle or a package of crackers? We have no idea. The algorithm analyzes the images it takes against the classifications it’s given and then repeats the experiment until it starts to get it right. How exactly it works we will never know.

“The famous black box,” Dinglong Huang, Malong’s CEO, tells me, before leaning over and whispering: “Do you know why the Chinese are so naturally good at deep learning? Because the black box has been part of Chinese society and Chinese culture since the very beginning. Chinese medicine. There is an input, some herb or infusion. You have no idea how it works, but it does. All you can do to get a different result is enter a different input.”

I had been discussing with Huang what makes life in Shenzhen and in China different from life elsewhere. Is China inventing a new way of life as it creates new technologies? Or is it adopting the Western approach to modernity? We had made little progress solving this question, but suddenly his intuition offered an answer: Might China be understood as a giant black box?

Here’s the grand bargain, for AI but also for much of China: power vs. intelligibility. If you insist on understanding everything that’s happening, your potential to effect change will be limited. But if you don’t mind not knowing how things work, a host of new possibilities become available.

Think of Chinese society as a giant black box and the Chinese Communist Party as a deep learning programmer. Speeches, party documents and regulations train the black box to react to certain types of behaviors in certain ways — but ultimately there’s no single person who knows how it all works.

In the gigantic black box that is Chinese society, an investment may turn out to be the bargain of the century — or it might be suddenly classified as a state crime. Voice an idea, express an opinion, and you might shift the debate. Or you might find out you’ve entered forbidden territory.

Many of the ultra-rich, having relied on bribery and other underhand methods to become millionaires, stand on the edge of the abyss. They know that their next move might turn them into one of the two or three billionaires China produces every week — or land them in jail for life. When they look down, they see the black box: all-powerful, dark and gleaming. In other countries, that gamble might be seen as something that should be eliminated. Here, it’s what characterizes the system. It’s the very core of the social program.

What happens when China’s black boxes — simple machines organized by the powerful machine of Chinese society — break out into the wider world?

Two centuries ago, China came face to face with a different civilization, carrying all the secrets of modern science, which at first must have looked like supernatural powers. That encounter, between European and Asian empires in the modern age, was defined by something very specific: the superiority of European technology. Some Asian thinkers went so far as to make the intriguing claim that the encounter was not between Asians and Europeans, but rather between Asians and European machines.

We have now entered a new age, one that will likely once again be defined by an encounter between people and technology. Europeans and Americans must prepare themselves to meet the black box, the Chinese intelligent machine.

Bruno Maçães, a former Europe minister for Portugal, is a senior adviser at Flint Global in London and a nonresident senior fellow at the Hudson Institute in Washington. His book “The Dawn of Eurasia” was published by Penguin in January.