Many a mother has said, with a sigh, “If your friends jumped off a cliff, would you jump, too?”

The answer, for cockroaches at least, may well be yes. Researchers using robotic roaches were able to persuade real cockroaches to do things that their instincts told them were not the best idea.

This experiment in bug peer pressure combined entomology, robotics and the study of ways that complex and even intelligent patterns can arise from simple behavior. Animal behavior research shows that swarms working together can prosper where individuals might fail, and robotics researchers have been experimenting with simple robots that, together, act a little like a swarm.

“We decided to join the two approaches,” said José Halloy, a biology researcher at the Free University of Brussels and lead author of a paper describing the research in today’s issue of the journal Science.

Dr. Halloy and his colleagues worked with roaches because their societies are simple, egalitarian and democratic, with none of the social stratification seen in some other insect societies — no queen bees, no worker ants. “Cockroaches are not like that,” Dr. Halloy said. “They live all together.”