When American soldiers were killed in Iraq by improvised explosive devices, or IEDs, it was the slow, bureaucratic, centralised nature of the Department of Defense that failed them, says Rafe Sagarin, a marine ecologist at the University of Arizona. It was only once soldiers were authorised to make their own decisions – a move known as the Petraeus Doctrine, after the general who invented it – that they could communicate effectively with locals in order to find out in advance where IEDs might be.

Why was a marine ecologist suggesting ways of protecting armed forces? Well, according to Sagarin, the Petraeus doctrine is exactly the sort of thing an octopus would do. Despite its well-organised central nervous system, many of an octopus's reactions are decentralised. Its individual cells make their own decisions for dealing with the immediate situation – enabling, for example, the invertebrate's famously varied camouflage. Switching to this kind of adaptive tactics provided greater protection for soldiers in Iraq.

Sagarin's insights about the relevance of the octopus to matters of national security are captured in his book Learning From the Octopus: How Secrets from Nature Can Help Us Fight Terrorist Attacks, Natural Disasters, and Disease. The book is more than just speculation: he spent years running National Science Foundation-funded workshops that included biologists, ecologists, anthropologists, first responders and national security experts, all of whom were charged with the task of figuring out how to make America's military and security apparatus more adaptable.

The unusual story of how a marine ecologist ended up in Congress, as a science advisor to US Representative Hilda Solis of California's 31st district, and later as an author of a book that's grown to be a cult favourite among national security types, began during the events of 9/11. When the twin towers of the World Trade Center went down, Sagarin was in one of his most beloved habitats – a marine tidepool in Monterrey Bay, California.

"On the day of those attacks, I was feeling very far removed from what was going on at in Washington and New York," says Sagarin. But he'd always had an interest in policy, so he applied for and received a Geological Society of America Congressional Science Fellowship.

That led to an article in Foreign Policy called Adapt or Die, in which he declared: “If the genus Americanus wants to overcome this latest challenge to its existence, it must adapt its defense mechanisms accordingly. What better way to do that than to harness time-tested Darwinian theory to the cause of homeland security?”

Tentacled tactics

The lessons Sagarin ultimately derived from the natural world surprised even him. "I'm a cynic about generalism in biology and ecology, because systems are so complex," he says. "It took us a while to come to the point where we had any rules at all."

The first rule he derived was, as in the case of the octopus's camouflage and the Petraeus Doctrine, the importance of decentralisation. This, he notes, was the opposite of what America was doing in security at the time, for example with the creation of a centralised, Washington DC-based Department of Homeland Security, which was founded expressly to be a clearinghouse for formerly-dispersed decision-making about security.

The second principle Sagarin and his collaborators noticed was the importance of symbiosis. Nearly all organisms depend on at least one or two – and in some cases many – other species. As an example of how this manifests in security, Sagarin cites the Middle East Consortium on Infectious Disease Surveillance (MECIDS), which brings together Israeli and Palestinian doctors in order to track the spread of infectious diseases like the H1N1 influenza virus. Given the intense political differences between the two countries – the organization spans both the Gaza Strip and the West Bank – its as unlikely a collaboration as you'll find, and yet it works because "they're intensely focused on solving this one set of problems, and nothing else," says Sagarin.

Another lesson from the octopus is that adaptability requires redundancy. "We think of redundancy as wasteful and inefficient, but it's everywhere in nature," he notes.

Defensively and offensively, an octopus has no shortage of coping mechanisms – camouflage, powerful arms, intelligence, a sharp beak, symbiotic toxins and a cloud of ink. When escaping, it can squeeze into a tight space, blend in with the background, jet away, and, in the lab at least, grab two halves of a coconut shell and sequester itself inside them.

Unknown unknowns

Just as importantly, Sagarin discovered what it is that organisms don't do. In general, they don't plan, predict or try to be perfect. When Sagarin tells this to the members of strategic planning departments in government agencies, it leads to "a lot of consternation and grinding of teeth," in part because it's so counter-intuitive.

Indeed, if there is a single message that sums up all of Sagarin's work, it's that organisms realized long ago that the world is a much less predictable place than humans would like to believe. What Sagarin calls the "non-normal distribution of truly interesting events," which was explored at length in Nassim Taleb's book The Black Swan, has relevance to how we'll cope with everything from disease outbreaks to climate change.

"We spend a lot of time in planning exercises, making predictive models, and in optimization routines," says Sagarin. "All of which have essentially been selected against in nature, because they're incredibly wasteful when you live in an unpredictable world."

Organisms and humans should plan for things that occur with some frequency; buildings in earthquake-prone areas must be ready for tremors just as surely as mating Horseshoe crabs need to know the phase of the moon. But the biggest dangers are those we've yet to identify, and if nature is any guide, the only way to prepare for them and respond to them effectively is to have an abundance of flexibility and skills which can be combined to meet any challenge.

If you would like to comment on this article or anything else you have seen on Future, head over to our Facebook page or message us on Twitter.