Classical AND/OR goal, or task, decomposition techniques are generalized to deal with the problem of sensory-interactive goal-directed behavior in biological organisms. A neurophysiological model is described which demonstrates the capacity to learn, to generalize, to compute multivariate mathematical functions, and to decompose input commands into sequences of output commands in a context-sensitive manner. Evidence is presented that clusters of neurons with such properties are arranged in hierarchical structures in the brain so as to produce AND/OR task compositions. At the lowest levels in the motor system these clusters transform coordinates and compute servo functions. At the middle levels they decompose input commands into sequences of output commands which give rise to behavior patterns. Mechanisms by which feedback can alter these decomposition sequences to compensate for perturbations and uncertainties in the environment are described. At the highest levels of the hierarchy there are goal selecting and evaluating mechanisms. It is argued that in higher mammals these upper levels of the motor hierarchy are the mechanisms of planning and problem solving. © 1979.