REVENGE might make us feel better, but in the end it is not the point. What matters is to make the world safer, and for that we need some inkling of why people who are neither mad nor stupid kill people they have never even met. We need a feel for the conditions that promote such behaviour and the mindset that leads to it. In short, we need some insight into that elusive quality known as human nature.

But what has emerged most starkly from 11 September is that we haven't a clue; or none, at least, that has enabled the world's leaders to improve on simple retaliation, which may be high-tech in execution but in strategy belongs to the Stone Age. To probe our own nature we should wherever possible bring science to bear, because its ideas are testable and so can be worked on and improved. With luck, it can move us beyond mere opinion. One obvious approach is to look at our own biology, for although we think of ourselves in ethereal terms - theologians speak of the soul, and Aristotle declared that we are "political animals" - we are also creatures of biology, evolved like any other, and it must be sensible to ask what that implies. For this we have to turn to the branch of biology known as evolutionary psychology.

Mere biology would scarcely seem up to the task of explaining why young men and women should sacrifice their own lives as suicide bombers. Their behaviour seems both shocking and incomprehensible, a cue for politicians to rage about "fanaticism" and resurrect the cold war concept of "brainwashing". Yet the term "fanaticism" taken alone has no explanatory value, and is often racist: the implication is that Muslims in general and Arabs in particular are prone to such behaviour, together perhaps with the northern Irish. This behaviour, it's implied, is innately pathological, and defies understanding. It cannot be seen as part of our evolved nature.

Can't it? A whole number of creatures from all sections of the phylogenetic tree, including many that have no brains to be washed and certainly follow no religion, are known to sacrifice themselves in all kinds of circumstances. The driving forces are clearly genetic, as it is possible in principle to show how such behaviours may follow Mendelian patterns of inheritance, and the underlying reasons can be analysed according to the rules of game theory.

The ubiquitous gut bacterium Escherichia coli provides a case study (Selection, vol 1, p 51). Two scientists at Michigan State University, Richard Lenski and Greg Velicer, found that when nutrients are in short supply, different strains of the bacterium engage in chemical warfare. Individuals within each strain produce toxins called colicins that kill bacteria of other strains but not their own. But there's a snag. Individual bacteria that produce the toxin kill themselves in the process, just as a honeybee does when it stings or, as Lenski and Velicer point out, like a "suicide bomber" (and they wrote their paper well before September 2001). Self-sacrifice makes evolutionary sense because the gene that promotes the behaviour is also contained within other bacteria of the same genotype. All individuals of a given genotype will contain the colicin gene, but only a few actually produce the toxin and so sacrifice themselves on behalf of the others. Game theory analysis can show what proportion will emerge as suicide bombers.

Humans, of course, are not bacteria. It would, however, be a significant metaphysical conceit to suppose that we can learn nothing from other creatures. We have genes too, and they influence our behaviour. The rules of genetics are universal, so the same broad forces that shape the general behavioural strategies of all creatures must apply to us too. Specifically, broad biological principles tell us that, whatever the species, it is not surprising that some individuals in a society - and not just those who are pathologically prone to "fanaticism" - might sacrifice themselves for the rest.

In our own species, suicide bombers and hijackers willing to die for the cause are more often young men rather than women. Female suicide bombers have recently struck several times in Israel, and the Tamil Tigers, who have carried out many more suicide bombings than the Palestinians, have also employed women bombers, but young male bombers are in the great majority. No one is surprised by this, because among all categories of human being - male and female, young and old - it's young men who are the biggest risk-takers, not just in matters of physical prowess but in all aspects of life.

This tendency may well derive directly from reproductive physiology. Females who are fertile and want to have a baby are generally able to do so. Males can in principle impregnate a great many mates but this increases the competition between them, so they can easily finish up with no mates at all, and often do. Males can't be certain of reproducing without taking risks: they cannot simply wait for a mate to call. Those who risk all might die in the attempt, but this is no worse genetically speaking than sitting around and dying childless; they might, by risking all, do very well indeed. Faint heart never won fair lady.

Young men's propensity for risk is easily quantified in violent crime. Thus in their classic study over several decades, Martin Daly and Margo Wilson of McMaster University in Ontario showed that in all societies, young men commit the overwhelming majority of murders. Of course, human behaviour is extremely flexible and the environment has a huge bearing on the likelihood that any one person, male or female, young or old, will commit murder. More women commit murder in Philadelphia than men do in Iceland. Set up the right comparison and you can find a group of women who are more violent than a group of men. But still, male murderers in Philadelphia outstrip Philadelphia's women murderers by 100 to 1, and the same ratio of men to women is found in the Philippines, and Scotland, and Denmark, and indeed in Iceland, although the number of murders there is so small that the statistics hardly register.

Evolutionary psychologists have also studied the other side of the coin: not conflict and violence, but sociality. Not all creatures are social but those that are clearly benefit in many ways. Common sense, observation and all manner of theories agree that sociality typically involves some measure of unselfishness, and this by definition implies that sociality exacts a price. The various theories of altruism throw light on where unselfishness comes from. The late evolutionary biologist Bill Hamilton's notion of kin selection neatly explained why creatures are liable to help their own kin, even at cost to themselves, and for any creature its immediate kin will inevitably form a significant part of its society. His ideas were taken further by Bob Trivers, an anthropologist at Rutgers University in New Jersey, to show why evolution might also favour individuals that help others they are not related to, in particular through "reciprocal altruism": one helps another in the hope and expectation that at some time the favour will be returned.

More progress has been made on the back of these fundamental ideas. John Maynard Smith's analyses of behavioural strategy through game theory, developed at the University of Sussex, are particularly important. His work shows that societies which appear to provide what Jeremy Bentham some two centuries ago called "the greatest happiness for the greatest number" may not be evolutionarily stable. Thus societies which contain only altruistic "doves" are as peaceful as can be since nobody will fight anyone else. But all-dove societies are liable to be upset by some mutant "hawk" that swaggers in and takes everything without opposition. The hawks will thrive and multiply until there are so many that they start clashing with other hawks, which is bad news for the hawks. So the hawks are more or less bound to appear among societies of doves, but their own hawkishness stops them becoming too numerous.

More generally, all societies require individuals to behave with some degree of altruism, and that in turn means that they are all at risk from freeloaders who take the goodies and do nothing in return. Trivers predicted that social creatures should be adept at detecting cheats and take a dim view of them. Evolutionary psychologists John Tooby and Leda Cosmides of the University of California, Santa Barbara, have tested this prediction in humans; and so it turns out. In laboratory tests they show that people find it hard to detect violations of an "if/then" rule laid out in logic but can do so easily and accurately if the violation represents cheating in a social situation. The conclusion is that our brains have specifically evolved to spot cheating. We have not simply evolved a general ability to think logically.

The other side of this coin has been explored by Robert Frank of Cornell University among others. In his books, including The Winner-Take-All Society, he develops the notion that humans have evolved a tremendously strong sense of justice. On the one hand we are acutely aware of being done down; on the other we go to great lengths to establish our reputations as good, honest people. In this, we go far beyond what might seem to be necessary: for example, we leave tips for waiters in restaurants we will never visit again, because we can't stop proving to the world how reliable we are.

Such notions can be tested indirectly. In Switzerland, Ernst Fehr of the University of Zurich and Simon Gachter of the University of St Gallen gave students a cooperative task of the "prisoner's dilemma" kind: all benefit if everyone plays honourably, but those who cheat benefit more provided they don't get found out (New Scientist, 12 January, p 11). The students were rewarded with real money if they did well and fined if they did not. They were also able to punish fellow players by imposing fines but only by paying a penalty themselves, so those who punished others a lot were liable to finish up with less money than those who punished very little. Surprisingly - though perhaps not so surprising to those versed in evolutionary psychology - the students tended to punish cheats severely, even though they lost out by doing so. People seem to hate cheats so much that they are prepared to incur significant penalties to punish them. Again, this tendency does not seem confined to humans; it is not just a part of our own specific "cultural overlay". Jennifer Scott at the Wesleyan University in Connecticut has found comparable behaviour in gorillas. Even the alpha males, huge and dominant though they are, are liable to be given a bad time by their subordinates if they appear to behave unjustly.

One more line of thought, this time deriving from Darwin's idea of sexual selection, seems to sew these disparate observations into a neat story. Darwin proposed the notion that selection did not act only on characteristics that made creatures better able to survive, but also on those that made them better able to attract mates. His ideas were neglected until Amotz Zahavi took them up in the 1970s to explore why animals do weird and wonderful things for the opposite sex that are quite useless or even damaging for day-to-day survival. Indeed, Zahavi proposed that mating displays with feathers and antlers and thunderous bass voices are impressive precisely because they are so costly in time and energy. It is as though the animal were saying: "What wonderful genes I must have to able to do this and survive too."

Geoffrey Miller, in The Mating Mind, suggests that all the greatest achievements of humans, including fine art and music and the ability to do calculus and speculate on God, began as displays of prowess. One way to stand out from the crowd is simply to be passionate, and young men are particularly prone to passion; indeed, Daly and Wilson have proposed that the extreme violence so often evident in young males can be construed as a form of showing off.

So as we draw together the various threads of evolutionary psychology it becomes easy to see how young men in particular want both to display their bravery, and are deeply offended by injustice, and on both counts may risk their own lives even to the point of certain death. When these people are on our side we call them heroes and martyrs; when they are not, we label them terrorists.

What does all this add up to? The general contribution of evolutionary psychology so far is to suggest that even flying an aeroplane full of passengers into a building full of ordinary people is not beyond human understanding. It should not be described simply in the mystifying language of psychopathology. It wastes everybody's time simply to smother the whole event and the people behind it in words like "wicked" and "evil". This is the vocabulary of desperation: expressions of intellectual and moral abdication, as if such acts must forever be beyond understanding, so there is nothing sensible to be done except to purge the world of their perpetrators, with as many bombs as it takes. Once we perceive that even such extreme behaviour is in principle comprehensible, and that it is very probably rooted in the deep, human, evolved sense of justice and injustice, and perpetrated by young people who feel done down and have a yen for martyrdom, then we at least have the basis for sensible and perhaps effective strategy.

Of course, evolutionary psychology does not provide an all-embracing theory of human nature. It is not a solo turn, to replace all other ways of looking at ourselves. But it should be accepted alongside other sources of insight, including psychology, sociology, philosophy, literature. And the common canard of the critics, that the hypotheses of evolutionary psychology are not testable and therefore are not science, is simply not true. These are only the beginnings, too. Evolutionary psychology is not a panacea, or an algorithm, but it surely is a significant step in what should be humanity's quest for enlightenment.