They say you can't teach an old dog new tricks, but researchers in Austria beg to differ. Their experiments show that canines of all ages respond positively to touchscreen games — and they think that something akin to "dog Sudoku" might help keep pets mentally sharp even as their physical abilities decline.

"The positive feeling created by solving a mental challenge is comparable to the feeling that older people have when they learn something new, doing something they enjoy," Dr. Ludwig Huber, a cognitive biologist at the University of Veterinary Medicine Vienna and the senior author of a paper about the research, said in a written statement. "Regular brain training shakes not only us, but also dogs out of their apathy in old age, increasing motivation and engagement and thus maximizing learning opportunities."

For their research, conducted between 2010 and 2017, the scientists tested 265 dogs and 20 wolves at facilities in Austria and Hungary. The animals — mostly pets — were trained to push their snouts against a touchscreen in response to flowers, teddy bears, and other imagery displayed there.

It took weeks of training, but eventually even older dogs were able to reliably press the right image to receive a food treat.

Get the mach newsletter. This site is protected by recaptcha

"The fact that the older dogs were able to learn such abstract and sometimes difficult tasks was very encouraging," Dr. Lisa Wallis, a cognitive biologist with the Senior Family Dog Project at Eotvos Lorand Universtiy in Budapest, Hungary, and the paper's first author, told NBC News MACH in an email.

She added that the dogs enjoyed the touchscreen training sessions and that their owners observed "positive benefits of the training in their dogs' everyday lives."