The art of generalship is to get inside the enemy’s head. From Caesar to Napoleon to Rommel, the best commanders have a knack for deducing the enemy’s plans and then moving to exploit that insight.

At the same time, a staple of science fiction is the omniscient computer. DARPA wants to merge these two phenomenon into software that will determine an opponent’s strategy and then recommend strategies to a commander.

Collection and Monitoring via Planning for Active Situational Scenarios (COMPASS) will focus on “gray zone” warfare, that nebulous not-quite-war mixture of cyberoperations, special forces, insurgents, information operations and other ways of waging war without actually going to war. Its most practiced practitioner today is Russia, which has used the technique to good effect in Crimea and Ukraine.

“The lack of clarity of intent—the grayness—makes it challenging to detect, characterize, and counter an enemy fighting this way,” notes a DARPA news release. COMPASS will

help clarify enemy intent by gauging an adversary’s responses to various stimuli. COMPASS will leverage advanced artificial intelligence technologies, game theory, and modeling and estimation to both identify stimuli that yield the most information about an adversary’s intentions, and provide decision makers high-fidelity intelligence on how to respond—with positive and negative tradeoffs for each course of action.

In other words, a computerized staff officer that can accurately estimate the enemy’s actions and recommend responses. If Napoleon had COMPASS, he might not have lost at Waterloo.

Recommended: The Fatal Flaw That Could Take Down an F-22 or F-35.

Recommended: Smith & Wesson’s .44 Magnum Revolver: Why You Should Fear the ‘Dirty Harry’ Gun

Recommended: 5 Best Shotguns in the World (Winchester, Remington and Beretta Make the Cut)

The problem with conventional (or human) military decision making is that it doesn’t work when facing gray warfare, according to DARPA. Military decisions usually work according to a Boyd loop: Observe, Orient, Decide and Act. “This process, however, is not effective in gray zone warfare,” said COMPASS program manager Fotis Barlos. “Signals in the environment are typically not rich enough to draw any conclusions, and, just as often, adversaries could implant these signals to induce ambiguity.”

DARPA isn’t looking for exotic technology such as virtual reality to make COMPASS work. Instead, the software will apparently rely on AI and game theory—a sort of mathematical modeling that has nothing to do with games—to construct an analytical model of an opponent’s strategy. That model will be based on data from standard intelligence sources, such as analyzing video and text to read an adversary.

“That’s where game theory comes in,” Barlos said. “If I do this, what will the adversary do? If I do that, what might he do? So it is using artificial intelligence in a repeated game theory process to try to decide what the most effective action is based on what the adversary cares about.”

Will it work? AI and computing power have grown enormously, as evidenced by the rapid advances in drone technology. On the other hand, science fiction also offers a warning. Despite Mr. Spock’s frustration with Captain Kirk’s illogic, how many times did Kirk foil a supercomputer?

Michael Peck is a contributing writer for the National Interest. He can be found on Twitter and Facebook.

Image: Flickr.