While the brain may be a causal system whose output is behavior, experience is not the product of a causal system but of an intentional system. Whatever else it is, the brain must be the physical support of an intentional system.
Experience, like thought, involves representation, which is not any kind of thing, but an abstract system of mappings or symbolic operations. This raises three questions: 1) How does the cognitive system create this representation? 2) How does the representation come to be experienced as real-- that is, to be experienced at all? 3) What is the relation between the representation and the reality it represents? The mystery of experience lies in the fact that the mind, an abstract logical system, has an internal perspective at all. The miracle is that there is any such thing as conscious experience. We've scarcely gotten used to seeing ourselves as the part of matter that sees. This is in part because seeing is not a property of matter per se, but rather of its organization as an intentional system.
Without the subjective frame, however, there could be no mystery surrounding experience, since it is self-consciousness that creates the category of experience, without which only the world exists. Common sense would insist that the pre-subjective mind must nevertheless be conscious (though unaware of being conscious). Yes: aware of the world as object, but without the self-conscious sense of having experience and of being a subject. We could as well speak instead of the mystery of the world: how a brain can organize an intricate system of internal connections, into the vivid reality that presents itself in experience. We take the world for granted, as self-existent or as God's creation, whereas in fact it is the monumental accomplishment of the human nervous system. In other words, we mistake the world as given in experience for the world-in-itself.
Now let's look more closely at the process of this accomplishment. If perception is an interpretive process, it cannot be a matter of copying what we perceive through an open window, so to speak, because that begs the very thing we are trying to explain, which is how the mind comes to have experience at all. Experience-- in this case visual -- cannot simply be the passive transmission of an image such as that formed on the retina of the eye. We are not just looking through an opening onto the world, nor merely through a lens, for this implies someone else who is looking out the window from inside. Then we would have to explain that person's experience-- and so on in an infinite regression! Descartes recognised that the mechanics of the eye did not explain vision. He pointed out that to think of the image on the retina as explaining how we become conscious of what the image shows, is to assume another pair of eyes inside the head watching the scene on the retina. What is seen is actually the final product of the interpretive process, but we are tempted to take it for the beginning point of departure. Hence, we are caught in a circular reasoning. The interpretation that goes on in the brain, that underlies and is the essence of vision, is like a deductive process of reasoning from premise to conclusion. The problem is that we have no idea what the premise is. Everything we experience and know is part of the conclusion-- the brain's product, the show of experience. We can only talk about the premise in the familiar terms of the conclusion, and therefore we are sorely tempted to think of the world-in-itself as some element of experience. Then they seem to resemble each other, and this creates the illusion of the open window-- that seeing is just looking out through the holes in our eyes at a world that simply is what we see.
There is no window, and eyes are not just holes leading in to another pair of eyes, or to a soul that somehow sees for us. And if there were such a pair of inner eyes watching the retina, the little being they belong to would be sealed inside a windowless head. He would have no way to directly check the inner scene he is watching against an outside world. The buck must stop somewhere. This little being, or homunculus, is just a stand-in for the process of interpretation we are trying to explain.
So, let us let him (or her) stand in, to see what must be accomplished and how one might go about it. Imagine, in this thought-experiment, that you are him (or her), sealed inside a chamber with no windows or exits to the outside. In fact, at the beginning at least, you have no reason to think there is such a thing as "outside", and no way to imagine it . You are not actually provided with a movie screen, like closed circuit TV, but only with complex instrument panels busy with flashing lights. This corresponds to the situation of the brain, which is connected by nerves to the retina. What the retina itself presents is not yet an image, only a scintillating array of signals from firing sense receptors. (There is an optical image, of course, but the whole point of this exercise is to examine how the analog optical image is read or recognized after it is "digitally scanned" into the brain by the retina. See also section 16, following.) You also have at your disposal vast and complicated control panels of levers and buttons (you have no idea what they're for!) These correspond to the brain's motor pathways to the muscles and organs. In short, there is an input and an output, and you have to figure out how to connect them appropriately. But appropriate to what? You don't even know what is supposed to be going on here! Don't be discouraged. It took the brain many millions of years to work all this out. So we won't put any time limit on your project here.
Naturally, you are going to have to proceed by trial and error. Suppose you try that lever over there. (Suddenly there is a lurch. Apparently you are "inside" something that is "moving"-- but this is an aside from offstage, for it will be eons before you develop such "concepts".) You try another lever, and now there is a really serious lurch as the tray with morning coffee goes flying across the room and you with it. You pick yourself up, a little shaken, realising there must be something you can do to avoid these mishaps. Remember the pattern of lights on the panels just before? Well, keep a sharp eye out. Oh, there it is again! What if you push those buttons over there? Go ahead, see what happens. Uh-oh. Sorry. Well, keep trying!
With patience and persistence you eventually get the hang of "flying blind" so as to avoid upsets.  You make endless discoveries, taking notes on what works to avert catastrophe, and these you formalize as a terribly long list correlating instrument readings and buttons to be pushed. When a particular command sequence is called for by a particular instrument display, a new instrument display results, calling for a new command sequence-- and so on, in a perpetual readjustment. You begin to find ways of organizing and structuring all this data so as to reduce it to general principles wherever possible. The structure at the highest level of all this "data processing" is a theoretical model or map that begins to take shape-- a vision of a hypothetical world outside. The model represents the same information as the table of correlations, but in a highly condensed form-- much like a three-dimensional object contains and represents all the possible two-dimensional profiles it can generate. But in essence it is nothing but a program of instructions about how to relate input and output. You test and refine your program, continually updating it through new experience "out there".
The model shows, moment to moment, what "objects" to look out for, where the clear paths are, which things are sources of fuel, how far away they are, etc. Imagine a sonar map in a submarine, but much more sophisticated and detailed: you have information about size, shape, wavelength of light reflected by objects, and minute details of their structure. In postulating an outside world, you have created a theory that helps make sense of the mass of data. And you even come to call this navigational activity "seeing". Of course, you have no direct contact with objects or the space they occupy. These remain theoretical features of your model. Nevertheless, you can't help experiencing the theoretical territory implied on your map as real and external. The very act of agreeing to this project in the first place has led inevitably to the sense of a real world. All you've been doing in actuality is playing a complicated game inside your sealed compartment, performing operations that are meaningless in and of themselves. But because your comfort (read: survival) seems to depend on playing the game in a certain way, you've lent it the weight of reality.
Now that the novelty of the challenge has worn off, one day you get the idea that all these tedious operations could be performed as well by a machine. So you set to work in your spare time doing a little soldering to see if you can invent some circuitry that will execute the program you've created. It turns out to be an enormously complex and lengthy project, but you persist. In the end you build a computer so huge it nearly fills the entire room. But it works-- squeezing you out of a job and nearly out of a home!
A few things to note about this episode: First, there are no windows, so there is no question of your model resembling a real outside world, because you never have the opportunity of directly comparing. Therefore, you were not creating a portrait of the outside world, nor a copy of anything at all. An entirely different sort of creativity is involved, more like divination or reading tea leaves. Second, the accuracy of your model can only be defined in terms of how well this divining works. If disasters are avoided, then your model "resembles the world"-- by definition. Third, accepting the challenge of the situation led to the inner model becoming projected as experience of a real outer world. You began to see an image in the patterns of tea leaves at the bottom of your cup-- a real world in the patterns displayed on your panels. Fourth, all of this was accomplished with software that was eventually embodied in hardware-- namely, a brain. Fifth, the key to experience or mind is the interaction with an environment that matters. To be sentient-- as to be alive-- an artificial organism would have to have its own priorities and purposes that matter to it with the urgency of life and death, a situation brought about for natural organisms through selection. No gain (or loss), no pain (or pleasure).