“We lose baits all the time,” he said.

But in this case, the problem was not a poison that had become ineffective. The cockroaches just seemed to avoid any bait that had glucose.

Dr. Silverman showed that this behavior was inherited, not something an individual roach learned during its brief life. And a few years ago the North Carolina researchers decided to investigate what caused the change.

Instead of taste buds, roaches have taste hairs on many parts of their bodies. The three North Carolina researchers concentrated on those around the mouth area and on two types of nerve cells that sense tastes and respond by firing electrical signals to the brain. One responds only to sugars and other sweet substances; the other responds only to bitter substances. Whenever a molecule of something sweet attaches to a sweet detector, it fires electrical impulses and the roach brain senses sweetness, which makes it want to eat whatever it is tasting. Whenever a molecule of something bitter attaches to the bitter detector, that cell fires and the brain senses bitterness, which makes the roach want to avoid that substance.

But somehow the roaches had changed so that the glucose made the bitter detector fire.

“Basically,” said Dr. Buczkowski, “when cockroaches taste glucose, they’re repelled by it because it tastes bitter to them.”

Dr. Schal said the next step was to figure out the details of the genetic mutation that had occurred. Perhaps a mutation changed the molecules that detect bitter substances so that they would be sensitive to glucose, too. Or a different sort of mutation could have caused the dedicated bitter neurons to have lots of standard glucose detectors, which did not exist on those neurons before — a shift that also would have made the insects register sweet glucose as bitter.

The research may be relevant far beyond roach control, perhaps helping to explain the behavior of mosquitoes that spread malaria, Dr. Schal said.

“The mosquito changed its behavior,” he said, “and no longer rests on walls that are treated with insecticide. Instead it tends to rest on the ceiling, or it tends to rest on the outside walls that are not treated with insecticide.

“We still don’t understand the cellular, the neural mechanism responsible for this change in behavior of the mosquito,” he said, so the approach that yielded results with the cockroach could offer useful insights.