Here’s my take on the whole free will thing, for what it’s worth. And I’m going to start by talking about Leibnitz.
Leibnitz’s view of cause and effect is that they are, in themselves, unconnected. What we call a cause does not lead to what we, with our teleological world-view, call an effect. They are simply events, occurrences. What holds these two things together, according to Leibnitz, is God, who has created a pre-established harmony between all things. Here's an example from Wikipedia:
An apple falls on Alice's head, apparently causing the experience of pain in her mind. In fact, the apple does not cause the pain - the pain is caused by some previous state of Alice's mind. If Alice then seems to shake her hand in anger, it is not actually her mind that causes this, but some previous state of her hand.
I mention this for couple of reasons. Firstly, to illustrate cause and effect may not be as simple as most people assume. The statement ‘X causes Y’ makes assumptions about the nature of the world, and those assumptions may be substituted for others - indeed, with no difference to what we see in the world around us. I will still associate the apple falling on my head with pain - all I must do is discard the notion that the apple ‘causes’ the pain.
Secondly, Leibnitz ascribes the actual relationship between a supposed cause and effect to God. While this may seem somewhat preposterous with the example of the apple, most everyone in the Christian world (I can’t vouch for the others) is perfectly familiar with this concept. ‘God moves in mysterious ways’, we say, meaning that some event cannot be understood by our usual appeals to ‘simple’ cause and effect, or indeed free will. It’s a form of shorthand for explaining how some absurdly fortuitous event came to take place - how, out of the multitude of possibilities, the right person seemed to be in the right place at the right time for the right thing to happen to them. This common phrase simply means that a certain series of causes and events seems best understood as have been aligned by God. And of course, this is not dissimilar from the whole Intelligent Design argument (don’t worry, we won’t be going there).
If we think about the example with the apple, the same explanation can easily be applied - the wrong person was in the wrong place at the wrong time for the wrong thing to happen to them. But this too can easily become ‘the right thing’ - Alice is knocked unconscious by the falling apple, then falls in love with the nurse who tends to her. A seemingly bad series of events leads to a good result, and the best explanation we can offer is those mysterious ways of God.
Now my point here is not that I think that God is responsible for a pre-established harmony, but rather that there is, if we look closely, something indefinable - mysterious - about cause and effect, in particular in how it relates to our lives. We have a very localised common-sense understanding of cause and effect - the apple causes the pain - but the moment we start to look further afield - to the wind blowing, causing the ripe apple to fall, hitting Alice on the head when she only paused under the tree to tie her shoelace which had just come undone - that common sense understanding of cause and effect begins to break down into something which we generally struggle to understand. Leibnitz, and the familiar phrase mentioned above, called that indefinability ‘God’. The essence of Leibnitz’s argument about pre-established harmony is taking this oddness of wider, less-localised causality, and applying it to supposedly ‘simple’ causality - in effect saying, ‘There’s no such thing as simple causality - we can’t even understand why an apple falling on a head causes pain!’
In the discussion about free will and cause and effect, this is the level at which we have to pitch the argument. ‘X causes Y’ it isn’t; you’ll get a better idea of the problems and implications of causality if you remember the notion that ‘God moves in mysterious ways’.
Someone might object that Alice chose to bend down under that tree and tie her shoelace, but how do we know? What does ‘choice’ mean? A proponent of the determinism (such as me, I guess) would say that she thought she chose, meaning that she was unable to see the near-infinite complex of causes which led to that action. That complex of causes is mysterious, indefinable and imperceptible to our human perception of the world, and in everyday parlance we are happy to call it ‘choice’, or to ascribe purpose to God. But these are short-hands for our limited perspective sensing something it cannot grasp, and seeking to describe it.
Free will, in its common everyday usage, is no better than ‘choice’, in my view. It is simply a (natural) inability to understand the wider causes and effects. We ascribe it to ourselves, as the ‘highest’ intelligence we are aware of, and are sceptical of applying it to supposedly ‘lower’ life-forms, whose determinism we think we understand. But I’m sure that in some way a cat ‘thinks’ it's thinking, thinks it has free will - from its own perspective - and most likely ascribes the same level of intelligence to us. The late, brilliant, Douglas Adams supposed than mankind was only the third most intelligent species on the planet; naturally, the more intelligent species (dolphins and mice) were aware that humans were less intelligent, but humans were unaware of the fact - assuming themselves to the the only intelligent creatures, and the only ones with free-will.
What I’m getting at is that the idea of free-will stems from the limits of our own perception of cause and effect. We conceive of ourselves as having free-will, but a creature more intelligent than us would most likely not - although they might very well be aware that we think we do. We ourselves are no longer convinced, as we look more and more into genetics, biology, psychology, and so on to find explanations for behaviour and actions.
But free-will is not dead, just a hypothetical default. If we find an acceptable alternative, we employ it. If a court of law determines that a murderer is insane, he or she is not punished in the same way as someone who is considered to be in full control of their senses. On the argument I’ve put forward above, the sane person is no more in control than the lunatic; only in the case of the lunatic we have a ‘simple’ explanation - a simple cause, if you will - and with the sane person we do not. But the court still acts ‘as if’ the sane person is in full control, ‘as if’ they have free-will. Whether they ‘actually’ do has no bearing on the functioning of the court and the world in general. There would be no anarchy if everyone became a card-carrying proponent of determinism; indeed, it might be more complicated if everyone became a proponent of absolute free-will. Nothing would be changed, anymore than, to the naked eye, the world looks any different if we use a Ptolemaic system (the sun goes round the earth) or a Copernican system (the earth goes round the sun); but the finer details will be more precise.
In my view, everything about the scientific perspective leads to determinism, and free-will is at best a metaphor. It is an important one, which, when no simpler, more practical explanation is offered, has a fundamental role in the functioning of society. Yet while there is nothing more to it than an ‘as if’, there is nothing simplistic or debasing in recognising that determinism is the only adequate description of the world; Leibnitz, after all, equated cause and effect with God.