In HBO’s “Westworld,” Dr. Robert Ford (Anthony Hopkins) runs a theme park where wealthy “guests” live out frontier fantasies among lifelike robot “hosts.” In the fourth episode, a colleague points out to him what viewers will have already noticed: Those fantasies almost uniformly involve murder, rape or torture.

It’s true, Dr. Ford admits. In the beginning, he says, when the park’s creators wrote its first interactive narratives, “We made 100 hopeful story lines. Of course, almost no one took us up on them.”

Dr. Ford sounds like he could be a cable network head of drama development. In the Wild West of Peak TV, channels have supplied, and audiences have rewarded, gruesome serials like “Game of Thrones” and “The Walking Dead” that share a worldview that life is horrific and people are terrible.

“Westworld,” which begins on Sunday, is another animatronic body atop that bloody pile, but it’s also a self-aware one. It’s an ambitious, if not entirely coherent, sci-fi shoot-’em-up that questions nihilistic entertainment impulses while indulging them.