The Duke in the Algorithm
What Measure for Measure Knew About Surveillance Four Centuries Early
Shakespeare never heard of an algorithm. He understood exactly what one does to a society.
In the winter of 1604, a new play was performed before a new king. James I had been on the English throne for less than two years, the old Tudor certainties were gone, and nobody yet knew quite what kind of ruler the foreign-born Scottish king would turn out to be. The play that the King’s Men chose to perform for him that Christmas was Measure for Measure — a strange, uncomfortable work that critics still struggle to classify as comedy, tragedy, or something else entirely. Four hundred years later, it has another, more unexpected classification worth considering: the first known appearance of the Duke in the algorithm.

At its centre is a duke who does something curious. Rather than govern his city directly, he hands power to a deputy, disguises himself as a friar, and disappears into the streets of Vienna to watch what happens. He tells us why in a soliloquy that has aged into something close to prophecy: “I love the people, but do not like to stage me to their eyes.” He wants to govern, in other words, without being seen to govern. He wants the data without the accountability of visible power.
Two years after that performance, James I did something almost identical in real life. During the trial of the Gunpowder Plotters, he watched the proceedings hidden behind a screen — observing, unseen, the machinery of justice he himself presided over. Shakespeare’s fiction had anticipated his king’s actual instinct for invisible authority by twenty-four months.
This is not a coincidence worth mentioning once and discarding. It is the key to why a four-hundred-year-old play has something genuinely useful to say about the architecture of power in the algorithmic age.
The Duke Is Not a Person. He Is a System.
Read Measure for Measure as a study of character, and Duke Vincentio is a frustrating, evasive figure — hard to like, harder to fully trust. Read it as a study of mechanism, and something clicks into focus that speaks directly to the central argument of technological determinism: the most powerful forms of control are the ones that do not announce themselves as control at all.
The Duke disguises himself, scholars have long noted, not primarily for self-discovery but for surveillance. He moves through Vienna unseen, watching his deputy Angelo enforce the law with a severity the Duke himself never had the stomach for, watching Isabella plead for her brother’s life, watching the entire moral machinery of his city operate without his visible hand on the lever. He calls this an experiment — a way of observing, as one modern analysis puts it, “the effect of power on human nature.” He frames his own invisibility as necessary for the integrity of the data. Visible power, he seems to understand, gets contested, negotiated, resisted. Invisible power does not.
This is, with almost no translation required, the foundational logic of surveillance capitalism. Shoshana Zuboff’s argument — examined at length in the platform power chapters of my book — is that the most consequential exercises of power in the digital age are not the ones we can see and argue with, but the ones conducted from behind a screen of algorithmic neutrality: systems that watch, that learn, that shape outcomes, all while presenting themselves as merely observing rather than governing. The Duke would understand a recommendation algorithm perfectly. He built one out of a friar’s robe.
Angelo and the Tyranny of the Rule Applied Without Discretion
If the Duke is the surveillance system, his deputy Angelo is something else worth dwelling on: the purest dramatisation in English literature of what happens when a rule is enforced exactly as written, with no human discretion left to soften it.
Angelo inherits a city that has grown lax in its enforcement of an old law against fornication. He decides to apply it without exception, sentencing a young man, Claudio, to death for getting his betrothed pregnant before their marriage was formally completed — a technicality, not a genuine moral catastrophe. Angelo is not a monster by temperament. He is a man who has mistaken the letter of a rule for its purpose, and who applies it with the cold completeness of a system that cannot tell the difference between a loophole and a tragedy.
This is Jacques Ellul’s logic of technique, dramatised a full three and a half centuries before Ellul wrote a word of it. Ellul’s argument, central to the first chapter of my book, is that the modern world is increasingly governed by a logic of pure efficiency and rule-following that has no mechanism for asking whether the rule still serves the human purpose it was built for. Angelo is what a content-moderation algorithm looks like when it has a face. He applies the policy. He does not ask whether the policy, in this specific case, has anything left to do with justice.
The play’s title comes from the Gospel of Matthew — “with what measure ye mete, it shall be measured to you again” — and it is, pointedly, a warning against exactly this kind of mechanical justice. Shakespeare is not arguing that rules are bad. He is arguing that a rule applied without mercy, without context, without a human being willing to ask I, stops being justice and becomes something closer to a machine running its program.
The Bed-Trick and the Architecture of Consent
The play’s most uncomfortable plot device is what scholars call the bed-trick: Angelo, having propositioned Isabella and demanded she sleep with him in exchange for her brother’s life, is secretly tricked into sleeping with Mariana instead, in the darkness, believing her to be Isabella. The deception saves Isabella’s chastity and exposes Angelo’s hypocrisy. It is also, when you look at it squarely, a scheme in which a woman’s body is substituted into a transaction she did not fully choose, her consent constructed for her by people who decided, on her behalf, that the ends justified the means.
I want to be careful here, because the parallel is not exact and the play’s own treatment of Mariana’s agency is itself a matter of serious critical debate. But there is something worth sitting with in the structure of the bed-trick that connects directly to a pattern this book traces throughout the digital age: systems built by well-intentioned people, designed to produce a desired outcome, that route around the full informed consent of the person the system is actually operating on. The architecture decides what is good for you. You are substituted into an outcome someone else engineered, often without the complete picture of how the mechanism actually works.
This is, in miniature, the entire history of the attention economy’s relationship with informed consent — the terms of service nobody reads, the behavioural data harvested under a banner of personalisation, the algorithm that decides what you see based on a calculation you are never shown. The bed-trick works because Angelo never knows the mechanism that produced his outcome. Neither, mostly, do we.
A Play Written at the Threshold of the Modern State
It matters that Measure for Measure was written at the precise hinge point between two political eras — performed for a king who had just inherited a throne and was still deciding what kind of authority he intended to exercise. England in 1604 was a society working out, in real time, what an early modern surveillance state might look like: a monarch who believed his power was divinely absolute, watching his own justice system from behind a screen, in a country still raw from religious upheaval and uncertain what unchecked authority would do next.
This is not so different from the threshold this book has spent its length describing — a civilisation working out, in real time, what an algorithmic surveillance state looks like, governed by entities whose authority over the information environment is, in practice if not in law, close to absolute, who watch from behind their own screens of platform neutrality, and who are still in the process of deciding what they intend to do with the power they have accumulated.
Shakespeare did not know what an algorithm was. He understood, with total precision, what unaccountable observation does to the people subjected to it, and what happens to justice when a rule runs without a human being left to ask whether it should. The Duke in the algorithm is not a metaphor stretched too far across four centuries — it is the same figure, the same posture, the same question, simply wearing a different disguise than a friar’s robe. Four hundred years on, we are still living inside the question he staged for a nervous new king in the cold December of 1604: who is watching, what do they want, and do they intend to tell us the truth about either?