We all think we have control of our actions but if a brain tumour or injury can completely change our personality, what does that tell us about free will, asks David Edmonds.

Go to the gym or sit in front of the telly with a family-sized packet of crisps? Hmm. Gym or crisps? Gym or crisps? Gym or crisps?

Well, we've all been there. We may decide that what we really want to do is go to the gym - yet find ourselves reaching for that tasty salt-and-vinegar snack, followed by the inevitable feelings of self-loathing.

Neuroscientists and psychologists are making tremendous strides in understanding our drives and motivations. Weakness of will - eating those crisps when we don't really want to - is one intriguing phenomenon. Another is addiction, whether it be to gambling, sex, booze or cigarettes. Much is being learnt about the physiological mechanisms that underlie our compulsive appetites.

Find out more The Philosopher's Arms is broadcast on BBC Radio 4 on Tuesdays at 15:30 BST

At the pub discussing free will are philosopher Wayne Martin and neuroscientist Gemma Calvert Or catch up with iPlayer

There's a growing recognition of the importance of the subconscious in our decision-making. We may not even be aware of the influence that a surrounding smell or noise is having on our choices. And some neuroscientists have even claimed that by examining patterns in the brain, they can predict decisions that we will take six or seven seconds before we ourselves consciously choose to take them.

All this raises a question for the philosopher - what are the implications of advances in knowledge about human decision-making for our conception of free will? Will scientific progress undermine our sense that we have free will? Will it eventually lead us to conclude that free will is an illusion?

Take the following notorious real-life case from a decade ago.

Man with the egg-sized brain tumour A 40-year-old-schoolteacher developed sudden and uncontrollable paedophile behaviour

Doctors found the cause was an egg-sized brain tumour in the right lobe of his orbifrontal cortex

This part of the brain is tied to judgment, impulse control and social behaviour

Once the tumour was removed, his unacceptable sexual behaviour stopped - until it regrew

"The patient had a normal history before he acquired the problem - most paedophiles develop problems early on in life," said one of his doctors Read the full report from New Scientist

A once happily married middle-aged man begins to develop a fascination for child pornography and prostitution. Until this moment he has exhibited no unusual sexual appetites. Matters deteriorate, his wife becomes alarmed, and when he makes an advance on his step-daughter, his wife informs the police. Her husband is compelled to go and have therapy - but that doesn't deter him. Indeed, he harasses women at the centre at which he is being treated.

A prison term seems inevitable. But just before he is due back in front of the courts, he begins to complain of headaches. He is rushed to hospital, where a scan reveals a massive tumour. Once this tumour is removed, his behaviour returns to normal.

The story has a further twist. After several months, his aberrant behaviour returns. An investigation reveals that the tumour has not been entirely eradicated. A further operation sees the man back to his old self once again.

In this case most people will probably feel that the man with the deviant sexual behaviour wasn't really free. It was, as it were, the tumour that was responsible.

But we are all physical beings in a (largely) deterministic universe. Why is one physical cause - a tumour - different from any other? Might, in future, neuroscientists be brought into court to explain away all manner of transgressions, for example: "This man can't be held responsible for his shoplifting - it was due to his unusually high levels of dopamine." There is evidence that some people treated with dopamine for Parkinson's have problems with impulse control, sex and gambling, for example.

Most of our philosophical concepts go back to the ancient Greeks. Not the concept of free will.

The Homeric Greeks believed in fate, rather than freedom. They believed that circumstances were beyond their control. In the writings of Plato and Aristotle, there is no term that would naturally be translated as "free will". The emergence of the concept of free will can be dated to about the 4th Century AD, and was an ingenious solution of Christian theologians to the so-called Problem of Evil. If God is all powerful, and God is all good, how come there is evil in the world? The answer, said Saint Augustine, is that man has free will.

Man with a hole in his head US railway worker Phineas Gage changed the study of neuroscience forever

In 1848, an iron rod pierced Gage's head in a workplace accident, emerging from the top of his skull

Ordinarily dependable, Gage reportedly became unreliable and partial to swearing

This was the first evidence that damage to the brain could affect behaviour and personality Read full article from 2011

Since then almost every major philosopher has had something to contribute to the free will debate, from Kant and Schopenhauer to Nietzsche and Sartre. Broadly speaking there are two camps. There are compatibilists, like the 18th Century Scot David Hume, who think that free will is compatible with determinism - compatible with the idea that all our actions are caused. And there are the incompatibilists who insist it is not.

Wrapped up with debates about free will are questions of blame and praise. If our actions are not free, then how can we be denounced or commended for them? "Sceptics about free will claim that the concept is just a supporting bit of metaphysics to justify our practice of punishing people," says philosopher Prof Wayne Martin, of Essex University.

How does weakness of will fit into this debate? American philosopher Harry Frankfurt wrote a hugely influential article about freedom back in the 1970s. Frankfurt said that we have lots of desires - the desire to eat sugary and salty nibbles, for example, and the desire to lose weight. These are our first order desires. But we also have higher order desires.

Image caption To eat or not to eat, that is the question

"My higher-order desires are about deciding which of my first order desires I want to move me to action," says Martin. "And Frankfurt defines free will as having effective control over one's first order desires."

In other words, I can only be said to have free will if I have enough discipline over my first order desires. If my higher order desire is to lose weight and go to the gym, can I overcome the temptation to do other things instead?

Now, where are those salt and vinegar crisps?

The Philosopher's Arms is broadcast on BBC Radio 4 on Tuesdays at 15:30 BST or catch up with iPlayer

You can follow the Magazine on Twitter and on Facebook