For better or for worse, luck can sweep in from nowhere and alter our lives. You might cross the road and get hit by a car, or you might end up bumping into someone who turns out to be the love of your life. One natural way of thinking about luck is that it happens to us. Things – unexpected and uncontrolled things – happen to us.

What happens to us naturally contrasts with what we do. But, in his paper ‘Moral Luck’ (1981), the British philosopher Bernard Williams conjures the example of a lorry driver who hits and kills a child. The driver didn’t kill the child due to being drunk or driving carelessly. He was just unlucky. In such a case, as Williams later put it in his book Shame and Necessity (1993): ‘The terrible thing that happened to him, through no fault of his own, was that he did those things.’ He hit and killed the child. Luck can do more than just happen to us; it can affect what we do. Or, to put it another way: what we do is not fully in our control.

Williams gave a name to an emotion that can accompany doing bad things through bad luck: agent-regret. This is different from remorse, which Williams linked to doing bad things voluntarily. The driver’s tragedy isn’t that he was speeding or driving carelessly – voluntary things that might arouse remorse; his tragedy is simply that he killed someone. Agent-regret latches on to this. What the driver regrets is that he did it – he killed the child.

The problem with luck isn’t just that it can affect what we do in minor or unimportant ways (though it does this, too); the problem is that it can also affect our actions in life-altering ways. We can imagine the driver feeling a deep and miserable regret that ruins the rest of his life. And it seems that he is rational: he feels terrible because what he did, through no fault of his own, was awful. It is thus deeply unsettling to realise how much luck can affect what we do.

But should we be unsettled? An alternative position could hold that what we do – or what matters in what we do – just is what we control, and the rest is simply stuff that happens in the world. We could regret these things as bad events in the world, but we couldn’t feel agent-regret about the factors beyond our control because they are not part of our agency at all.

The trouble with this position is that so much of what we do seems to depend upon things that we do not control. To raise your arm, you need your body to cooperate; to throw a stone a few metres, you need to avoid a gust of wind. Such an approach inevitably restricts our agency to a sparse domain. Perhaps all that matters when it comes to agency is what we will. This is the view that Williams associated with the 18th-century philosopher Immanuel Kant, a view that gives what Williams called ‘solace to a sense of the world’s unfairness’. If agency is restricted to what we sincerely try to do, then the vicissitudes of luck lose their edge. For the unlucky driver who runs down a child, the fact that his conduct was unimpeachable can be a relief and it can set him apart from those who were malicious or reckless. No doubt sometimes we need to take solace here, and we should recognise that a good tree can bear bad fruits.

But this solace comes at a cost. Williams thought that, were we to insulate agency from luck altogether, agency would be a ‘superficial’ concept. This superficiality comes from recognising that the Kantian picture cuts us off from the world. Agency, in this picture, loses much of its power to make an impact on the world. It doesn’t even let us throw stones or raise our arms.

If we think that our impact on the world is an important part of agency, it seems that we must accept that we can act on the world even though the impact we make is partly out of our control. We must accept that what we do depends on luck. As Williams put it: ‘One’s history as an agent is a web in which anything that is the product of the will is surrounded and held up and partly formed by things that are not …’

If our agency extends beyond what we try to do, if it extends beyond what we control, what does it mean to be an agent? A good place to start, when trying to understand this, is from the obvious point that sometimes we try to do something and it happens. But it doesn’t just happen; rather, we have abilities that let us achieve what we want. The trouble is that our abilities are imperfect, fallible, human.

Agent-regret arises when these abilities go wrong, when we try to do something and something else – something bad – happens. The bad things we do are not just restricted to those acts we are guilty of committing, and lamentable agency is not just restricted to our voluntary actions. This is because these abilities can go wrong through no fault of our own; they can go wrong not through misuse, but merely because they are fallible. In mundane cases, you walk through the bar and spill someone’s pint. In more serious cases, you go for a drive and kill somebody.

One could read Williams and come away dispirited, left with a pessimistic view of the world. After all, Williams focuses on regret rather than the happy accidents that can affect our lives. He uses examples such as the lorry driver and draws on heart-rending stories from literature, such as Anna Karenina’s suicide. There is little comfort in his focus on how, even if we are cautious in what we aim to do, we can be felled by a stroke of luck. Williams can be a bleak read. At least the Kantian picture puts our fate in our hands.

But there is also something deeply empowering in Williams’s move away from the Kantian picture. Reflection on luck need not urge us to retreat to the secure but restricted domain of what we fully control; it can reaffirm our potency as agents and encourage our ambition. We can make a mark on the world and sometimes that mark can be a spectacular one. From a work of art to a strike on the football pitch, from the things we write to the meals we make, these things don’t just happen: we have to seek them out and use our skills to bring them about. And they are our actions – marks we make on the world as agents.

Without accepting that we might fail, that we might end up regretting what we have done, we wouldn’t be able to achieve any of these things. There is something richer and more uplifting in recognising this, rather than living our lives in the secure but impotent realm where trying is all that matters.