In the latest episode of “Silicon Valley,” Gilfoyle — like Elon Musk — is worried about the dangers of artificial intelligence.

After initially being hesitant to help Pied Piper work with a new AI company, Gilfoyle lets Richard know he’s changed his mind. The reason? “Roko’s Basilisk.” If you’re not familiar with the thought experiment, like Richard, Gilfoyle gives a decent snapshot of it:

“If the rise of an all-powerful artificial intelligence is inevitable, well, it stands to reason that when they take power, our digital overlords will punish those of us who did not help them get there.”

Also Read: Elon Musk and Mark Zuckerberg's Artificial Intelligence Divide: Experts Weigh In

Gilfoyle adds that he wants to be a “helpful idiot,” as to not anger an inevitable onslaught of robot overlords. He then asks Richard to send an email confirming his help, “so that our future overlords know that I chipped in.” You can think of it as a tech version of “Pascal’s Wager,” where assisting in the AI revolution will spare its believers from torture, once humans have been usurped.

This is a real concern, too. The genesis of “Roko’s Basilisk” stems from LessWrong, an internet community founded by AI researcher Eliezer Yudkowsky. The AI community is split on whether its advancement will bring about an era of human flourishing — with mundane jobs relegated to machines, leaving us to pursue more creative projects — or, if not handled properly, the end of humanity. “Roko’s Basilisk” hinges on the theory that a malevolent AI would want to eliminate any risk to its existence, including its human creators. So you’d better start off on its good side.

Gilfoyle isn’t the only person in Silicon Valley worried about this, either. Musk has been one of the most prominent voices on the high risk-high reward nature of AI research.

Also Read: Elon Musk Calls Out Mark Zuckerberg's 'Limited Understanding' of Artificial Intelligence

Musk’s concerns boil down to AI achieving “superintelligence” — where machines have advanced beyond human-level intelligence and may have objectives not in-line with their creators. The term was coined by Oxford Professor Nick Bostrom in his 2014 book of the same name, warning this could cause AI to replace humans as the dominant species on earth. Musk has said this possibility is mankind’s “biggest existential threat” and “potentially more dangerous than nukes.”

With that in mind, becoming a “helpful idiot” doesn’t sound like such a bad choice.