We propose that a top priority of the cerebral cortex must be the discovery and explicit representation of the environmental variables that contribute as major factors to environmental regularities. Any neural representation in which such variables are represented only implicitly (thus requiring extra computing to use them) will make the regularities more complex and therefore more difficult, if not impossible, to learn. The task of discovering such important environmental variables is not an easy one, since their existence is only indirectly suggested by the sensory input patterns the cortex receives - these variables are "hidden." We present a candidate computational strategy for (1) discovering regularity-simplifying environmental variables, (2) learning the regularities, and (3) using regularities in perceptual and decision-making tasks. The SINBAD computational model discovers useful environmental variables through a search for different, but nevertheless highly correlated functions of any kind over non-overlapping subsets of the known variables, this being indicative of some important environmental variable that is responsible for the correlation. We suggest that such a search is performed in the neocortex by the dendritic trees of individual pyramidal cells. According to the SINBAD model, the basic function of each pyramidal cell is (1) to discover and represent one of the regularity-simplifying environmental variables, and (2) to learn to infer the state of its variable from the states of other variables, represented by other pyramidal cells. A network of such cells - each cell just attending to representation of its variable - can function as a sophisticated and useful inferential model of the outside world.