A TRIP to the supermarket may not seem like an exercise in psychological warfare—but it is. Shopkeepers know that filling a store with the aroma of freshly baked bread makes people feel hungry and persuades them to buy more food than they had intended. Stocking the most expensive products at eye level makes them sell faster than cheaper but less visible competitors. Now researchers are investigating how “swarm intelligence” (that is, how ants, bees or any social animal, including humans, behave in a crowd) can be used to influence what people buy.

At a recent conference on the simulation of adaptive behaviour in Rome, Zeeshan-ul-hassan Usmani, a computer scientist from the Florida Institute of Technology, described a new way to increase impulse buying using this phenomenon. Supermarkets already encourage shoppers to buy things they did not realise they wanted: for instance, by placing everyday items such as milk and eggs at the back of the store, forcing shoppers to walk past other tempting goods to reach them. Mr Usmani and Ronaldo Menezes, also of the Florida Institute of Technology, set out to enhance this tendency to buy more by playing on the herd instinct. The idea is that, if a certain product is seen to be popular, shoppers are likely to choose it too. The challenge is to keep customers informed about what others are buying.

Enter smart-cart technology. In Mr Usmani's supermarket every product has a radio frequency identification tag, a sort of barcode that uses radio waves to transmit information, and every trolley has a scanner that reads this information and relays it to a central computer. As a customer walks past a shelf of goods, a screen on the shelf tells him how many people currently in the shop have chosen that particular product. If the number is high, he is more likely to select it too.

Mr Usmani's “swarm-moves” model appeals to supermarkets because it increases sales without the need to give people discounts. And it gives shoppers the satisfaction of knowing that they bought the “right” product—that is, the one everyone else bought. The model has not yet been tested widely in the real world, mainly because radio frequency identification technology is new and has only been installed experimentally in some supermarkets. But Mr Usmani says that both Wal-Mart in America and Tesco in Britain are interested in his work, and testing will get under way in the spring.

Another recent study on the power of social influence indicates that sales could, indeed, be boosted in this way. Matthew Salganik of Columbia University in New York and his colleagues have described creating an artificial music market in which some 14,000 people downloaded previously unknown songs. The researchers found that when people could see the songs ranked by how many times they had been downloaded, they followed the crowd. When the songs were not ordered by rank, but the number of times they had been downloaded was displayed, the effect of social influence was still there but was less pronounced. People thus follow the herd when it is easy for them to do so.

In Japan a chain of convenience shops called RanKing RanQueen has been ordering its products according to sales data from department stores and research companies. The shops sell only the most popular items in each product category, and the rankings are updated weekly. Icosystem, a company in Cambridge, Massachusetts, also aims to exploit knowledge of social networking to improve sales.

And the psychology that works in physical stores is just as potent on the internet. Online retailers such as Amazon are adept at telling shoppers which products are popular with like-minded consumers. Even in the privacy of your home, you can still be part of the swarm.