President Trump this week seemed to be nearing a preliminary truce in his trade war with China. But the deeper danger that still lies ahead is a Sino-U.S. technology war, as the two countries race to develop artificial intelligence.

Beijing and Washington seemed to be clearing a path for a limited tariff-reduction deal with Thursday’s announcement by China’s Commerce Ministry of a tentative agreement that “China and the U.S. should remove the same proportion of tariffs simultaneously based on the content of the deal.” That’s far from an overall settlement of trade issues, but U.S. financial markets took it as good news.

The broader risk of a U.S.-China tech war — one that could potentially create two rival camps battling for global AI supremacy — was highlighted in an interim report released this week by a commission created last year by Congress. Many national security analysts are preoccupied by this topic of AI strategy, even amid the blizzard of daily news about the Ukraine investigation.

China’s plan to dominate AI and other key technologies has spawned a high-level debate among policymakers and industry leaders. Some have urged sharp limits on what American companies can share with China, as in the “entity list” ban on sales to Huawei, the Chinese company poised to dominate 5G telecommunications. Others have warned that such a “decoupling” of the global tech sector would leave everyone worse off.

The blue-ribbon commission, perhaps inevitably, tries to steer a middle course between cooperation and confrontation with China. “We’re trying to navigate between decoupling and entanglement,” said Robert O. Work, a former deputy defense secretary who serves as the commission’s vice chairman, in an interview. “We want to thread the needle.”

Eric Schmidt, the commission’s chairman and the former chief executive of Google, argued similarly that, even as the U.S. mobilizes for AI competition, it should avoid extreme policies. “I think that decoupling is too harsh, since it would hurt the United States,” he told me.

But even as the commission’s leaders try to avoid a tech Iron Curtain, they’re also trying to encourage U.S. allies to pool data for a common AI strategy among Western democracies such as Canada, Australia and Britain and other European nations. The report urges “a network of partners” that will share data, research and talent and resist any Chinese-led effort for “using AI to build a dystopian surveillance state.”

This proposal for a free-world AI alliance was endorsed Tuesday by NATO Secretary General Anders Fogh Rasmussen at a conference hosted by the commission. He argued that NATO should create its own AI commission “as a forum for exchange of data” and “to counter the autocracies,” according to a transcript of the forum prepared by C-SPAN.

The Pentagon’s biggest challenge in checking China’s rapid advances in AI may simply be gathering the best brains in the United States (including those working here who were born abroad). The Chinese can commandeer their best and brightest; America can’t. The difficulty in enlisting America’s brainpower was illustrated by the rebellion last year of Google engineers who refused to participate in a Pentagon AI application known as Project Maven.

Schmidt and Work both argue that tech companies and their employees are now more willing to work with the Pentagon, so long as projects are transparent and meet clear ethical standards. To proselytize for such cooperation, the Defense Innovation Board, also headed by Schmidt, spent the past year traveling to top U.S. universities to frame a set of recommendations for “ethical” AI. The guidelines, which were released last week, establish a baseline for a continuing conversation with a tech community that instinctively mistrusts governments.

Discussing AI strategy is a bit like trying to navigate in a hurricane: The force of the technological change coming toward us is so intense that it’s hard to measure. Henry Kissinger, the former secretary of state who made his name as a strategist of nuclear war in the 1950s, said at Tuesday’s conference that what may lie ahead is “algorithmic warfare.” Chinese and American AI brains would try to outthink and outmaneuver each other, perhaps aided by deceptions that corrupted the other side’s data.

A hint of the strategic stakes came in a brief passage of the commission’s report that discussed possible agreements with China and Russia for “prohibiting the use of AI to authorize the launch of nuclear weapons.” Dr. Strangelove’s “Doomsday Machine” has nearly arrived.

We’re lucky that even in a chaotic Washington, a few of our best minds, such as Schmidt and Work, are thinking about how America can survive and prosper in the coming AI-driven world.

Read more: