Image copyright Antweb Image caption Invasive fire ants have dug in soils across different continents to establish their colonies

Researchers in the US have revealed a secret of the success of invasive fire ants - they can excavate any type of soil.

Three-dimensional scanning revealed that the insects were able to build their complex nests regardless of the size of grains they needed to move.

The ants also changed their excavation techniques depending on the type of soil in which they were digging.

The findings are published in the Journal of Experimental Biology.

They invaded [the US] 80 years ago and they have dug nests from Georgia to LA - they can dig in anything Prof Dan Goldman, Georgia Institute of Technology

Lead researcher Prof Dan Goldman, from the Georgia Institute of Technology, told BBC News that while we "shove this kind of material around using bulldozers", fire ants create complex underground structures using discreet little appendages.

"They're really grasping and holding," he said.

"They're more sophisticated manipulators of [sand and soil] than anything humans have ever engineered."

The species the team studied, Solenopsis invicta - also known as the red imported fire ant - is a particularly successful engineer.

Image copyright Laura Danielle Wagner Image caption Filming ants as they dug through beads of glass revealed their different tunnelling techniques.

Native to South America, colonies of thousands of these industrious insects have established themselves throughout the US, Australia and China.

"They invaded [the US] 80 years ago and they have dug nests from Georgia to LA - they can dig in anything," said Prof Goldman.

He and his colleagues tested the ants' excavation abilities by letting groups of 100 ants dig in cylinders containing three different types of soil - small, medium-sized or large grained.

They also tested the ants in soils containing different levels of moisture.

They devised an experiment that enabled them to x-ray the ants' nests as they evolved over 40 hours.

Media playback is unsupported on your device Media caption In a 2013 study, Prof Dan Goldman and his team discovered how fire ants managed to tunnel so swiftly through fine, unstable sand

On average the ants built tunnels faster in coarser soils, and built more complex branched structures in the more moist coarse soils.

Water particles create forces that stick soil grains together, making the structures more robust.

"But it was basically the case that, once you get above about 5% moisture content, they will dig tunnels," said Prof Goldman.

Digging in glass

In the second part of its experiment, the team wanted to capture each individual ant in action.

Researcher Daria Monaenkova managed to film the ants as they dug in transparent cylinders filled with glass beads of different sizes that the ants treated like soil.

This very visual experiment showed that the ants had two distinct excavation methods.

In the coarse beads, they would grasp a single particle and shuffle backward up the tunnel, dragging it with them.

But in the smaller beads - imitating finer soil - the ants grasped and compressed multiple grains into a pellet, while bracing themselves against the sides of the tunnel with their legs.

They then gathered their pellet, turned and marched upward.

Prof Goldman said he was most surprised by the ants' inventiveness, moulding these pellets - that were always the same size - like snowballs, using their forelimbs, jaws and even using their antennae.

"It is just mind blowing how they can dig so well," he said.

He added that the studies could help in the design of search and rescue robots able to work in large teams, and able to manipulate their environment in unstable conditions, such as collapsed buildings.

"When we want to send in teams of robots in the natural environment, you have the problem of getting in each other's way, and jamming things up," he told BBC News.

Image copyright Victoria Gill Image caption University of Sheffield scientists have created a swarm of robots that is inspired by an insect colony

"So [these insects demonstrate] how large teams can work in cramped conditions and even create structures in loose materials."

Dr Roderich Gross from the University of Sheffield has designed robots that are programmed to work on ant-like principles - functioning as a collective swarm, or 'superorganism' in order to complete a task.

He told BBC News that ants' ability to manipulate substrates of different granularity was "likely to make its way into next-generation robotic systems".

"Swarms of robots with advanced manipulation skills could be applied in construction, disaster response and mining," he said.

Media playback is unsupported on your device Media caption Fire ants' digging skills could inspire the design of swarms of insect-like robots for search and rescue applications, as Victoria Gill reports

Follow Victoria on Twitter