The Mary's Room thought experiment considers a brilliant neuroscientist who has been raised and educated in an entirely colourless environment. It was originally proposed by Frank Jackson as follows:
Mary is a brilliant scientist who is, for whatever reason, forced to investigate the world from a black and white room via a black and white television monitor. She specializes in the neurophysiology of vision and acquires, let us suppose, all the physical information there is to obtain about what goes on when we see ripe tomatoes, or the sky, and use terms like ‘red’, ‘blue’, and so on. She discovers, for example, just which wavelength combinations from the sky stimulate the retina, and exactly how this produces via the central nervous system the contraction of the vocal cords and expulsion of air from the lungs that results in the uttering of the sentence ‘The sky is blue’. [...] What will happen when Mary is released from her black and white room or is given a color television monitor? Will she learn anything or not?
On the day she is allowed to emerge from her confinement, she sees the colourful world for the first time. "Wow!" she says, as she takes it all in. Though she knew everything there was to know about the human brain and everything there was to know about the physics of colour, she had never before known what it was like to experience it first-hand.
But if she now knows something she didn't know before, then evidently she could not have known everything there was to know about colour before her escape. This surely proves that conscious experience transcends physics and neuroscience. Physicalism (the belief that everything is the result of physical interactions) must simply be wrong. Right?
Well, not really...
One of the most important implications of the argument is that qualia seem to exist. Qualia is the term used to describe the subjective experiences of sensation felt by a conscious mind. The redness of red, the loudness of sound, the painfulness of pain.
Why does red look like that? Couldn't it look otherwise? What does ultraviolet light look like to a bee? How does a bat experience its sonar sense? What does it feel like to be someone other than me? These are all questions about the nature of qualia.
Qualia are sometimes dismissed as illusory or ill-defined by philosophers such as Dan Dennett. While I have a certain sympathy with this view, I think it is an overstatement to say that they have no existence of any kind.
Dennett's response to the argument, for example, holds that if Mary really understood her own brain so perfectly then she would indeed be able to predict and imagine what red looks like without ever having seen it. Dennett argues that this seems unintuitive only because it would be impossible in practice, if not in principle, for any entity to have such a perfect understanding of its own mental workings.
While I view this as a possible outcome, I doubt it is a necessary or even probable one. I agree with the original thought experiment that it is quite reasonable to suppose that she would be unfamiliar with the quale of the colour red until she sees it for herself.
If physicalism is true, then imagining the color red must involve invoking some sort of brain circuit or pattern that fulfills this function. I see no reason to believe that any amount of factual knowledge is going to give Mary the ability to voluntarily flex this mental muscle without having had the experience of perceiving red directly.
Now, just because she can't perform this feat by introspection alone does not mean she is entirely without hope. Her knowledge and expertise might lead her to cheat the system and find other ways to imagine what colours look like. For example, we might imagine that (with some help from a surgical assistant or a robot), she might be able to correctly position an electrode within her brain and so activate the "redness" circuit artificially.
So, what does Mary learn? Does she gain new knowledge?
It depends what you mean by learning and knowledge! The problem posed by this thought experiment only arises because of imprecision in the meaning of words such as "know" and "knowledge". In my view, it conflates "factual knowledge" and "experiential knowledge", which are two very different things.
If we define knowledge in terms of facts, i.e. pieces of information that can be expressed verbally, then Mary does not gain any new knowledge. But she does now "know" what it is to like to experience something. But if this is not knowledge, then what is it?
Consider what we mean when we say we know what an experience feels like. It means we can call the experience to mind or that we can imagine it. To say that Mary now knows what "red" is like means only that she has gained the ability to summon the quale of the colour red to mind. She can now flex a mental muscle that was previously inert.
But this kind of result is by no means special to qualia. A similar thought experiment could be made about a physical skill such as playing the piano or juggling. No amount of neurology, reading and physics training will grant you the ability to juggle proficiently without practice. Physical training is the only way to rewire the nervous system in such a way as to make it possible to juggle effectively. Although you might intellectually "know" how to juggle, you don't really know how until you've been practicing for a while.
I think it's also quite like the case of a mathematician who routinely deals with hyper-spatial geometry in ten dimensions. This mathematician has no ability to visualise or intuitively imagine the structures he deals with, but he understands the structures perfectly at an intellectual, factual level.
Understanding and knowledge do not automatically confer the ability to imagine clearly, and nor should we expect them to.
In any case, physicalism is not threatened because the quale of redness is still irrevocably tied to a particular state of activity in Mary's brain. The thought experiment is misconceived as it seems to suggest that physicalism predicts that all we need in order to activate any brain state we wish is the knowledge of certain facts and the will to do so. This is plainly incorrect.