What is the idea called involving an AI that will eventually rule humanity?
If I'm not mistaken you're looking for Roko's Basilisk, 


  in which an otherwise benevolent future AI system tortures simulations of those who did not work to bring the system into existence