Emergence is a tour of what are called adaptive self-organising systems: systems that are made up of many interacting agents who are individually not terribly smart, but who collectively come up with intelligent higher-level behaviour. An ant colony is a great example of this kind of system: nobody is technically "in charge", and yet somehow the ants manage to behave in astonishingly complex and nuanced ways: quickly determining the shortest distance to a nearby food source, shifting roles among the colony members in response to changing needs. It turns out that the world is filled with these systems: in the formation of city neighborhoods, in the way our immune system learns about new invading microorganisms, in the neuronal connections of our brains.

The simplest rule of all the systems I talk about in the book is: learn from your neighbours. An individual ant alters its behaviour based on the behaviour of other ants that it happens to encounter; out of all those semi-random encounters, the higher-level order of the colony emerges. A neuron in your brain decides to fire or not to fire based on the input from other neurons to which it is connected. A given "block" in the game SimCity decides to raise or lower its crime rate or pollution levels based on the crime or pollution in neighbouring blocks. All of these systems follow relatively simple rules, but they project those rules out over thousands (or, in the case of the brain, billions) of interacting agents. Given enough interactions, and given the right rules, something magical happens: the colony starts organising its workforce; the brain starts thinking; the simulated city comes to life on the screen.

Guardian readers may already know something about emergent behavior if they've read books like Chaos, or Kevin Kelly's wonderful Out of Control. But what's happening now is that our growing understanding of "bottom-up" intelligence is being channelled towards consumer-level software applications. Emergence, in other words, is becoming something that we interact with directly via our computers.

A site such as eBay is a wonderful example of bottom-up software at work, as is the recommendation system of Amazon. If you use Amazon a lot, particularly for books, where they have the greatest amount of data, you'll find that the software is pretty uncanny in its ability to recommend books you'll be interested in. (It's not always so good at predicting what you'll actually like.) That's a great example of emergent intelligence: the system has got smart by looking for patterns in users' purchasing behaviour, and in their limited feedback about the items they've read. It's a kind of collective wisdom, and it's much more fluid and nuanced than the logic we traditionally expect from our computers.

One of the other arguments that I make in the book is that cities are information storage and retrieval devices; it's no accident that so many crucial inventions date back to the origins of cities, around 5,000 years ago. Cities have many local reasons for being, but a primary reason for their global success is that they do such a good job of capturing and maximizing good ideas. You come up with a new idea for a plough in rural isolation, and it may well die off with your grandchildren. Bring it to the city centre, with the city's lively connections to the outside world, and the idea lives on for ever.

Ideally, that's what the web should be, but it requires us to think about how to get the right information to the right people. The problem with the web is that it's already far larger than the largest city on the planet, and it's growing at an unprecedented clip, despite the recent economic downturn. When the great cities of the world experienced growth spurts, they dealt with the problem of growing too big too fast by developing neighbourhoods - clusters of like-minded people gathering together and sharing their ideas within the larger metropolitan context. The web needs to undergo a similar transformation in order for it to deal with its growth rate. It needs to learn how to cluster.