If you read the news or spend any time on social media, then you’d be forgiven for thinking that there’s a lack of morality in the world today.

There is certainly no shortage of serious social and moral problems in the world. People are discriminated against just because of the colour of their skin. Many women don’t feel safe in their own home or workplace. Over 450 million children around the world lack access to clean water. There are whole industries that cause untold suffering to animals. New technologies like artificial intelligence are being used to create autonomous weapons that might slip from our control. And people receive death threats simply for expressing themselves online.

It’s easy to think that if only morality featured more heavily in people’s thinking, then the world would be a better place. But I’m not convinced. This might sound strange coming from a moral philosopher, but I have come to believe that the problem we face isn’t a lack of morality, it’s that there’s often too much. Specifically, too much moral certainty.

The most dangerous people in the world are not those with weak moral views – they are those who have unwavering moral convictions. They are the ones who see the world in black and white, as if they are in a war between good and evil. They are ones who are willing to kill or die to bring about their vision of utopia.

That said, I’m not quite ready to give up on morality yet. It sits at the heart of ethics and guides how we decide on what is good and bad. It’s still central to how we live our lives. But it also has a dark side, particularly in its power to inspire rigid black and white thinking. And it’s not just the extremists who think this way. We are all susceptible to it.

To show you what I mean, let me ask you what will hopefully be an easy question:

Is it wrong to murder someone, just because you don’t like the look of their face?

I’m hoping you will say it is wrong, and I’m going to agree with you, but when we look at what we mean when we respond this way, it can help us understand how we think about right and wrong.

When we say that something like this is wrong, we’re usually not just stating a personal preference, like “I simply prefer not to murder people, but I don’t mind if you do so”. Typically, we’re saying that murder for such petty reasons is wrong for everyone, always.

Statements like these seem to be different from expressions of subjective opinion, like whether I prefer chocolate to strawberry ice cream. It seems like there’s something objective about the fact that it’s wrong to murder someone because you don’t like the look of their face. And if someone suggests that it’s just a subjective opinion – that allowing murder is a matter of personal taste – then we’re inclined to say that they’re just plain wrong. Should they defend their position, we might even be tempted to say they’re not only mistaken about some basic moral truth, but that they’re somehow morally corrupt because they cannot appreciate that truth.

Murdering someone because you don’t like the look of their face is just wrong. It’s black and white.

This view might be intuitively appealing, and it might be emotionally satisfying to feel as if we have moral truth on our side, but it has two fatal flaws. First, morality is not black and white, as I’ll explain below. Second, it stifles our ability to engage with views other than our own, which we are bound to do in a large and diverse world.

So instead of solutions, we get more conflict: left versus right, science versus anti-vaxxers, abortion versus a right to choose, free speech versus cancel culture. The list goes on.

Now, more than ever, we need to get away from this black and white thinking so we can engage with a complex moral landscape, and be flexible enough to adapt our moral views to solve the very real problems we face today.

The thing is, it’s not easy to change the way we think about morality. It turns out that it’s in our very nature to think about it in black and white terms.

As a philosopher, I’ve been fascinated by the story of where morality came from, and how we evolved from being a relatively anti-social species of ape a few million years ago to being the massively social species we are today.

Evolution plays a leading role in this story. It didn’t just shape our bodies, like giving us opposable thumbs and an upright stance. It also shaped our minds: it made us smarter, it gave us language, and it gave us psychological and social tools to help us live and cooperate together relatively peacefully. We evolved a greater capacity to feel empathy for others, to want to punish wrongdoers, and to create and follow behavioural rules that are set by our community. In short: we evolved to be moral creatures, and this is what has enabled our species to work together and spread to every corner of the globe.

But evolution often takes shortcuts. It often only makes things ‘good enough’ rather than optimising them. I mentioned we evolved an upright stance, but even that was not without cost. Just ask anyone over the age of 40 years about their knees or lower backs.

Evolution’s ‘good enough’ solution for how to make us be nice to each other tens of thousands of years ago was to appropriate the way we evolved to perceive the world. For example, when you look at a ripe strawberry, what do you see? I’m guessing that for most of you – namely if you are not colour blind – you see it as being red. And when you bite into it, what do you taste? I’m guessing that you experience it as being sweet.

However, this is just a trick that our mind plays on us. There really is no ‘redness’ or ‘sweetness’ built into the strawberry. A strawberry is just a bunch of chemicals arranged in a particular way. It is our eyes and our taste buds that interpret these chemicals as ‘red’ or ‘sweet’. And it is our minds that trick us into believing these are properties of the strawberry rather than something that came from us.

The Scottish philosopher David Hume called this “projectivism”, because we project our subjective experience onto the world, mistaking it for being an objective feature of the world.

We do this in all sorts of contexts, not just with morality. This can help explain why we sometimes mistake our subjective opinions for being objective facts. Consider debates you may have had around the merits of a particular artist or musician, or that vexed question of whether pineapple belongs on pizza. It can feel like someone who hates your favourite musician is failing to appreciate some inherently good property of their music. But, at the end of the day, we will probably acknowledge that our music tastes are subjective, and it’s us who are projecting the property of “awesomeness” onto the sounds of our favourite song.

It’s not that different with morality. As the American psychologist, Joshua Greene, puts it: “we see the world in moral colours”. We absorb the moral values of our community when we are young, and we internalise them to the point where we see the world through their lens.

As with colours, we project our sense of right and wrong onto the world so that it looks like it was there all along, and this makes it difficult for us to imagine that other people might see the world differently.

In studying the story of human physical, psychological and cultural evolution, I learnt something else. While this is how evolution shaped our minds to see right and wrong, it’s not how morality has actually developed. Even though we’re wired to see our particular version of morality as being built into the world, the moral rules that we live by are really a human invention. They’re not black and white, but come in many different shades of grey.

You can think of these rules as being a cultural tool kit that sits on top of our evolved social nature. These tools are something that our ancestors created to help them live and thrive together peacefully. They helped to solve many of the inevitable problems that emerge from living alongside one another, like how to stop bullies from exploiting the weak, or how to distribute food and other resources so everyone gets a fair share.

But, crucially, different societies had different problems to solve. Some societies were small and roamed across resource-starved areas surrounded by friendly bands. Their problems were very different from those of a settled society defending its farmlands from hostile raiders. And their problems differed even more from those of a massive post-industrial state with a highly diverse population. Each had their own set of challenges to solve, and each came up with different solutions to suit their circumstances.

Those solutions also changed and evolved as their societies did. As social, environmental, technological and economic circumstances changed, societies faced new problems, such as rising inequality, conflict between diverse cultural groups or how to prevent industry from damaging the environment. So they had to come up with new solutions.

For an example of moral evolution, consider how attitudes towards punishing wrongdoing have varied among different societies and changed over time. Let’s start with a small-scale hunter-gatherer society, like that of the !Kung, dwelling in the Kalahari desert a little over a century ago.

If one member of the band started pushing others around, perhaps turning to violence to get their way, there were no police or law courts to keep them in line. Instead, it was left to individuals to keep their own justice. That’s why if a bully murdered a family member, it was not only permitted, but it was a moral duty for the family to kill the murderer. Revenge – and the threat thereof – was an important and effective tool in the !Kung moral toolkit.

We can see that revenge also played a similar role in many moral systems around the world and throughout history. There are countless tales that demonstrate the ubiquity of revenge in great works like the Iliad, Mahabharata and Beowulf. In the Old Testament, God tells Moses the famous line that allows his people to take an eye for an eye and tooth for a tooth.

But as societies changed, as they expanded, as people started interacting with more strangers, it turned out that revenge caused more problems than it solved. While it could be managed and contained in small-scale societies like the !Kung, in larger societies it could lead to feuds where extended family groups might get stuck in a cycle of counter-retaliation for generations, all started by a one single regrettable event.

As societies changed, they created new moral tools to solve the new problems they faced, and they often discarded tools that no longer worked. That’s why the New Testament advises people to reject revenge and “turn the other cheek” instead.

Modern societies have the resources and institutions to outsource punishment to a specialised class of individuals in the form of police and law courts. When these institutions are well run and can be trusted, they have proven to be a highly effective means of keeping the peace to the point that revenge and vigilante justice is now frowned upon.

This is moral evolution. This is how different societies have adapted to new ways of living, solving the new social problems that emerge as their societies and circumstances change.

(I must stress that this does not make !Kung morality inferior or less evolved than other societies. Similar to how all creatures alive today are equally evolved, so too are all extant moral systems. My point is not that there is a linear progression from small-scale to large-scale societies, from primitive to civilised, it’s that any moral system needs to fit the circumstances that the society finds itself in and change as those circumstances change.)

But there’s a catch: moral evolution has typically moved painfully slowly, not least because our innate tendency towards black and white thinking has stifled moral innovation.

This wasn’t such a problem 10,000 years ago, when living conditions would have remained relatively static for generations. In this case, there was less pressure to evolve and adapt the moral toolkit. But the world today is not like this. It is changing faster than ever before, and so we are forced to adapt faster than our minds might be comfortable with.

This means pushing back on our black and white tendencies and looking at morality through a new lens. Instead of seeing it as something that is fixed, we can look at it as a toolkit that we adapt to the problems at hand.

It also means acknowledging that many of the social and moral problems we face today have no single perfect solution. Many come in shades of grey, like deciding if free speech should give people a right to offend, or to what extent we should tolerate intolerance, or under what circumstances we should allow people to end their own lives. There is almost certainly no single set of moral rules that will solve these problems in every circumstance without also causing undesirable consequences.

On the other hand, we should also acknowledge that there are many social and moral problems that have more than one good solution. Consider one of the questions that sits at the centre of ethics: what constitutes a good life? There are likely going to be many good answers to that question. This remains the case even if some answers come into conflict with others, such as one perspective stressing individual freedom while another stresses greater community and interpersonal obligations.

This full-spectrum evolutionary perspective on morality can also help explain why there is such a tremendous diversity of conflicting moral viewpoints in the world today. For a start, many cultures are still wielding tools that were made to solve problems from a different time, and they have carried them into today’s world, such as tools that prioritise in-group loyalty at the cost of suspicion of others. Some conservative cultures are reluctant to give these tools up, even if they are obsolete.

Other tools were never very good at their job, or they were co-opted by an elite for their own benefit to the detriment of others, such as tools that subjugated women or disenfranchised certain minorities.

Other tools are responses to different conceptions of the good life. Some represent the trade-off that is built into many moral problems. And there is constant production of new and experimental tools that have yet to be tested. Some will prove to work well and may be kept, while others will fall short, or cause more problems than they solve, and will be dropped.

One thing is clear: the world we are living in today is unlike anything our distant ancestors faced. It is larger, more complex, more diverse and more interconnected than it has ever been, and we are hearing from voices that once were silenced. The world is changing faster than ever before.

This might be taxing for our slow-moving black and white minds – and we should forgive ourselves and others for being human – but we must adapt our moral views to the world of today, and not rely on the old solutions of yesterday.

This calls for each of us to be mindful of how we think about morality, our black and white tendencies, and whether the views we inherited from our forebears are the best ones to solve the serious problems we face today. It also means we must rethink morality as being a human invention, a toolkit that can be adapted as the world changes, with many new problems and many tools that can solve them.

What matters today is not clinging to the moral views we were raised with, but looking at each problem, listening to each other, and working together to find the best solution. What we need now is genuine moral evolution.