Berkley, CA - Hermit crabs that carve out shells to make more suitable homes keep them within safe limits, say scientists.
Ecuadorian hermit crabs are known to "remodel" the shells of other species to make them more spacious.
US researchers tested the strength of the altered shells to understand their benefits and drawbacks.
They found that the excavated shells could still protect the crabs from predators, suggesting an evolved "building code" for the crabs' homes.
There are over 800 species of hermit crab worldwide but only a dozen live entirely on land.
Dr Mark Laidre studied the crabs with colleagues from the University of Berkeley, California. Their results are published in the journal of the Royal Society Interface.
"The remodelled homes, while being far more breakable than than un-remodelled homes, are nevertheless still outside the range of the maximum bite force of the crabs' predators," said Dr Laidre.
"This suggests that crabs only remodel their homes up to a threshold that keeps them safe."
Ecuadorian hermit crabs live on land and protect their soft bodies from predators by adopting the empty shells of dead gastropods.
But these hermit crabs must bear the whole weight of their homes when moving around, unlike their sea-dwelling cousins that are assisted by the water.
Previous studies have shown how heavy shells can slow the land-based crabs down considerably. But they are known to make their homes more lightweight by scraping and chemically eroding the shells' interiors.
To test the strength of these altered shells, researchers subjected a selection of them to the same crushing force as exerted by the jaws of the crabs' natural predators - racoons, coatis and opossums.
Dr Laidre told BBC Nature he was "really excited" when the data revealed that the crabs were keeping their home improvements within safe limits.
The crabs shave down the insides of the shell homes to make them more lightweight "They do appear to 'consider' predators when remodelling their homes," he said.
"But this 'consideration' is likely a consequence of past evolutionary selection, which eliminated crabs that remodelled their homes too much since these individuals would have been eaten by predators."
"The hard-wired tendency, to only remodel one's home up to a specified degree, was passed on and now seems to be fixed in the population."
Dr Laidre explained that the remodelled shells offered a number of benefits to the crabs including more space for females to brood eggs and males to grow, boosting their chances of reproductive success.
In the past, animals that create their own homes, from castle-constructing termites to lodge-building beavers, have been referred to as "architects".
Scientists tested the shells in the lab using a hydraulic post Scientists have highlighted the development of the optimal building through generations as an example of natural selection: that only those with the best homes survive.
Dr Laidre suggested that animals repurposing existing dwellings follow suit.
"Hermit crabs and other opportunistic inhabits of dwellings may be 'secondary architects' whose remodelling behaviour has been shaped by natural selection," he said.
He suggested the animals "may be far more sophisticated in their architectural savvy than has previously been recognised".