Anthony Hopkins and Jonathan Nolan filming Westworld. Photo: John P. Johnson/Courtesy of HBO

Imagine a TV show based on a beloved preexisting property with a cultish fan base. Now imagine a complex pilot shot for HBO at exorbitant expense — a pilot that proves so problematic the network sends the producers back to reshoot almost the entire thing from scratch with a new director. Now imagine that show premieres: What kind of a show do you expect it might be? Well, if you’re lucky, it will be Game of Thrones — since that is more or less the history of Thrones, which premiered back in 2011 and has become HBO’s most successful series.

Now here’s another pressing question: Given that HBO was able to win you over to an epic show about dragons, how do you feel about robots?

Westworld, the newest much-anticipated series from HBO, is about robots. It’s not just about robots, of course — it’s about people who make robots (Jeffrey Wright and Anthony Hopkins); people, including one played by Ed Harris, who pay extraordinary amounts of money to interact, sometimes violently and sometimes vilely, with robots in fantasy Old West scenarios; and people who program these robots to have enough of a flicker of human consciousness to be convincing, but not so much that they become too close to human.

The show is based on the 1973 film written and directed by Michael Crichton. In that film, our hero (Richard Benjamin) goes to a decadent theme park called Westworld, populated by robots programmed to perform various Wild West roles (outlaw, sheriff, madam). Their purpose is to help fulfill the desires of the human participants. Then something goes awry. Our hero is chased by malfunctioning robots who want to kill him — one of which, played by Yul Brynner, is particularly persistent. It’s a fun 90-minute movie that was, at the time, prescient about our anxieties about technology. On the one hand, the pitch for adapting this premise for TV seems straightforward: bad robots. Yet previous attempts to reboot the concept have fizzled: There was, for example, a failed effort to remake the movie starring Arnold Schwarzenegger. Since the original film is owned by Warner Bros., a corporate sibling of HBO’s, eventually the idea arose to remake Westworld as a TV show. The task of imagining that show lured Jonathan Nolan, the showrunner for Person of Interest, who’s written several of the films, including The Dark Knight and Interstellar, directed by his brother, Christopher, and Lisa Joy, a former writer for Burn Notice and Pushing Daisies who also happens to be married to Jonathan Nolan. Their job was simple: Reimagine the 1973 sci-fi film as a 2016 premium-cable show in a post–Grand Theft Auto, post-Siri, nearly post-Oculus world where artificial intelligences come baked into every smartphone; VR headsets will soon be under every Christmas tree; and immersive, morally libertine game environments are as common as PlayStations. And while you’re at it, create something intriguing and sensational enough to replace Game of Thrones once it goes off the air.

Someone stumbling into the offices of Nolan and Joy during the plotting of Westworld might have been forgiven for thinking the couple was hunting a serial killer. “When we were kicking around ideas about what a season would look like,” says Joy, “we worked on a whiteboard. Then the whiteboard filled up. So we started writing on pieces of paper and sticking the pieces on the wall. By the time we were done, the wall was covered with lines drawn from one paper to another. It looked like a crazy person’s office.”

Adapting Westworld to TV, it turns out, has its challenges. For starters, the show has to be big. Fifteen years ago, when HBO popularized the concept “It’s not TV. It’s HBO,” you were comparing The Sopranos to, say, The West Wing. Increasingly, other networks have claimed territory once occupied solely by HBO. But there is one area in which the network still stands out: the scope of its ambition.

Westworld wastes no time informing you of that ambition. Though the setting of the show’s theme park is initially ambiguous — the American West? Outer space? — the amount of money on the screen is not. The production design of the pilot was done by Nathan Crowley, who designed many of the Nolan brothers’ films, including the Batman trilogy. The backdrop for Westworld’s opening episodes is Castle Valley in Utah. Nolan explains, “When John Ford got bored of shooting in Monument Valley, he sent scouts all over the Southwest to find something even more visually spectacular. They found Castle Valley.” The show’s initial hours are grandiose in a way that makes big promises to the viewer and, inevitably, required labor pains from the producers. Westworld was originally scheduled to premiere in 2015. Then it was pushed to 2016. Then there were rumors it would be pushed again to 2017. Then the date 2016 was reaffirmed. In the meantime, any dribble of news from the production made internet headlines, including a very explicit waiver required for extras in an orgy scene. (It included consent to perform “genital-to-genital touching” and to potentially “contort to form a tablelike shape while being fully nude.”) Nolan and Joy were in the taxing position of creating the show while also being aware of ambient rumors that the show was a disaster in the making. In an interview with IO9, Nolan said, “I’ve read more fucking nonsense about this project than anything I’ve ever been involved in.” As for Joy, she tells me, “I try not to look at press. However, I have a mother, who will gladly tell me what’s going on out there.”

“Nothing good is easy,” says Nolan. “HBO is holding themselves to a high standard. But they didn’t have to encourage us to be ambitious. We were ambitious from the beginning.” Part of that ambition is reimagining a slightly cheesy film as a meditation on consciousness that is also a Western-sci-fi epic, and doing it in such a way that will spur millions of people to tune in every week. As to the production delays, Nolan ascribes them to normal first-season logistical jitters. “The first season of a show is always hard,” says Nolan. “You’re making costumes. You’re composing music. Nothing is done. Everything is being done.” One of the show’s biggest narrative gambits is switching the POV from the theme park’s guests to its hosts — the AI-enhanced entities who are beginning to understand their essence. In an effort to ascertain just how sentient they’ve become, the hosts are often asked by their makers: “Have you ever questioned the nature of your reality?” “We would make a joke when we were doing this,” says Joy. “We would question the nature of our reality all the time and say, ‘Well, if we’re hosts, we are on the least imaginative reality loop possible. All we do is write, eat from Styrofoam boxes, put our daughter to bed, and wake up and get at it again — if we’re lucky, with a shower.’ ”

*This article appears in the August 22, 2016 issue of New York Magazine.

*This article has been updated to reflect that Lisa Joy is a former writer for Burn Notice and Pushing Daisies, not Battlestar Galactica.