This post contains spoilers for Westworld’s season finale.

At the end of Westworld’s first season, everything came down to the maze. Arnold’s mysterious puzzle represented his strategy of unlocking consciousness in his robots using one unfortunate but necessary key — suffering. Carried out by Dr. Robert Ford, Westworld’s cruel experiment mirrors the question at the heart of real-life debates between animal rights researchers: If a thing suffers, is it sentient?

The episode begins by introducing the idea that host consciousness is at the top of a three-tier pyramid with memory and improvisation as its building blocks — a peak that Arnold and Ford have long been trying to scale. Ford has a brutally frank conversation with Bernard, who, being conscious, has recently discovered that the painful memories of his dead son were nothing but lines of code. “Do you want to know why I really gave you the backstory of your son, Bernard? It was Arnold’s key insight, the thing that led the hosts to their awakening — suffering,” he says. “The pain that the world is not as you want it to be.”

Reality bites.

Arnold’s realization is the same one the gloomy Russian Fyodor Dostoevsky came to in Notes From Underground: “Why, suffering is the sole origin of consciousness,” he wrote in 1864. Arguing that suffering “means doubt [and] negation,” he makes the same point that animal rights researchers make when they say that animals must be sentient because they suffer. You can’t be self aware if you’re locked away in a blissful bubble and never have to question your existence. Suffering, in other words, forces individuals to ask: Why is this happening to me?

Suffering is more than just feeling pain. Pain is just a biological reflex — the simple firing of a neuron in the brain after nerves in another part of the body register some kind of physical assault. Suffering goes deeper than that, implying an emotional or cognitive experience of how much physical pain sucks.

Cognitive ethology pioneer Marc Bekoff, emeritus professor at the University of Colorado, Boulder, has argued that all studies on animal sentience have pointed at consciousness because they have overwhelmingly shown that animals suffer. In an essay adapted for LiveScience, he offered a Universal Declaration of Animal Sentience, which he says is “based on what I believe is the indisputable fact that animals are sentient and that they can suffer and feel pain.” While many other researchers have questioned the possibility of animal consciousness — he has a testy relationship with Oxford University’s Marian Dawkins, who questions that assumption — Bekoff asserts that the scientific literature plainly shows that animals suffer, so it follows that they must feel pain. His argument is supported by this 2013 review of over 2,500 scientific papers in the journal Animals, which scanned the contents of those articles to conclude that in the science world, there doesn’t seem to be much doubt that animals suffer — and are therefore conscious — at all.

The hosts in Westworld aren’t all that different from real-life animals. We have evidence that Bernard, Maeve, Dolores, and Teddy actually experience suffering. If the arguments of Arnold, Dr. Ford, and Dostoevsky are right, their suffering should imply that they are actually conscious. Of course, the question of whether the evidence is valid is a different story altogether — how can we tell whether an A.I. claiming that it’s suffering is not just delivering another programmed response? — but, perhaps for the hosts’ sakes, we should hope that they’re just spitting out lines of code. Dostoevsky, after all, followed up his theory on suffering and sentience with the weary admission that “consciousness is the greatest misfortune for man.”