AI is a popular theme in SF film and literature. Whether AI is a realistic possibility is hotly contested. Ironically, many secular philosophers of mind don't think it's possible, even in principle, for a physical system to think.
But for the sake of argument, let's grant that possibility. It can involve computers, robots, androids, or virtual characters. Let's consider the virtual character angle.
A virtual character may be sentient from the outset, or it may evolve sentient. And its sentience may be intended or unintended.
There are degrees of AI. At one level you have unintelligent characters. They can mimic reason. They can answer questions. But they don't understand what they are saying. They have no viewpoint. They are just repeating back what they were programmed to say.
These are like animals. Stimulus-response organisms.
At a higher level are characters that are self-aware. They are cognizant of their surroundings. Cognizant of fellow characters. They have the detachment to objectify their situation. They have the capacity to think to themselves what it's like to exist, or to be in that situation. They can make plans. Feel emotion. They have a first-person viewpoint.
At an even higher level are characters who become conscious of the fact that they are virtual characters–albeit sentient.
In principle, this could be evolutionary. The programmer might design characters to cross the threshold from unintelligent to intelligent, then conscious of their virtual existence.
They might find out that their world is a simulation because it's incomplete in some respects. Suppose their world is a replica of a modern period in world history. Supercomputers have vast information on that period, which enables them to construct a fairly detailed simulation of the period. Still, there are many gaps in the data-base.
Keep in mind that unlike you and me, the virtual characters have no standard of comparison. Even so, they may figure out that something is amiss.
In theological terms, the intelligent characters that are aware of their virtual existence are analogous to the regenerate or Christians, while the characters that are unaware of their virtual existence are analogous to the unregenerate or atheists.
Likewise, the program might contain telltale signs that it's a simulation, not because that's a computer glitch, but because the programmer intended some of his characters to discover his existence. So he scattered clues in the program.
The realization that they are virtual characters would be both awesome and humbling for some characters. The knowledge that there's a greater reality over and above their simulated world. That they have a personal Creator.
But for other characters, the discovery that they are just virtual characters–albeit sentient–might drive them insane. Indeed, criminally insane.
I'm reminded of Ted Kaczynski, the wunderkind and gifted mathematician, who not only went mad, but tried to destroy the "system."
Perhaps Lucifer is like a virtual character who descended into madness after finding out his true identity, then turned against his Creator and creation.
Finally, I think the notion of virtual characters who become aware of their nature is psychologically like the way people react to predestination. If you think about predestination, you may do a double take. It's like playing a chess game or poker game in which the player knows in advance that every play or move was determined in advance. If you think about it, it makes you acutely self-conscious, almost as if you could step outside of yourself and watch yourself.
For some people, that's heady. For other people, that's claustrophobic. An open theist once told a friend of mine that it gave him 'chills' to think of God knowing Beethoven's 9th Symphony ahead of time from eternity. God mentally composed the symphony before Beethoven did.