Can you remember what you had for dinner last Tuesday? Or on this day last year? It turns out that cuttlefish can, right up to old age – the first animal we've found that doesn't show signs of deterioration in memory function over time.

In humans this is known as episodic memory, the what-where-when of past events, as opposed to semantic memory, where we remember what we've learned in the past without the specific details of learning it. Here, researchers describe "episodic-like memory", and they think it could be tied into cuttlefish mating behaviors.

What makes cuttlefish good subjects for this study is that they only live for a couple of years, making it easier to compare memories over their lifespans. Based on new experiments, it seems memories made late in life remain razor-sharp.

"Cuttlefish can remember what they ate, where and when, and use this to guide their feeding decisions in the future," says comparative psychologist Alexandra Schnell from the University of Cambridge in the UK.

"What's surprising is that they don't lose this ability with age, despite showing other signs of aging such as loss of muscle function and appetite."

The team experimented with 24 common cuttlefish (Sepia officinalis), putting them through foraging training where they learned when and where two types of food were available: grass shrimp (which cuttlefish prefer) and king prawn.

Using subsequent tests, the cephalopods demonstrated that they remembered the what-where-when elements of their training – evidence of episodic-like memory – in order to grab the preferable food the next time it was on the menu.

The two sub-groups in the research, 10-12 months old (not quite adult) and 22-24 months old (well into old age), took the same amount of time to learn how to find the best food and made the same amount of correct choices in picking it.

Part of the reason that this excellent memory recall might have evolved is due to cuttlefish not mating until right at the end of their lives, the researchers suggest. Perhaps by remembering what they did to obtain previous partners, the mollusks are able to spread their genes more widely.

"The old cuttlefish were just as good as the younger ones in the memory task – in fact, many of the older ones did better in the test phase," says Schnell. "We think this ability might help cuttlefish in the wild to remember who they mated with, so they don't go back to the same partner."

There's still lots to work out about how episodic-like memory functions in animals – as they're not really able to communicate with us, assessing it is difficult, but previous research has made some inroads in this field.

Evidence of episodic-like memory has been observed in other animals, including rats and jays, but the researchers say there's something about cuttlefish that sets them apart at the moment: not seeing these memories deteriorate as they get older.

That might be because, unlike humans and other vertebrates, cuttlefish brains don't have a hippocampus – which is closely linked to memory. Learning and memory do decline in cuttlefish, but only two or three days before death.

"These results suggest that the episodic-like memory system in cuttlefish differs from the episodic-like memory in other non-human species, at least in terms of its development across the lifespan of the animal," the researchers write in their published paper.

"Whether this difference is a result of the different neuroanatomy possessed by cuttlefish requires further attention."

The research has been published in Proceedings of the Royal Society B.