A new test of cephalopod smarts has reinforced how important it is for us humans to not underestimate animal intelligence.

Cuttlefish have been put to a new version of the marshmallow test, and the results appear to demonstrate that there's more going on in their strange little brains than we knew.

Their ability to learn and adapt, the researchers said, could have evolved to give cuttlefish an edge in the cutthroat eat-or-be-eaten marine world they live in.

The marshmallow test, or Stanford marshmallow experiment, is pretty straightforward. A child is placed in a room with a marshmallow. They are told if they can manage not to eat the marshmallow for 15 minutes, they'll get a second marshmallow, and be allowed to eat both.

This ability to delay gratification demonstrates cognitive abilities such as future planning, and it was originally conducted to study how human cognition develops; specifically, at what age a human is smart enough to delay gratification if it means a better outcome later.

Because it's so simple, it can be adjusted for animals. Obviously you can't tell an animal they'll get a better reward if they wait, but you can train them to understand that better food is coming if they don't eat the food in front of them straight away.

Some primates can delay gratification, along with dogs, albeit inconsistently. Corvids, too, have passed the marshmallow test.

Last year, cuttlefish also passed a version of the marshmallow test. Scientists showed that common cuttlefish (Sepia officinalis) can refrain from eating a meal of crab meat in the morning once they have learnt dinner will be something they like much better - shrimp.

As a team of researchers led by behavioural ecologist Alexandra Schnell of the University of Cambridge point out in a new paper, however, in this case it's difficult to determine whether this change in foraging behaviour in response to prey availability was also being governed by an ability to exert self-control.

So they designed another test, for six common cuttlefish. The cuttlefish were placed in a special tank with two enclosed chambers that had transparent doors so the animals could see inside. In the chambers were snacks - a less-preferred piece of raw king prawn in one, and a much more enticing live grass shrimp in the other.

The doors also had symbols on them that the cuttlefish had been trained to recognise. A circle meant the door would open straight away. A triangle meant the door would open after a time interval between 10 and 130 seconds. And a square, used only in the control condition, meant the door stayed closed indefinitely.

In the test condition, the prawn was placed behind the open door, while the live shrimp was only accessible after a delay. If the cuttlefish went for the prawn, the shrimp was immediately removed.

Meanwhile, in the control group, the shrimp remained inaccessible behind the square-symbol door that wouldn't open.

The researchers found that all of the cuttlefish in the test condition decided to wait for their preferred food (the live shrimp), but didn't bother to do so in the control group, where they couldn't access it.

"Cuttlefish in the present study were all able to wait for the better reward and tolerated delays for up to 50-130 seconds, which is comparable to what we see in large-brained vertebrates such as chimpanzees, crows and parrots," Schnell said.

The other part of the experiment was to test how good the six cuttlefish were at learning. They were shown two different visual cues, a grey square and a white one. When they approached one, the other would be removed from the tank; if they made the "correct" choice, they would be rewarded with a snack.

Once they had learnt to associate a square with a reward, the researchers switched the cues, so that the other square now became the reward cue. Interestingly, the cuttlefish that learnt to adapt to this change the quickest were also the cuttlefish that were able to wait longer for the shrimp reward.

That seems like cuttlefish can exert self control, all right, but what's not clear is why. In species such as parrots, primates, and corvids, delayed gratification has been linked to factors such as tool use (because it requires planning ahead), food caching (for obvious reasons) and social competence (because prosocial behaviour - such as making sure everyone has food - benefits social species).

Cuttlefish, as far as we know, don't use tools or cache food, nor are they especially social. The researchers think this ability to delay gratification may instead have something to do with the way cuttlefish forage for their food.

"Cuttlefish spend most of their time camouflaging, sitting and waiting, punctuated by brief periods of foraging," Schnell said.

"They break camouflage when they forage, so they are exposed to every predator in the ocean that wants to eat them. We speculate that delayed gratification may have evolved as a byproduct of this, so the cuttlefish can optimise foraging by waiting to choose better quality food."

It's a fascinating example of how very different lifestyles in very different species can result in similar behaviours and cognitive abilities. Future research should, the team noted, try to determine if indeed cuttlefish are capable of planning for the future.

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