So there is no way out of molting for mantis shrimp, but that’s not the end of the evolutionary story.
Many species of mantis shrimp live in underwater cavities, which provide protection. However, these cavities are in low supply. So mantis shrimp may compete fiercely with one another for homes, even staging fights in order to evict an opponent.
For these mantis shrimp, survival is tightly coupled to ruling a good roost. And, as you might guess, a molting mantis shrimp really needs a protective nook, or cavity. Unfortunately, a molting mantis shrimp is also poorly equipped for defending its cavity against invaders. Since it can’t avoid molting entirely, over the course of evolution, natural selection favored any individual with characteristics that helped it defend its home during molting.
In order to learn about adaptations that mantis shrimp evolved for protecting their cavities, biologists performed a series of experiments. They selected a territorial species of mantis shrimp, Neogonodactylus bredini, and staged fights in laboratory aquaria between animals of different sizes and in different stages of their molting cycle. And they discovered something surprising: mantis shrimp have evolved several strategies for keeping their cavities — and frequently try to “trick” their opponents by bluffing.