"If it's possible to keep the super intelligent AI in a virtual environment, but it can't detect that it's virtual."
They did this in a Star Trek TNG episode ("Ship in a Bottle"). Data accidentally endows a holodeck character with super-intelligence. The way the crew eventually defeated him was to trick him into thinking he had left the holodeck and was able to live normally in the outside world; but it was really just another virtual environment.
Actually, Geordi endows Professor Moriarty with super-intelligence, by mistakenly asking the holodeck/computer to create an adversary "capable of defeating Data" instead of "capable of defeating Holmes" as he intended.
They did this in a Star Trek TNG episode ("Ship in a Bottle"). Data accidentally endows a holodeck character with super-intelligence. The way the crew eventually defeated him was to trick him into thinking he had left the holodeck and was able to live normally in the outside world; but it was really just another virtual environment.