SINBAD: A neocortical mechanism for discovering environmental variables and regularities hidden in sensory input. 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”. par We present a candidate computational strategy for (i) discovering regularity-simplifying environmental variables, (ii) learning the regularities, and (iii) 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 nonoverlapping 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.par According to the SINBAD model, the basic function of each pyramidal cell is to (i) discover and represent one of the regularity-simplifying environmental variables and (ii) 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.