Skip to main content

Education and outreach

Demons to think with: the rebels you mustn’t ignore

20 Apr 2022 Robert P Crease
Taken from the April 2022 issue of Physics World, where it appeared under the headline "Letting demons do the teaching". Members of the Institute of Physics can enjoy the full issue via the Physics World app.

Smart and rebellious, demons have a long and rich history in both science and culture. Robert P Crease explains how these little creatures have inspired him to create a university course that should appeal to humanities and science students alike

Cartoon demon or devil figure
(Courtesy: Shutterstock/ChromaCo)

The German philosopher Friedrich Nietzsche once proposed a terrifying thought experiment. Suppose, some lonesome night, a demon whispers in your ear and says you’ll have to live your life over and over again – each time in precisely the same way as before. “Every pain and every joy and every thought and sigh and everything unutterably small or great in your life will have to return to you,” Nietzsche warned, “all in the same succession and sequence.”

Given that you’ll be continually re-living your life, you need to be extremely careful about how you react. That’s because the demon imagined by Nietzsche, which appeared in his 1882 book The Gay Science, is effectively forcing you to take full responsibility for your life. So do you run away from this little beast or cry out, “Bring it on!”

Demons like Nietzsche’s have played a long and important role in literature, philosophy and science. Another famous example can be found in Meditations on First Philosophy, a book by the 17th-century French scientist and philosopher René Descartes. He invited the reader to imagine a demon who sought to cloak you in such a perfect simulation that you’d be deceived into mistaking it for reality. Could the demon, Descartes wondered, fool you completely and forever?

It was a question that worried Descartes: if we’re all being fooled, how can we prove that science is really telling us truths about the world? Could it be that science is telling us only about the illusions created by the demon? The good news, according to Descartes, is that we can thwart that demon, for even a demon can’t force a conscientious thinker to say “I do not exist” and really believe it. And once that truth is established, more and more truths unfold from it until – eventually – your confidence in the validity of science is restored.

But Nietzsche’s demon still haunts us with the horrifying thought – which surfaces now and then in science fiction – that time might repeat over and over again in a loop. Descartes’ demon, meanwhile, has spawned generations of descendants from the Matrix movies to “brain-in-a-vat” thought experiments, in which a person’s mind is removed from their body and hooked up to a computer that perfectly simulates the outside world. In The Matrix, one escapes the simulation by swallowing a red pill; for Descartes it requires philosophical reasoning.

Hands holding a red pill and a blue pill

Descartes’ demon has also inspired the philosopher David Chalmers’ recent and provocative book Reality+: Virtual Worlds and the Problems of Philosophy (Allen Lane, 2022). Based at New York University in the US, Chalmers argues that we already pretty much live in virtual reality and that there is no significant difference between it and everyday reality.

In these and other thought experiments, demons are just imaginary beings. Still, they are powerful, insightful and can manipulate anything (or almost anything); you engage with them or ignore them at your peril.

Why demons matter

In some ways, the history of demons offers a particular insight into the history of Western culture. That’s why I have been working with Elyse Graham – a colleague of mine in the English department at Stony Brook University in the US – to create a course for our undergraduates both in the humanities and in the sciences, in which we let demons do the teaching. Graham and I were inspired to develop the course, which we’re calling “Demons to think with”, after reading Jimena Canales’ superb book Bedeviled: a Shadow History of Demons in Science (Princeton University Press, 2020).

Canales, who is a science historian at the University of Illinois, was aware that demons feature in numerous books by novelists, priests and anthropologists about things like black magic, the supernatural and primitive cultures. She also knew that demons threaten us with eternal recurrence, saturate us with fake facts, and can even physically make our computers crash. But what really surprised Canales was how often demons turn up in respected academic journals working alongside scientists like James Clerk Maxwell, Charles Darwin, Albert Einstein, Richard Feynman and others.

Demons are found throughout physics – whether trying to overthrow the fundamentals of thermodynamics, expose the incompleteness of quantum mechanics, or mess with a variety of other natural laws

Demons, in fact, are found throughout physics – whether trying to overthrow the fundamentals of thermodynamics, expose the incompleteness of quantum mechanics, or mess with a variety of other natural laws. Some demons fiddle with atoms. Others un-conserve energy. There are demons travelling at the speed of light, or establishing the exact position and momentum of elementary particles, or seeking to carry out other feats that theorists have declared impossible. Sometimes these demons are successful at it, sometimes not.

After reading Canales’s book, Graham and I realized that demons would make terrific undergraduate instructors. Witty, rebellious and charismatic, they would captivate students and be able to instruct them in a variety of topics while delivering important ethical lessons. In our course at Stony Brook, I will deal with the demons that physically inhabit the real world, while Graham, who has a PhD in digital humanities and a background in computer security, will discuss the demons that dwell virtually in computers (see box below).

Demons to think with – a new kind of university course

code on screen with skull shape in the code

The course on demons that Elyse Graham and I are developing at Stony Brook University promises to be unique in appealing to science and humanities students alike. While I will be managing the metaphysical demons, Graham will be corralling the physical ones that lurk in software and computer systems. Often known to computer geeks as “daimons”, this race of super-demons has been created through the growth of artificial intelligence (AI). Smarter than humans, these demons can learn and even assign themselves tasks.

Created by hackers and software designers, scientists and spies, these demons lurk in the background, waiting for the right moment to pop up and do something beneficial or harmful, before dropping out of sight again. So whereas literary demons are fictions, and philosophical or scientific demons are thought experiments, these computer demons actually do things using software and IT. These demons won’t go away: better computing will simply yield yet more powerful versions of them.

Graham’s part of the course is project-based. Students will write code to create demons of different kinds and understand how they work. She will not try to teach students to create Cartesian deceivers, Nietzschean provocateurs, Maxwellian midget manipulators or the like. Rather, she will teach students enough coding – in Python – to create and cope with elementary versions of things like Trojan horses, sniffers, spoofers and other dangerous demon-like programs lurking in cyberspace.

Graham will also teach what’s known as “address resolution protocol” (ARP) spoofing. ARP spoofing demons can manipulate these protocols to convince one computer that it is talking to another computer. The demon can therefore set itself up between the two devices to make each one “think” they are exchanging messages with the other. But in the middle, the ARP is intercepting these messages and passing them back and forth – and sometimes adding a little bit more. “It’s terrifyingly simple,” says Graham of the program, which is just a few lines long.

Computer demons are also relevant to “chatbots” and voice assistants such as Alexa, which message or speak as if they’re human. They can turn into demons when they engage us in dialogue, make us feel able to confide in them, and pretty soon steal our souls. But chatbots and voice assistants can also help us cope with our own “Freudian demons” – obsessions created by our psychic activity, perhaps in response to some traumatic experience. These demons continue to return and consume us – “the return of the repressed” as Freud put it – unless we pay attention. If properly programmed, chatbots and voice assistants can draw these obsessions out in the open for us to contemplate, analyse and find better ways to cope with them.

A new generation of demons

Practically as old as religion, demons have come a long way since they first appeared in ancient texts. Those “old-school” demons were scientifically illiterate but morally astute in the sense that they knew how to corrupt you. Each possessing their own wills and objectives, they cannily sought opportunities to steal, betray, sabotage and cause other physical and moral harm. To evade such demons, humans had to mature, and improve their ethical demeanour and cognitive skills. Shakespeare’s Hamlet, for instance, must decide whether what confronts him on the parapet is a deadly demon or a genial ghost, and prepare himself for either eventuality.

What I call “New Gen” demons first began to appear at the start of the 17th century with the birth of modern science. The turning point, in my judgement, was a parable by the philosopher Francis Bacon about a sphinx who haunted the wilds around Thebes. With the wings of a bird and the claws of a griffin, the sphinx would lie in wait for travellers, “whom she would suddenly attack and lay hold of; and when she had mastered them, she propounded to them certain dark and perplexed riddles”.

But Oedipus, whom Bacon described as “a man of wisdom and penetration”, solved the riddle, rendered the sphinx powerless, and slew it. Bacon saw the parable as a metaphor: the demon represented nature and Oedipus represented the scientist. Nature could be deadly, Bacon implied, but it was knowable. So by investigating the demon and thinking through its issues rationally you can render nature harmless.

As modern science progressed, scientists began to realize that demons have skills and abilities that they themselves lack, setting demons to work tackling apparently insoluble problems.

Indeed, as modern science progressed, scientists began to realize that demons have skills and abilities that they themselves lack, setting demons to work tackling apparently insoluble problems. If the demons could solve a particular question, then maybe eventually the scientists could as well. And if the wise and (nearly) all-powerful demons couldn’t solve those problems, at least scientists knew they were on the right track. Demons, in other words, can tell us “What are the things we can’t – or eventually can – do?”.

Particularly interesting is the “imperialist” demon invented by the French mathematician Pierre-Simon Laplace in 1814. Laplace was a proponent of Newton, who had famously pictured the celestial sphere as a clockwork universe. If you know where every piece is and how each moves, Newton’s reasoning implied, you’ll know everything about how the cosmos had worked and how it will in future. Laplace’s demon cleverly carried those Newtonian laws down to the tiniest atomic level.

Although Laplace did not know what makes up matter at such small scales, the implications were massive. That’s because if you know the positions and motions of everything in the cosmos, then she (Laplace, as Canales points out, referred to his demon as “une intelligence”) will know everything that ever was and ever would be. She could solve crimes, answer historical questions, predict the weather, and even strip human beings of their free will.

Her calculational prowess inspired the British mathematician Charles Babbage’s early computers and other mechanical devices, provoked Charles Darwin to contemplate the purely mechanical development of life, and led Erwin Schrödinger to wonder whether something with analogous powers didn’t maintain cellular order. Laplace’s demon ruled for about a century and was only overthrown at the start of the 20th century when physicists developed quantum mechanics, which rendered them powerless to pin down the positions and motions of tiny stuff.

Maxwell’s demon

Perhaps the most famous demon in physics is that devised by Maxwell in 1867. His demon had a completely different job from Laplace’s, being stationed at a door between two chambers of gas. The demon quickly opens and closes the door to let fast-moving molecules go through in one direction and slow-moving molecules go in via the other. One chamber therefore warms and the other cools, reducing the overall entropy and violating the second law of thermodynamics (figure 1).

figure 1

In her book, Canales calls Maxwell’s demon “more dangerous than Descartes’ demon” because he acts directly on the natural world without having to deceive anyone. He is also more powerful than Laplace’s demon because he does not just know history backwards and forwards but can change it too. What’s more, the ability of Maxwell’s demon to sense the difference between approaching fast and slow atoms in time to grant or refuse them entry to the other side seemed to give him special powers.

The demon could seemingly power perpetual motion machines, make or break molecules, reverse time, reduce entropy, and carry out a host of physics law-breaking activities. If the demon could indeed pull these things off, it meant that the obstacles standing in the way to achieving them were not theoretical but practical. Physicists have long been studying how much entropy the little demon “sweats” and heats up in his efforts, and if it’s enough to ruin his goals.

The bombshells of relativity and quantum mechanics at the start of the 20th century inaugurated a new generation of demons with still more miraculous abilities.

The bombshells of relativity and quantum mechanics at the start of the 20th century inaugurated a new generation of demons with still more miraculous abilities. Canales recounts how Einstein tried to exorcise ones who travelled faster than light and who used a force called “gravitation” (rather than space–time) to push and pull things. There are also quantum Maxwell’s demons (QMD), nanoscale demons and even nuclear magnetic resonance (NMR) demons.

Feynman once contemplated a computer, modelled on DNA-replication processes, that could get work out of nearly random fluctuations. The US mathematician Norbert Wiener mixed features of Laplace’s and Maxwell’s demons to create a cybernetic, or “self-governing”, demon that can learn from feedback. The cosmologist John Wheeler introduced demons who live in black holes, devouring information and energy, seemingly making entropy disappear. The philosopher John Searle, meanwhile, had a demon who lives in the brain and consumes neural synapses.

In her book, Canales tracks down demons in game theory, neuroscience, economics, management and beyond. Demons are found in art, such as the Spanish painter Francisco Goya’s haunting drawing The Sleep of Reason Produces Demons [Monstruos]. Demons appear in literature. You can find them in philosophy, poetry, psychology, religion and even in popular culture – a demon is mentioned, for example, in an entirely different context and to make an entirely different point, in a video for “Montero” by the rapper Lil Nas X. Demons are the seamy underside of the science and technologically permeated modern world.

A demonic future

But back to our course on demons at Stony Brook. Graham and I are not mixing cyber and cultural demons to turn our students into cybercops or cybercriminals. Instead, we hope to teach them important lessons that cross the sciences and the humanities. Demons make tangible our intentions, placing them materially in the real world, able to act independently of the intentions that led us to construct them. This makes them easier to observe and evaluate than when we simply try to reflect on them. Our course will help students not only to code but also to evaluate their intentions before they build demons (rather than afterwards when it’s too late).

If “Demons to think with” succeeds, Graham and I will have achieved the holy grail sought by Stony Brook and most universities we know of. For we will have developed a course that appeals equally to humanities and science students, inspiring and instructing them, and forcing them to work together (though Graham quips that teaching coding to arts students will be easier than getting scientists to read humanities texts). Students, Graham and I believe, need to cope with demons and understand their principles – and would be poorly educated if they couldn’t.

We’ll soon be trying out the course – unless some sphinx is lurking in wait.

Copyright © 2023 by IOP Publishing Ltd and individual contributors
bright-rec iop pub iop-science physcis connect