From Nozick’s Anarchy, State, and Utopia:
Suppose there were an experience machine that would give you any experience you desired. Superduper neuropsychologists could stimulate your brain so that you would think and feel you were writing a great novel, or making a friend, or reading an interesting book. All the time you would be floating in a tank, with electrodes attached to your brain. Should you plug into this machine for life, preprogramming your life’s experiences? If you are worried about missing out on desirable experiences, we can suppose that business enterprises have researched thoroughly the lives of others. You can pick and choose from their large library or smorgasbord of such experiences, selecting your life’s experiences for, say, the next two years. After two years have passed, you will have ten minutes or ten hours out of the tank, to select the experiences of your next two years. Of course, while in the tank you won’t know that you’re there; you’ll think it’s actually happening. Others can also plug into to have the experiences they want, so there’s no need to unplugged to serve them. (Ignore such problems as who will service the machines if everyone plugs in). Would you plug in?
To see what Nozick thinks, read on.