Caribbean box jellyfish are barely a centimeter long and have no brain.

But these gelatinous, fingernail-sized creatures are capable of learning from visual cues to avoid swimming into obstacles — a cognitive ability never before seen in animals with such a primitive nervous system, researchers said on Friday.

Their performance of what is called "associative learning" is comparable to far more advanced animals such as fruit flies or mice, which have the notable benefit of having a brain, the researchers said.