Cf. NON SERVIAM, by Stanislav Lem, reprinted with commentary by Douglas Hofstadter in THE MIND’S I.
It’s about an artificial universe created within a computer by a researcher who is able to observe their activities, but does not reveal himself to them. In fact, he may have to “turn them off” due to lack of funding for his project.
The movies “The Thirteenth Floor” and “Dark City” are similar stories.