CHICAGO - When red pandas go on exhibit for the first time at Brookfield Zoo in July, they will be housed around a broad tree that looks like a giant bonsai and has magical qualities.

At semirandom intervals throughout the day, food will drop automatically into stainless-steel cups expertly fitted into what look like huge knotholes in the "tree," a construction of welded metal, plastic mesh, and concrete.

The red pandas - telegenic, frequently erect-standing relatives to raccoons, rather than to bears or giant pandas - will learn that the cups sometimes contain food, sometimes not. In this way, the theory goes, they will also stay metaphorically on their toes, engaged with their environment and steadily on the hunt for sustenance.

"Now the habitat provides, instead of the keeper," says Tim Sullivan, the zoo's curator of behavioral husbandry. "Food can appear, like in the wild."

Sullivan is helping to lead what he calls a paradigm shift at Brookfield, a revolution in the way its residents eat that is proving to have benefits for guests and animals alike. Instead of the old regimen of keepers delivering food two or three times a day on a set schedule, the zoo is working to propagate semirandom feeding devices throughout its 216-acre property. It is being used in 15 to 20 percent of exhibits now, but the goal is to get to near-blanket coverage within five years.

"My ultimate goal is to get every animal off the feeding plan," Sullivan says. "The story is always the same: We give the animals something else to do, and they're more than happy to do it."

At the heart of the efforts is the makeshift lab where Sullivan and fellow keeper Dan Powell play MacGyver by modifying existing devices, inventing new ones and puzzling out such problems as: What is the best way to deliver a cricket to a meerkat? (In a cardboard tube, on a slow-moving belt.)

Describing another concoction, Powell says, "Oh, it's a modification of a potato gun, really. It can rain food down on the whole exhibit, and the animal never knows where it's coming from." He pauses, and adds with a smile, "Plus, I got to make a potato gun at work."

Some of their devices use modified coolers to keep chilled food fresh. One notion is to use melting ice as a timing mechanism. They would love to install a pneumatic tube system that would deliver tubes made of gelatin, but half-million-dollar exhibit retrofits are not likely.

Among the supplies, there's a box full of automotive door locks and also turn-signal relays on hand, for remotely unlocking doors to food.

It's not the work they signed on for when they began careers as zookeepers, but it feels as vital to them as the aspects of animal husbandry that may be more familiar to visitors. Plus, says Sullivan, "We have to exercise our minds too."

"Our main reason for doing it is to create an overall holistic approach to animal welfare," says Bill Zeigler, the zoo's senior vice president of animal programs. "We believe that as animals do in the wild, they should do under professional care, and that is work for a living."

The result, in anecdotal observation and in two scientific papers Brookfield zoologists have written, has been more active animals, which has equated to visitors spending more time in front of the animals.

"When an animal's in the wild," Zeigler says, "the first thing it does in the morning, it says, you know, 'I've got to find food.' And it doesn't get that 8:30-in-the-morning and 4-in-the-evening feeding." Such food drops can bookend a sort of torpor that produces, says Zeigler, a "couch-potato mentality."

Brookfield's formal experiments started in the late 2000s, with a fennec fox study that proved semirandom feeding boosted animal activity and visitor engagement.

"It's important that animals don't simply wait for their people," said Jason Watters, a former director of animal-behavior research at Brookfield who is now vice president of wellness and animal behavior at the San Francisco Zoo.

"There had been previous attempts to do randomized feeds throughout the day and that kind of thing [including hiding of food]. We sort of did it differently in a mixture of random and predictable. That's what worked out well."

Some early efforts to put this proof into action, in a program Watters calls "dynamic resource allocation," were crude.

Using PVC pipe and a hacksaw, according to Sullivan, he, Powell, and Watters devised mechanisms that fit into a tree and provided irregular meals for a type of parrot, but the birds figured out how to just shove the food doors aside rather than wait for their automatic opening.

A next big problem for Sullivan and Powell to tackle is a way to randomize delivery of big food to big animals. "How do you distribute two or three bales of hay to a hippo or a rhino in a timed way?" Sullivan wonders.

And, as is common at zoos, Sullivan is eagerly anticipating a new delivery. This one is not a new baby, though, but rather an order of 24 of the $200-plus Baby Belt Feeders. From there, "it's just left up to your imagination of how to solve the different exhibits," he says.

"The answer was always there," Sullivan says. "In the past, keepers have focused on filling the void [between feedings] with play. People said, 'The only types of enrichments animals use are ones that involve feeding.' Why not create foraging opportunities?"