There’s strength in numbers. The best defense is a good offense. And it’s OK if a few die as long as most survive. People in the Middle Ages knew this, which is why they built castles, invented the crossbow and raised professional armies.But the social organisation and investment in technology that characterised the rise of modern civilisation wasn’t exactly a new idea. It turns out bacteria had been onto it for a couple of billion years.Bacteria are among Earth’s simplest forms of life. They are single-celled, have no nucleus, and multiply by simple cell division, not sexual reproduction. Nevertheless, research in recent years has revealed that they have complicated — if entirely un-self-conscious — social lives.It’s now clear that bacteria are capable of detecting their fellow bacteria, balancing personal and group needs and, if necessary, laying down their lives for the common good.The latest insight into this surprising and largely overlooked behavior came in a study published last week in the online Public Library of Science journal PLoS One. An international team of biologists reported that when some species of marine bacteria form immobile “biofilms,” they produce chemicals that are specifically toxic to the predators that show up to eat them.“We found that biofilms are resistant whenever an attacker comes their way. The question is, how do they do it?” said Carsten Matz, a microbiologist at the Helmholtz Center for Infection Research in Germany who led the research team.Biofilms consist of large collections of bacteria stuck together in a slimy “matrix” that the organisms themselves produce and secrete into the environment. Their existence has been known for a long time. But what has become clear in recent years is that a bacterium in a biofilm behaves quite differently from the very same bacterium in the free-floating (or planktonic) state. The difference is in the organism’s metabolism — the making and breaking down of chemical compounds — activities that require energy and are done only if there is a payoff.A major insight was that biofilm-based metabolism is triggered by an event called “quorum sensing”. Somehow, bacteria can detect the presence of other bacteria around them. When the density gets high enough, the organisms switch into biofilm mode, producing and excreting the slime that then cements them together.Quorum sensing depends on some sort of signaling among bacteria — although because the organisms have no nervous systems, the signaling is clearly unintentional in the conventional sense.For some biofilm-producing species, waste products appear to be the signal. When many bacteria are near one another, those substances rise to a concentration at which they are detectable by the individual organisms. They then trigger the metabolic changes.