Our feline friends certainly wow us with their cleverness - they can fetch things, open doors, navigate seemingly impossible obstacles, and even understand basic instructions (when they feel like it, anyway).

At other times, they can be hilariously silly.

Any cat lover is familiar with their quirks, such as seemingly endless joy at knocking things off tables, and an innate fondness for sitting in enclosed spaces. The latter can apply even if that space is just a two-dimensional outline of a square on the floor.

In a delightful citizen science study performed during the COVID-19 pandemic, researchers used cats' urge to sit in enclosed spaces to test how their little minds perceive a visual illusion. The study was affectionately labelled… wait for it… "If I fits, I sits".

The illusion at hand was the Kanizsa square: four pacman-like shapes orientated to look like they're forming four corners of a square, inducing the viewer to perceive a square that isn't actually there.

Such illusions happen when our brains fit visual information around preconceptions, likely to fill in missing information. They're quite handy for picking out predatory or food shapes obscured by foliage.

A cat sitting in the xxx illusion square (right). (Smith et al, xxxx  2021)A cat sitting in a regular square (l) and the Kanizsa square illusion (r). (Smith et al., Applied Animal Behaviour Science 2021)

Cognitive ethologist Gabriella Smith from the City University of New York and colleagues recruited humans to set up floor objects for their feline lordlings to choose from - a taped square, a visual illusion of a square, and the same components as the visual illusion, but not arranged to produce a square (the control).

The cat owners were required to film the cats' response under reasonably controlled conditions to avoid influencing the animals' choices (this involved wearing sunglasses, too). While over 500 pet cats were originally enrolled, the final data set shrunk down to 30 citizen scientists who managed to complete all the necessary trials.

"The cats in this study stood or sat in the Kanizsa and square stimuli more often than the Kanizsa control, revealing susceptibility to illusory contours and supporting our hypothesis that cats treat an illusory square as they do a real square," they found.

Of course, not all cats want to be predictable like that:

The researchers note that the study results were limited by the small final sample size, but their work adds to previous research that has found cats respond to visual illusions of contours; additionally, it's the first time this was tested on cats in an environment familiar to them.

That could be an important detail, because cats generally loathe being in new environments - like a lab - so they're more likely to display their natural behaviors at home.

Understanding how animals perceive visual illusions like this could help us compare their vision across different species without requiring language they don't possess.

As for why these floofy enigmas sit if they fit, that has yet to be fully scientifically investigated. Smith and team suggest using three-dimensional Kanizsa squares to further explore this.

Studies have shown sitting in boxes can decrease stress in shelter cats, so it wouldn't be too much of a leap to suggest cats just feel more comfortable when enclosed.

"Their vision is built for distance and speed, watching a mouse run across the field. Close up they're virtually blind 8 to 12 inches off their muzzle," cat behaviorist Ingrid Johnson told Treehugger last year.

"I would imagine they probably feel as if they are 'in' something… like laying in a cardboard canned food tray. Though shallow, still comforting, offers parameters or at least the perception of sides."

"This virtual box may provide some misplaced sense of security and psychosomatic comfort," Tufts University ethologist Nicholas Dodman wrote for The Conversation after the #catbox meme took off in 2017.

And it's not just little cats that like boxes - big cats do, too.

Perhaps most importantly, the lessons from this new study using citizen scientists open the way for greater investigations into the mysteries of the feline mind.

"Cat cognition research is certainly lacking in comparison to domestic dogs, and although the reason for this is unclear, the use of citizen science as a precursor to in-lab investigations of cat cognition could greatly help bridge this divide," the team wrote.

This research was published in Applied Animal Behaviour Science.