In October 2015, The New York Times Magazine conducted a poll on Twitter, asking its readers, “Could you kill a baby Hitler?” The question unleashed a flood of think pieces parsing the ethics of such an act, and a response from then-Republican presidential candidate Jeb Bush, who said without hesitation, “Hell, yeah, I would.” Ultimately, 42% of respondents answered that yes, they would kill Baby Hitler; 30% answered that no, they would not, and 28% said they were unsure.

The question is provocative because of the ethical issue it raises — is it okay to murder an innocent baby to save millions of lives? — but it’s even more interesting because it allows us to play our favorite game of “What If?”

What if someone did go back in time to kill Baby Hitler? Would that person have prevented World War II? Would historical forces have resulted in war nonetheless? Would there have been a war, but without Hitler’s pathological anti-Semitism, no Holocaust? Or would someone else have stepped into that putrid pair of shoes as well? Would killing Baby Hitler have caused an unpredictable chain of events resulting in a totally unrecognizable version of our present? In his answer to a Huffington Post reporter, Bush addressed this conundrum, referring to the “Back to the Future” movies as an illustration of the perils of changing history through time travel.

This kind of thought experiment is not only a pastime of leading news magazines and trailing Republican presidential candidates, but also a popular genre of fiction. Writers from Nathaniel Hawthorne (“P.’s Correspondence”) to Michael Chabon (“The Yiddish Policemen’s Union”) to Philip Roth (“The Plot Against America”) have embraced alternative history to examine the forces that shaped our world, including those that are usually overlooked. And while the imaginative process of alt-history can be applied to just about anything — What if Napoleon had defeated Russia in 1811? What if Robert E. Lee had won the Battle of Gettysburg? What if early American settlers had discovered a reef made of solid gold? — no subject is more popular than the history of the Third Reich and World War II.

Aside from the Times Magazine poll, two new works have revisited the issue in recent months: “The Man in the High Castle,” a TV adaptation from Amazon of Philip K. Dick’s 1963 novel that will see its second season this year, and “A Man Lies Dreaming,” a novel by the Israeli science fiction writer Lavie Tidhar.

Dick and Tidhar come at the subject from opposite directions. Dick proposes the obvious scenario: What if the Axis powers had won the war? From there he sketches a world in which the United States is split between Germany and Japan, in which the few Jews left live in hiding or under false identities, and in which the Nazi victors have attempted a genocide of the entire African continent.

Tidhar asks a more pointed question: What if the Nazis had lost the 1933 German federal election? In real life, the Nazis won, but not by much. Even after seizing power and unleashing a campaign of violence against their political opponents, the Nazi Party garnered only 43.9% of the vote and needed to ally with the German National People’s Party to form a government. In Tidhar’s version of events, the Nazis lost the election to the Communists, leading to a crackdown on National Socialism and causing Nazi leaders to flee the country.

Tidhar’s choice of protagonist is more fanciful. Hitler, after being imprisoned in a labor camp for a few months, escapes to London, changes his name to “Wolf” (roughly the English equivalent of “Adolf”) and now makes his living as a private detective. When a wealthy, beautiful young Jewess shows up at his office, asking him to find her missing sister, his anti-Semitic principles would have him refuse. But he needs the money, and, more important, he can’t turn down a case.

The novel thus blends two venerable genres — alternative history and noir mystery, with Hitler playing the gumshoe. Though this seems like a stretch, Tidhar makes it work. In keeping with the conventions of the genre, his writing is clipped and precise, but colorful enough to reinvigorate familiar tropes. In one scene, Wolf’s shadow “fell on the wall like a dirty coat”; his Jewish client, Isabella Rubenstein, is “a tall drink of pale milk”; Eva Braun is described as “a simple creature, as comfortable as slippers.”

Tidhar’s narrative is also in the grand tradition of noir mystery — tightly plotted and utterly baroque, with loose ends peeling off in all directions. His only missteps are when he gets too clever with his historical references, as with a violent Jewish territorialist organization called the PLO. But in other cases his sense of historical irony is dead on. When the Americans show up and offer to return Wolf to power as a proxy in their fight against Soviet communism, it rings true. In another version of history, the United States might well have supported Hitler.

A world in which the Nazis won the war, and one in which they never came to power, seem like opposites. But Dick and Tidhar’s works share fundamental qualities. In both books, alternative history isn’t played like a game of pool, with a single cause leading to a cascade of logical effects. Instead, both “The Man in the High Castle” and “A Man Lies Dreaming” question whether the pool table even exists. Not only do they imagine what the world would look like if key historical events were altered, they also question the solidity of any version of history.

For Dick, turning sober consciousness into a hall of mirrors was standard practice. In novels like “The Three Stigmata of Palmer Eldritch” (1965), “Ubik” (1969) and “A Scanner Darkly” (1977), he portrayed characters whose ability to distinguish between the real world and fantasy was compromised by hallucinogenic drugs, mental illness and, in “Ubik,” a post-death method of consciousness preservation. Compared with these books, “The Man in the High Castle” is relatively tame. But even here, Dick couldn’t refrain from playing mind games with the reader.

The novel revolves around a fictional book, itself an alternative history in which the Allies won the war. Titled “The Grasshopper Lies Heavy,” the book is a sought-after piece of contraband in Axis-ruled, postwar America. In the Amazon adaptation, the book is reinvented as a collection of film reels that resistance and government forces both struggle to obtain.

This setup would seem to create a nice symmetry, with the alternative history within the novel reflecting the real history of our world. The suggestion is that the characters in the main narrative are living in some kind of matrix or holodeck — or that they’re just characters in a novel — and through the alternative history of “The Grasshopper Lies Heavy” they glimpse the truth.

But for Dick that would be too simple. While the version of history told by “The Grasshopper Lies Heavy” is closer to our own, it also diverges from it. In this telling, the Allies’ victory was quick and decisive, and Great Britain emerged from the war with its power intact. Hitler is captured and tried for war crimes, and Winston Churchill remains the prime minister of England. Instead of a postwar struggle between the United States and the Soviet Union, the Cold War is waged between America and the still-mighty British Empire. Once you entrust history to works of fiction, Dick implies, trying to get back on solid footing is a lost cause.

Tidhar’s book also features not one version of history, but several. The central narrative is about Wolf, and is told in alternating sections of third-person narration and first-person diary entries. But it seems that Wolf’s story is actually being woven inside the head of a concentration camp inmate named Shomer. The character is derived from the pen name of Yiddish author Nokhem Meyer Shaykevitch, a Yiddish pulp fiction writer who was massively popular in the late 19th century. Shaykevitch died in 1905, but Tidhar uses his creative license to reinvent him as a Holocaust victim who retreats into imagination to escape his hellish surroundings.

Yet the two realities of Wolf and Shomer often merge with each other. Wolf suffers from a leg wound sustained in the labor camp. Shomer also suffers a leg wound that grants him a temporary respite from grave digging. At one point, Wolf dreams that he is in fact Shomer, an inmate in a concentration camp, rather than the other way around. And in another scene, as Wolf is about to enter a potentially dangerous room, he imagines “fires, the sweet cloying smell of burning bodies, the hiss of gas.”

This kind of ambiguity is of course an intentional effect, and contributes to the kind of trippy atmosphere appropriate for a trippy genre. In “The Man in the High Castle” there’s a scene in which one of the main characters, a Japanese official named Nobusuke Tagomi, wanders over to a lunch counter and is inexplicably transported to a reality where the assumption of Japanese superiority over white Americans is reversed. Which version is real and which is the mirage? Dick couldn’t resist the occasional curveball, and neither can Tidhar.

But the more important effect that both books achieve — and maybe why the Nazi theme remains the most popular subgenre within alternative history — is that through this game of ”What If?” we come to question our own basic moral assumptions. Not whether it would be justifiable to kill Baby Hitler (though that too, maybe), but whether we can sympathize with vile characters when their point of view occupies most of the narrative space. In a world full of Nazis, can some of them be good?

In Tidhar’s novel, this question extends even to Hitler, who — though presented with his anti-Semitic views intact — suffers the usual beatings and mishaps that befall a gumshoe. Here it’s the British fascist Oswald Mosley who is ascendant, and Wolf finds his racist values turned upside down thanks to rising English xenophobia against both Jews and German refugees. Even if the entire story is a revenge fantasy inside the mind of Shomer, it quickly becomes sympathetic toward its victim. As in any noir novel, it’s the private eye character who provides the sympathetic anchor.

So, too, in Dick’s picture of Axis victory, there turn out to be some Nazis we find ourselves rooting for. This is emphasized in the TV version, where one of the main characters, a merciless SS leader named John Smith (played by Rufus Sewell), is cast in a sympathetic light mainly because he’s not the worst Nazi around (that distinction belongs to Reinhard Heydrich, played by Ray Proscia). Whatever else you might say about him, Smith is a man of principle, not a sociopath. Is that something to admire when sociopathy is the norm?

These are hard questions, and ones that are more entertaining to think about in the form of novels and TV shows than they would be in real life. In this sense, all these works are more about the power of speculative fiction, rather than about any particular scenario. They can make and remake worlds, and in doing so force us to confront problems we would never think about otherwise. Let’s just be glad that the Nazis didn’t really win the war — or so we’d like to believe.

Ezra Glinter is the critic-at-large of the Forward. Contact him at glinter@forward.com or on Twitter, @EzraG