This research will explore the degree to which the basic cognitive functions of memory and categorization are adapted to the structure of the environment. It is based on the hypotheses that human memory functions to make most available that information which is most likely to be needed in the current context and that we form categories of objects to maximize our ability to make predictions about new objects. In the case of memory, the research will explore how the need for information varies with the pattern of past use of that information and the cues available in the environment. The environments to be explored will be both linguistic environments such as newspapers and biological environments as recorded in animal counts. Experiments will determine whether availability of information in memory varies in the same way as need for that information varies in the environment. In the case of categorization, the research will explore how features cluster across objects in our environment. The environments to be explored will be various data sets that have been gathered in the machine learning research on categorization. Experiments will determine if human predictions of object features show sensitivity to the same variables that are predictive in these environments. The theory to be developed will tie the two domains of memory and categorization together as two manifestations of cognition's effort to come up with accurate models of its environment. This research, with its adaptive focus, should allow us to better understanding function and disfunction of human memory.