For many years, Pittsburgh was a place 20-somethings fled or avoided. In the 1990s, Allegheny County, which includes the city, was the second-oldest large county in the United States, behind only a geriatric zone in Florida. It was a notoriously difficult place to be young and single, and an earlier generation of computer science students put in their four years at Carnegie Mellon, grabbed their diplomas and left.

This is the sleepy city Jean Yang knew while growing up near the campus, where her father was a research scientist in the School of Computer Science. “I didn’t realize no one wanted to stay in Pittsburgh,” Ms. Yang said. “I was just leaving because I thought everyone wants to leave where they grew up. I really didn’t think I’d come back as an adult.”

But Ms. Yang’s field of research is in computer programming languages, and, as she put it, “C.M.U. is the best place for the kind of work I want to do.” When she was offered an assistant professor position in the School of Computer Science and discovered a changed Pittsburgh on her visits back, Ms. Yang accepted the job and returned last August.

“There’s definitely an excitement about being here,” she said. “I go out to eat and drink in East Liberty. Lawrenceville I go to a lot. Everywhere I go didn’t exist when I was growing up.”

While young, cool Pittsburgh may be a recent development, the research at Carnegie Mellon in the field of artificial intelligence has a long history. The university was the first in the world to establish a machine-learning department, and its Robotics Institute, a division of the School of Computer Science, tested an autonomous vehicle, the Terregator, back in 1984.