DURING war games played off the coast of Florida last year, a nuclear-powered French attack submarine, Saphir, eluded America’s sub-hunting aircraft and vessels with enough stealth to sink (fictitiously) a newly overhauled American aircraft-carrier, Theodore Roosevelt, and most of her escort. An account of the drill on a French defence-ministry website was promptly deleted, but too late for it to go unnoticed.

Nor was this French victory a fluke. In 2006, in what was very far from being a war game, a Chinese diesel-electric submarine surfaced near Okinawa within torpedo range of another American carrier, Kitty Hawk, without having been detected by that carrier’s escort of more than a dozen vessels and anti-submarine aircraft. And, from the point of view of carrier-deploying navies, things are threatening to get worse. Saphir, launched in 1981, hardly represents the state of the art in underwater undetectability; in the decade since the Okinawa incident diesel-electrics have become even quieter. For an inkling of the silence of the new generation of such subs when they are running on battery power alone, without their engines turning, Jerry Hendrix, a former anti-submarine operations officer on the Theodore Roosevelt, asks: “How loud is your flashlight?”

Moreover, submarines are spreading. Since the cold war ended, the number of countries deploying them has risen from a dozen or so to about 40. Many of the newcomers are not part of the Western system of alliances. Some are actively hostile to it. And more may join them. A secondhand diesel-electric boat—not state of the art, admittedly, but effective nevertheless—can be had for as little as $350m.

Worse, for those trying to defend ships from submarine attack, Western powers have routinely cut anti-submarine spending since the end of the cold war. American carriers retired the S-3 Viking submarine-hunting warplane in 2009, leaving shorter-range helicopters to compensate. Since the Soviet Union’s demise the average surface escort of an American carrier has shrunk from six vessels to four.

Modern submarines are not merely quieter than their predecessors, they are also better armed. Many carry anti-ship guided missiles as well as torpedoes. One such, the CM-708 UNB, was shown off by China in April. It packs a 155kg warhead and, after popping out of the water, flies at near the speed of sound for about 290km. An export version is available but, if you prefer, Russia’s submarine-launched Kalibr-PL missile offers a bigger warhead and a terminal sprint at Mach three. In December a submerged Russian submarine hit Islamic State targets in Syria with four similar missiles.

Potential adversaries operate or have ordered more submarines than Western powers could feasibly find and track with their existing defences. Even Iran has more than a dozen well-armed “midget” subs that hide in the shallows of the Persian Gulf, as well as three big Russian-made Kilo class diesel-electrics. Israel’s navy trains as if this trio carry the Kalibr-PL’s export variant, according to an Israeli expert. Countries which plan to arm submarines with that missile include China, India and Vietnam. The upshot is that many warships are in jeopardy and may only learn just how great that jeopardy is, says Alain Coldefy, a former vice-chief of France’s defence staff, once a missile is closing fast.

Automating the hunt for Red October

Perhaps belatedly, but certainly determinedly, a new approach to the submarine threat is now being developed. It is based on a simple principle: since submarines are hard to detect, when you do find one you should never let go.

Shadowing threatening submersibles is nothing new. Trailing something is a much easier sensory task than discovering it in the first place, when you have an entire ocean to search. But at the moment this job is done by destroyers and (for those that have them) nuclear submarines. These cost billions of dollars to build and tens of millions a year more to run. Instead, the idea is to use smallish unmanned ships—marine drones, in effect—to do the job. These will be packed with enough sensors and artificial intelligence to follow adversaries’ submarines automatically.

Half a dozen Western naval powers are conducting the R&D needed to build these, according to Eric Wertheim, author of the US Naval Institute’s reference doorstop “Combat Fleets of the World”. America is furthest along. In June its Office of Naval Research and its Defence Advanced Research Projects Agency, DARPA, began tests in the Pacific of the Sea Hunter, an unmanned (and, for now, unarmed) 40-metre trimaran, pictured. It is designed to follow an enemy submarine from the surface relentlessly for months, even in high seas. While the crew of the boat being tailed will probably be able to hear their pursuer’s diesel engine, that is not really a problem. Short of a torpedo launch, which would be an act of war, “there’s nothing you can do about it”, says Nevin Carr, a retired rear admiral in the American navy who now works at Leidos, the firm which designed Sea Hunter.

Sea Hunters will cost just $20m each, according to Leidos. America will be able to let lots of them loose, says Scott Littlefield, head of the Sea Hunter programme at DARPA—or, rather, the “anti-submarine-warfare continuous trail unmanned vessel” (ACTUV) programme, as the agency prefers to call it. Mr Littlefield thinks of these robots as pawns to be put in harm’s way without risking loss of life or great treasure. Likening them to the chessboard’s lowliest piece, however, is slightly misleading. They will eventually need enough artificial intelligence not to be outfoxed by the manoeuvrings of the world’s best submarine commanders. Designing the software to do this has been hard, Mr Littlefield says. DARPA therefore asked video gamers for help. In 2011 the agency released “ACTUV Tactics Simulator”, a modified version of a game called “Dangerous Waters”, in which players chose the sensors for a Sea Hunter-like craft that they piloted to follow an enemy submarine. Having played, they repaid DARPA by uploading relevant data from their game sessions. These were analysed by the agency’s naval-warfare experts and tactics judged useful then programmed into the Sea Hunter’s software or passed on to contractors to improve the design of the ship. Even so, more advances are needed before the system can match an enemy submarine’s crew, according to Mr Carr. But naval drones will still be useful before then. With greater manoeuvrability, endurance and speed than manned diesel-electric submarines, they will find employment in many sorts of mission besides tracking the boats of potential enemies. This autumn, for example, Norway begins sea trials of ODIN, an 11-metre-long surface drone. ODIN will first sweep for underwater mines, since these are static and cannot take evasive action. Eventually, though, upgrades should give its software the wit to follow manned submarines. Some navies hope to make the drones themselves submerge. America’s putative SHARK class (an acronym contrived from “submarine, hold at risk”) is the furthest advanced in this area, says Andrew Krepinevich, a former adviser to three American defence secretaries—but China and Japan are not far behind. Underwater drones are harder to detect, and thus counter, than surface drones are because sound radiates from them through the water as a sphere, rather than the hemisphere occupied by the waterborne sonic emissions of a drone at the surface. Filling a larger volume at any given distance from its source, the sound of a submarine drone therefore dissipates faster than that from a surface drone.

Some needle, some haystack

All this technological change is ushering in a new era for anti-submarine warfare, according to Gunnar Wieslander, a former commander of Sweden’s submarine flotilla who now runs Saab Kockums, an exporter of diesel-electric manned submarines. Saab Kockums’s new 62-metre A26 model will sport a tube from which an underwater drone could slip out to attack surface drones. This, Mr Wieslander says, is the first time that such a feature has been fitted to a production submarine. Mr Krepinevich, however, counsels caution regarding underwater drones. They are fine for attacking other drones, but without huge advances in battery technology (see article), no such machine could keep up for long with a big submarine that charges its batteries from a diesel engine and can travel at up to 20 knots—much less with a faster nuclear-powered one.

What, though, of the crucial task of detecting the submarines to be trailed in the first place? The phrase “surfaced within torpedo range” may bring to mind an image of a boat popping up a few hundred metres from its target—as, perhaps, in a film about the second world war. In the Okinawa incident, though, the distance was probably about five nautical miles (the details remain classified). Sound, whether of engines turning or sonar pulses returning, obeys the inverse-square law. Its strength changes in inverse proportion to the square of the distance it has travelled. That means it falls off fast. Ideally, therefore, detectors need to be close to their targets.

One way to do this, at least for home waters, is to have a dense grid of fixed detectors. One of the more advanced of these is Singapore’s. It consists of underwaterbuoys called acoustic nodes that are tethered to the sea bed two or three kilometres apart. These nodes can talk to each other. They communicate by broadcasting precisely calibrated vibrations through the water. At the moment they are sending test messages, but eventually they will be equipped with their own submarine-detecting sensors.

More sophisticated systems than this are in the works—including anti-drone countermeasures. According to Torstein Olsmo Sæbo, a scientist at FFI, Norway’s defence-research establishment, drone-towed acoustic arrays can now mimic the signature of a big submarine, luring a drone off in the wrong direction. (Just because Norway’s nascent flotilla of underwater drones could be programmed to do this, he adds, does not mean that it has been.) DARPA, meanwhile, is planning sea-floor pods which pop open to release drones that swim closer to an enemy submarine, or, after rising to the surface, fly off to deliver or collect more intelligence.

The arms race between surface vessels and submarines has been going on for almost exactly a century—since Germany’s demonstration to its enemies in the first world war of the threat from its U-boats. By the end of the second world war, the Allies had become so good at finding U-boats that German crews taking to the sea had a life expectancy of about a week. As the examples of the Kitty Hawk and the Theodore Roosevelt show, the balance at the moment has tipped back in favour of the submariner. The great question is how long it will stay that way.