Simulacron 3

Simulacron 3 - published by Daniel F. Galouye 1964

See also link

The novel tells the story of a virtual city (total environment simulator) developed by a scientist and intended for marketing research purposes, thus ridding this virtual city of its burdensome "pollsters" (opinion polling agents) who must, by law, be allowed to poll anyone for their opinion on any subject. The novel has been filmed twice, first in 1973 by Rainer Werner Fassbinder as a two-part television play under the name Welt am Draht (World on a Wire), and in 1999 by Josef Rusnak as The Thirteenth Floor.