Like centuries of momma pigs before her, sow No. 9 was bred to eat and have babies.
But as an exemplar of 21st-century farming, how would the 400-pound, bristle-haired creature fare when confronted with a rudimentary video game?
Quite well, it turns out.
Upon spotting a red square on a video screen the other day, the animal nudged a joystick with her snout, as she had been trained to do, and was rewarded with a snack.
"She's not our prettiest sow, but she's a smart one," said Kristina M. Horback, an animal behavior scientist at the University of Pennsylvania.
This porcine puzzler was not really a game, nor was it a test of intelligence (pigs are indeed a sharp species), but part of an effort at Penn's School of Veterinary Medicine to assess their psychological well-being.
Prompted by animal-welfare groups and, increasingly, frequent customers such as McDonald's, the pork industry is moving away from housing its sows in the confining "crates" or stalls that had been the norm for more than 40 years. About 20 percent of animals on United States farms now are sheltered, instead, in "group housing" — pens that enable them to interact and walk around, including one model developed by Penn veterinarian Thomas Parsons.
The joystick exercise, at the vet school's New Bolton Center in Kennett Square, was part of an effort to discern which pigs are best suited to this lifestyle.
"If it's a person we could just ask them, but we can't really do that with a pig," Parsons said.
Farmers, of course, want the approach that yields the most productive sows, as indicated by such metrics as the health and size of their litters. Yet those who have worked with the Penn team say they will be intrigued to hear whether the study of pig psychology bears a relation to raw measures of agricultural success.
In other words, do "happier" pigs produce more piglets — and ultimately more ham, bacon, and pork chops?
"They're doing a lot of interesting stuff," said Bob Ruth, president of Country View Family Farms, which has 50,000 sows at 18 locations in central Pennsylvania, with 60 percent of the animals in group housing. "We want to make sure that the data that we're looking at actually improves the overall care of the animal."
At Penn's swine center, sow No. 9 and her peers are being trained to respond to two cues.
A small red square on the video screen means the sow can earn a reward by nudging the joystick. A large white square, on the other hand, is a signal to leave the joystick alone — or else endure a three-second whistle blast.
Then comes the real test. Periodically, the animals will be shown a medium-sized pink square — a signal for which they have not been trained what to expect.
Will they nudge the joystick in hopes of a reward? Those that do might be judged to have a positive "bias" or outlook on life, said Horback, a postdoctoral researcher who previously studied the behavior and cognition of dolphins and elephants in zoo settings.
And the pigs that leave the joystick alone?
"They're pessimistic," she said. "They could be in an anxious state, a fearful state, a depressed state. We don't know which."
It may sound a bit murky, but there is evidence from other species to suggest that such three-pronged tests can be used to determine which ones have a positive outlook.
And the Penn researchers are gathering reams of additional data. This year in the journal Animal, Horback and Parsons reported testing sows for five traits: aggressive and social behaviors when mixing in a group, reaction to human approach, ease of handling, willingness to explore an open field, and reaction to a novel object.
The hope is that performance on such metrics can be used to identify which pigs are most likely to thrive in group housing, so that farmers can selectively breed them.
The recent study yielded a few promising clues. Those that tended to avoid humans, for example, were more likely to produce stillborn piglets, perhaps because the sows interrupted labor when someone approached. Other work by the team suggests that an animal's temperament is consistent over time, and may become apparent in the first few weeks of life.
The research at Penn is unusual in that it focuses on sows, which live for up to six years before they are turned into sausage. The bulk of behavioral research is done on piglets because the logistics for small animals are easier and less expensive, Horback said.
To date, the various arrangements that humans have devised for raising sows all have been fraught with trade-offs. A key cause for concern: The animals can be combative.
Decades ago, farmers would toss feed on the floor, and the pigs would fight it out. Dominant animals got more than their share while others went wanting. Cuts and scratches were common.
Gestation stalls prevent that problem, allowing each sow to eat in peace. But the 2-by-7-foot enclosures do not allow enough room to turn around. They have been banned in the European Union and in some states.
Then came group housing, which sought to offer the best of both approaches. In the system that Parsons developed, sows can roam about the barn, inside and out, with an average of 22 square feet per animal.
When it is time to eat, the animals line up at automated feeding stalls, which allow them to chow down one at a time. An electronic ID tag on each pig's ear dictates how much food it gets.
"They learn that it's really not worth fighting over because everybody gets their turn," Parsons said.
The animals still sometimes scuffle over desirable sleeping areas and who gets to be in the popular cliques. But a dominant sow can just as easily exert her will in such matters with aggressive body language, provoking a loud yelp from the pig that retreats in protest.
After hearing one such cry in the barn recently, Parsons remarked: "That's social interaction. That was better than a fight."
Horback, given her previous work with dolphins, often is asked how pigs stack up in the brains department. Both species are popularly perceived as smart, and Horback said it is true in both cases.
It's hard to say which has the edge, but both have evolved brains that allow them to make optimal use of their environments, said Horback, who is leaving Penn in the fall for an assistant professorship at the University of California-Davis.
Several attributes indicate pig smarts, she said.
The animals have good spatial memory, the ability to recognize each other, and skill at problem-solving. Plus, they can engage in deception — tricking a fellow porker in order to snag a reward. George Orwell's Animal Farm, anybody?
One question the scientists do not seek to answer is whether the animals are better off in group housing vs. gestation stalls. Previous research has provided mixed results, perhaps depending in part on the skills of the farmers involved, Parsons said.
Group housing is the way the market is going, so he wants to help farmers pick the pigs that will make it as successful as possible.
And so far, it has proven to be at least as successful as gestation stalls by one key measure: