With Jack Michael's "Concepts and Principles of Behavior Analysis" he presents the concept of "taxis" - i.e., the alignment or motion of a cell toward a gradient of concentration (e.g., salt, sugar, light, heat, etc). Taxis is one of the first self-motive effects of living organisms during evolution and it is the foundation for what we call social/cognitve behavior today.
Taxis allowed individuals within a population to be more efficient and effective in accessing and utilizing local sources of energy. Those individuals who quickly and successfully taxied to higher resource conentrations were environmentally selected and thrived; thus being able to move their genes to the next generation of individuals who repeated this experiment a million fold.
While undergoing natures experiments, individuals from one generation to the next presented with variations of chemical form and function, perhaps folding a protein in one pattern or another, with each fold creating an opportunity for further adaptive interaction with the various chemical, light, heat and medium constituents of the environment.
Over long periods of time variations of chemical form and function evolved different structures that began to specialize in their sensitivity and responsive capacity to taxic gradients of all available types. This, eventually, lead to our currently evolved system of afferent receptor neurons and created a situation where, these systems needed to start interacting with each other to shift through the barrage of incoming sensory input and then determine which one or more of these inputs to "belief," which ones to not belief, and which ones to ignore ... and to do this not only in local proximity to the pervailing events, but to do so every moment in which those events where present. This created a proximal need for increased energy utilization and set the conditions for the evolution of negentrophy (i.e., the temporary concentration of free energy into structures that can both extract and store that energy for use by the, now, many different sense systems contacting the environment.
Let's work with the "five" sensory systems (tactile, olfactory, proprioceptive, etc.). In any one instance they all or, maybe, only one of them are providing critical input to the central "processing" nexus connecting these systems of sensory input one to the other. Let's assume a "hub and spoke" architecture where the only point of connection between the various sensory inputs occurs only at the "hub," or "input nexus (IN)." The chemical and bond structure of the IN makes it a "sensory cusp". The evoled function of this cusp is to accept the five different sources of sensory input and, subdsequently, to create a signal to the organism's afferent nervous system that eventually propels the organism to "taxi" this way or that, and to do so with a certain motility. Thus, the IN functions as a selection gate the weighs and combines all the sources of input and then creates a signal that moves the organism in one way or another. This is the foundation structure for what we call social/cognitve behavior today.