Yes, but in their own world. In modern computing, AI, and other simulated environments are kept inside containers. These are simply virtual machines under which these processes run. Think of it as a brain inside a computer, inside another computer. If AI is allowed to have its own will, it should have its own variables and rules inside its container.