This work opens the door to more sophisticated experiments.
Crabs can navigate their way around a complex maze and remember the route to find food, research has found.
Researchers at Swansea University tested 12 common shore crabs over four weeks, placing food at the end of the maze each time.
The route to the end of the maze required five changes in direction and included three dead ends.
Over the four-week period, the crabs improved both the time they took to find the food and reduced the number of wrong turns they made.
When they returned to the maze two weeks later - without any food on offer - they all reached the end within eight minutes.
Crabs that had not been in the maze before took far longer to reach the end, with some not making it during the one-hour study period.
Dr Ed Pope, a marine biologist, said the study aimed to gain a better understanding of spatial learning in crustaceans.
"This study is important because we know that insects, especially ants and bees, have some impressive mental abilities but we haven't really looked for them in their aquatic counterparts," Dr Pope, of Swansea University, said.
"The fact that crabs show a similar ability to insects is, in some ways, not that surprising but it is great to be able to show it so clearly.
"This work opens the door to more sophisticated experiments looking at how changing ocean conditions might affect crabs' ability to learn and adapt to find food in future."
The research is published in the journal Biology Letters.
Claire Hayhurst is a reporter with PA.