What’s Inside Your Head Once You’ve Figured Out What Your Head’s Inside Of

Abstract In this article, we investigate the foundations for a Gibsonian neuroscience. There is an increasingly influential current in neuroscience based on pragmatic and selectionist principles, which we think can contribute to ecological psychology. Starting from ecological psychology, we identify three basic constraints any Gibsonian neuroscience needs to adhere to: nonreconstructive perception, vicarious functioning, and selectionist self-organization. We discuss two previous attempts to integrate affordances with neuroscience: Reed’s ecological rendering of Edelman’s selectionism as well as Dreyfus’ phenomenological interpretation of Freeman’s neurodynamics. Reed and Dreyfus face the problem of how to account for “value.” We then show how the free-energy principle, an increasingly dominant framework in theoretical neuroscience, is rooted in both Freeman’s neurodynamics and Edelman’s selectionism. The free-energy principle accounts for value in terms of selective anticipation. The selection pressures at work on the agent shape its selective sensitivity to the relevant affordances in the environment. By being responsive to the relevant affordances in the environment, an agent comes to have grip on its interactions with the environment and can thrive in its ecological niche.


Introduction
For Gibson, one cannot realistically expect to synthesize a general theory of perception from patching together a theory of the physical world constructed by physicists who are primarily interested in the imperceptible microstructure of matter with a theory of optics developed for lens makers, astronomers and microscopists with a theory of image recording developed for painters and geometers with a theory of neural functioning developed for communication engineers so as to yield a unified theory of adaptive perception for ecologically minded psychologists. -Mace (1977, p. 47) that are not in line with its use in ecological psychology (see de Wit, de Vries, van der Kamp, & Withagen, 2017). For example, in cognitive neuroscience affordances are often conceptualized as internal states in the head that represent the actions available to an agent (Cisek, 2007;Jeannerod, 2001). Can cognitive neuroscience be put more in line with ecological psychology? In other words: Is a Gibsonian neuroscience feasible?
Looking at the epigraph, taken from Mace's (1977) seminal publication, one reason why the successful marriage between ecological psychology and cognitive neuroscience is still forthcoming is because the root-metaphors and conceptualizations are taken from different disciplines-for example, the appeal to the reconstruction of an image and the transmission or broadcasting of a message.
Another question is, What need does ecological psychology have for neuroscience? Again, there are reasons to be pessimistic. For example, as Gibson (1979Gibson ( /1986 wrote, "Locomotion and manipulation … are controlled not by the brain, but by information. … Control lies in the animal-environment system" (p. 225). Neuroscientists might diligently study how the neural organ works, but any attempt of a cognitive neuroscience or the study of "how the brain produces behavior" is in stark tension with the commitments of ecological psychology to start from the agent-environment system.
Our aim in this article is to make headway in both directions. First, we identify a number of outstanding questions in ecological psychology that a Gibsonian neuroscience might be able to answer. Second, there is a strong current in systems neuroscience based on pragmatic, selectionist, and dynamical principles (Edelman, 1987;Engel, Friston, & Kragic, 2016;Friston & Stephan, 2007), which we think can contribute to ecological psychology without importing cognitivist concepts.
We start the article with the first question: articulating what, on our account, the explanandum for a Gibsonian neuroscience should be. We then articulate a number of constraints on the cognitive neuroscientific explanans in order to fit with ecological principles. Based on these constraints and the explanandum, we then develop the foundations for a Gibsonian neuroscience. We start with two approaches that make important steps in the right direction: Reed's treatment of Edelman's Neural Darwinism (Edelman, 1987;Reed, 1989Reed, , 1996 and Dreyfus's discussion of Freeman's neurodynamical work (Dreyfus, 2007;Freeman, 1987Freeman, , 2000. Dreyfus is not standardly associated with ecological psychology, but he shares with ecological psychology a firmly realist and nonmediational conception of our skillful contact with the environment (Dreyfus & Taylor, 2015).
In the final sections, we show how both Freeman's and Edelman's selectionist work come together in the free-energy principle (Friston & Stephan, 2007) and our ecological-enactive interpretation of it (Bruineberg, Kiverstein, & Rietveld, 2016;Bruineberg & Rietveld, 2014). Crucially, both from a selectionist and from Friston's perspective, the structure of the agent is shaped by the dynamic nested structure of the rich landscape of affordances in which the individual is situated. The selection pressures working on the agent-environment systems give rise to a mutuality of agent and environment that adheres to ecological principles and avoids a dichotomy or mediating element between agent and environment.

The explanandum of Gibsonian neuroscience
A central commandment of ecological psychology is to "ask not what's inside your head, but what your head's inside of" (Mace, 1977, p. 43). What your head is inside of is, according to ecological psychologists, an environment full of ecological information that makes affordances available to the agent. At the level of the ecological niche as a whole, we define affordances as relations between aspects of the sociomaterial environment and abilities available in the econiche (Rietveld & Kiverstein, 2014). To understand a particular individual's engagement with its environment, we need to look at an agent's abilities and the sociomaterial aspects of the environment (Chemero, 2003(Chemero, , 2009cf. Stoffregen, 2003 ). Ecological information pertains to regular relations between aspects of the environments so that agents can become informationally coupled with affordances (Bruineberg, Chemero, & Rietveld, 2018).
The questions asked by psychology and cognitive science are heavily dependent on the conceptualization of knowledge, the environment, and of the agent-environment relationship. Orthodox cognitive psychology starts from the idea of knowledge as representation, the environment as stochastic, and the agent as having access only to an impoverished stimulus. It then seems obvious that the agent first needs to infer and represent the states of the environment in order to do something useful (Gregory, 1980). The ecological approach rejects these latter three starting points: Knowledge is a form of knowing-how or being skilled (Noe, 2012), the environment is full of affordances and information for engaging with them, and the animal-environment relationship allows for a rich and direct kind of contact with the world (Bruineberg, Chemero, & Rietveld, 2018;Chemero, 2009;Gibson, 1979Gibson, /1986. Each of these different approaches brings along a different set of key questions. One of the key questions for Gibsonian neuroscience is to explain the attunement process by which the brain comes to resonate with their environment (Teques et al., 2017;Raja, 2017).
Besides the question of resonance to affordances, we think that the main explanandum for Gibsonian neuroscience is selective resonance or selective sensitivity to affordances (Bruineberg & Rietveld, 2014). To understand both the phenomenology and the purposiveness of engagement with affordances, one needs to complement Gibson's original account of affordances with an account of the attracting or inviting character of affordances (Dreyfus & Kelly, 2007;Rietveld, 2008b;Withagen, de Poel, Ara ujo, & Pepping, 2012). The same affordance can leave the animal cold in one situation, whereas it can stand out as highly relevant in another situation.
Drawing upon work in the phenomenological tradition (Merleau-Ponty, 1945/1962, we characterize the kind of direct responsiveness to multiple affordances simultaneously as "skilled intentionality" (Bruineberg & Rietveld, 2014). Our learning history and our skills show up in the way the world solicits action. A skilled architect, for example, is simultaneously sensitive to several relevant aspects of the environment and is moved to improve her grip on the situation as a whole (Rietveld & Brouwers, 2017;van Dijk & Rietveld, 2018). Thanks to years of training and experience, she has acquired all kinds of complementary abilities for visualizing and materializing possible designs: abilities to sketch, draw, make the relevant cardboard models, make digital 3-D models, find and select the right materials, make real body sized mockups, select the right builders for the specific work, and so on. We think that such contextual sensitivity to only the relevant affordances in the particular situation is the main explanandum for Gibsonian neuroscience.

Constraints on Gibsonian neuroscience
What kind of constraints does ecological psychology place on cognitive neuroscience? Gibson's ecological approach to perception, with its roots in pragmatism and evolutionary biology, starkly contrasts with his contemporary Richard Gregory's (1980) approach to perception, with its roots in rationalism. We mention the opposition between the two because Gregoryian terminology has become the standard in (especially computational) neuroscience. From this comparison, we identify three of the most basic constraints on Gibsonian neuroscience: nonreconstructive perception, vicarious functioning, and selectionist self-organization.

Reconstructive and nonreconstructive perception
Gregory conceived of perception as an inferential process of "hypothesis testing," analogous to scientific reasoning. Sensory data are impoverished and need to be internally reconstructed. As Quine (1969) wrote, "The stimulation of sensory receptors is all the evidence anyone has to go on, ultimately, in arriving at his picture of the world" (p. 75). This reconstructed "picture of the world" is something like the animal's best guess about the structures of the world that have caused the "stimulation of sensory receptors." The task of perception then is to inform the cognitive system about its best hypothesis about the structure of the environment. Based on this internal representation, prior knowledge and goals, the cognitive system then forms an intention to act and issues a motor command to set the body in motion.
This view has a number of consequences. First, reconstructive perception poses a strong distinction between perception, cognition, and action: Only when perception finishes its reconstructive project does real cognition begin. Such a "sandwich model" (Hurley, 1998) is not the right kind of cognitive and neural architecture to fit in with the Gibsonian approach.
Instead, in nonreconstructive approaches, perception and action are closely intertwined to be sensitive to those aspects of the environment that support adequate interaction. As Anderson (2014) wrote, The world properties it is important to pick out for the purpose of reconstruction are not the same as those that best support interaction, and psychology has tended to (mistakenly) focus on the former to the exclusion of the latter. (p. 172) From a nonreconstructive perspective, the task of the perceptual system is to keep the organism in contact with the relevant affordances in the environment.

Functional specificity, vicarious functioning, and degeneracy
The second constraint on Gibsonian neuroscience pertains to the mapping from neural activity to function. A still quite prevalent view in neuroscience is that neural structures implement specific functions: The function of the visual cortex is to process visual information, the fusiform face area codes for faces. Gibson (1966) already opposed such a conception: "The individual nerve or neuron changes function completely when incorporated in a different system or subsystem" (p. 56). The same affordances can be perceived in different ways and the same sensory neuron can be involved in perceiving different affordances: "The individual sensory units have to function vicariously, to borrow a term from Lashley, a neuropsychologist" (Gibson, 1966, p. 5).
Neural reuse is in a sense the counterpart of degeneracy and refers to the ability to use the same neural elements to enable multiple behavioral and cognitive functions (Anderson, 2014). For example, Friston et al. (1997) showed that whether a region of the inferotemporal cortex was actually selective to faces was dependent on the size of activity in the posterior parietal cortex. Face selectivity is not a function intrinsic to the inferotemporal cortex but of the inferotemporal cortex in a particular neural coalition. The same area might perform radically different functions when part of different coalitions. One major consequence of the neural reuse hypothesis is that higher cognitive processes do not require dedicated neural mechanisms but can be made possible by new coalitions of evolutionarily older processes.
Degeneracy and neural reuse and their relevance for neuroscience and ecological psychology are extensively discussed in Anderson (2014); de Wit, van der Kamp, and Withagen (2016);and de Wit et al. (2017). Degeneracy and neural reuse are specific to Gibsonian neuroscience but important to any cognitive neuroscience that favors robustness and evolutionary continuity. So why is it still a fringe theoretical perspective? We suggest one reason for this might be that the project of neural reuse is fundamentally incompatible with the mainstream Gregoryian and Quinean view on perception. If the activity at a "sensory receptor" does not reliably convey information from the outside world (e.g., neuron A spiking means edge at this spatial location) but rather functions vicariously (e.g., neuron A spiking might mean many different things based on the context), then the whole prospect of an internal reconstruction based on independent pieces of sensory information seems bound to fail. At any rate, neural evidence points strongly in the direction of degeneracy and neural reuse.

Instructionism and selectionism
The metaphor of the brain as a computer has received criticism not only from (radical) embodied cognitive scientists but also from within cognitive neuroscience itself. Sporns (1994), for example, distinguished between instructionist and selectionist theories in biology. Instructionist theories start from the transfer of information from the environment to the agent. Once the agent has picked up that information, it needs to process, store, or otherwise use that information. Edelman (1993) identified the instructionist view with classical computationalism: "Information processing or functionalist views of higher brain function assume that both neuroanatomy and the significance of signals are more or less fixed and unambiguous (like instructions) and that the brain is a kind of computer" (p. 115).
Edelman posed two main challenges to the instructionist view. First, he pointed at the enormous structural and functional variability between individual nervous systems as observed by Lashley (1947; from whom Gibson borrowed the term vicarious functioning): "The degree of individual variation far exceeds that which could be tolerated for reliable performance in any machine constructed according to current engineering principles" (p. 115). Second, Edelman (1993) posed the challenge of the development of adaptive behavior. From a computationalist perspective, sensory input comes ready-made to be manipulated by the computational system: "The world of stimuli encountered by a newborn animal cannot be described adequately as preexisting, unambiguous information ready to be manipulated according to a set of rules" (p. 115). Edelman rejected such a preexisting and animal-independent partitioning of the stimulus and instead argued for an animal-relative conception.
Selectionist theories, on the other hand, are characterized by three principles: (a) The variation of individual elements (such as neuronal assemblies or genes), (b) an encounter of the system with its environment, and (c) differential amplification (or reinforcement) based on behavioral success. Whereas, from an instructionist perspective, the variability observed by Lashley seems inexplicable, from a selectionist perspective such variability is key for an adequate adaptive performance. "A selective system … has a repertoire of preexisting variable functional components, in addition to ways of differentially amplifying those that perform best or match to the environment" (Sporns, 1994, p. 5).
Selectionist theories attempt to provide an account of adaptive behavior without localized control. This fits well with Gibson's perspective on adaptive behavior. The brain does not have an internal homuncular instructor, nor is it instructed by the environment, but "behavior is regular without being regulated" (Gibson, 1979(Gibson, /1986). Regular behavior is not caused by regulating instructions but by a process of attunement to the environment where the system self-selects for adaptive interactions. The brain's dynamics are neurointrinsically instable and self-organize into transient patterns over multiple spatial and temporal scales.
Self-organization of the brain's dynamics are an increasingly important object of study in neuroscience (Bruineberg & Rietveld, 2014;Engel et al., 2016;Freeman, 2000;Friston, 2000;Kelso, 1995;Rietveld, 2008a;Thompson & Varela, 2001;von der Malsburg, Phillips, & Singer, 2010). In an article coauthored by many pioneers in the field, self-organization is characterized as "the spontaneous formation of patterns and pattern change in systems that are open to exchanges of information with the environment and whose elements adapt to the very patterns of behavior they create" (Engel et al., 2010, p. 268).
It therefore seems clear that any theory that tries to explain selective openness to affordances needs to be thoroughly selectionist in nature and that there are ample resources available within cognitive neuroscience to study selective openness to affordances.
In this section, we have proposed three constraints on Gibsonian neuroscience pertaining to the cognitive architecture. Each of these constraints is posed in contrast with its antipode: Gibsonian neuroscience needs to be nonreconstructive rather than reconstructive, involve degeneracy and neural reuse rather than functional specificity, and be based on selectionist rather than instructionist principles.

A first flirt: Reed on Edelman
In the very first edition of this journal, Ecological Psychology, Reed reviewed Edelman's Neural Darwinism (Edelman, 1987;Reed, 1989). Based on Edelman's Nobel Prize-winning work in immunology, Neural Darwinism applies Darwinian selectionist thinking to neural systems. The result is an account of neural regulation as a collective achievement of neural systems, called the theory of neuronal group selection.
The central idea of neuronal group selection is that selective processes operate within an individual's nervous system to enhance the adaptivity of behavior. The principles that govern these selective processes mirror those of evolution: variation of elements, differential success, and selective consolidation of successful behaviors.
In his review, Reed (1989) was carefully optimistic about the prospect of Neural Darwinism and its promise to provide "a neurophysiological basis for a theory of perceptual systems" (p. 99). Reed characterized Edelman's project as "an attempt to explain how, due to natural selection, the epigenesis of self-regulation in the nervous system necessarily leads to a system capable of perception of meaningful features in the environment, despite being made of extremely varied components" (p. 101). What Reed seemed to appreciate in Neural Darwinism is exactly the emphasis on self-organization, vicarious functioning, and selectionism that were just mentioned as criteria for a Gibsonian neuroscience.
So, what are the meaningful features of the environment that the animal comes to perceive? It is here that Reed and Edelman part ways. Just after criticizing the idea that the world contains preexisting unambiguous information ready to instruct the child, Edelman (1993) wrote, "To survive in its econiche, an organism must either inherit or create criteria that enable it to partition the world into perceptual categories according to its adaptive needs" (p. 115). This insistence on categorization as basic to all of psychology seems to add an extra mediating layer of instruction (e.g., "This is a carrot") in between the agent and the world. Reed was very skeptical of this appeal to categorization and saw it as a remnant from an instructionist and cognitivist psychology: There is no need to assume that the nervous system categorizes inputs and then assigns meanings, for the very act of resonating to information entails the perception of the meanings of things for the observer. Edelman seems to want to endorse this sort of "resonance" account, but his language often leads to a more "cognitivist" interpretation. (Reed, 1989, p. 112) In a sense, Reed accused Edelman of not being selectionist enough: "He falters in the face of the unthinking instructionism of modern psychology" (p. 112). Contra to mainstream psychology, ecological psychology has rejected the instructionism that is borrowed from Kant, Helmholtz, and Wundt (Chemero, 2013) from the very start. In Reed's view, ecological psychology would be the natural ally of selectionist neuroscience to develop a "relentlessly selectionist" cognitive neuroscience.

Reed's ecological selectionism
In Encountering the World, Reed (1996) developed his own selectionist account of neurophysiological functioning, which is based on Edelman's work but with an important difference: Reed took the individual's situatedness in a landscape of affordances seriously. For Edelman, what is selected for in the nervous system is adequate categorization. Reed rejected such a view and held that what is selected for is an animal's sensitivity to the affordances and information in the environment: None of these neural selectionist theories has provided an account of the environmental structures involved in the selection process. … The relatively persisting affordances of the environment [emphasis added] and similarly persisting information for those affordances constitute the environmental basis of this neural selection process. Because affordances and the information for them tend to persist across many multiple populations of varying neural firings, it is these external factors that provide the selective shaping of neural functional systems. (Reed, 1996, p. 82) Thus, according to Reed, affordances and information for affordances persist in the environment over relatively long timescales, whereas neuronal groups come and go over shorter timescales. Animals come into the world not as blank slates, or with innate ideas, but with a variety of neuronal groups that need to be tuned to the specific structure of the econiche: "[It] is not the animal's brain that organizes its world, but the evolutionary ecology of the animal that organizes its brain" (Reed, 1996, p. 69).
For Reed (and Gibson), the ecological niche is made up of nested affordances. On Reed's view, affordances are relatively persistent resources in the environment to which the animal can open up or resonate to a greater or less extent. Hence, an animal's econiche is there prior to and relatively independent from the activities and abilities of a particular individual.

Value and selectionism
A crucial element for any selectionist account of behavior, learning, and development is to have the system differentiate between better and worse interactions with the environment. In evolutionary theory, fitness is characterized as the reproductive success of a particular phenotype. Selection happens by the very fact that successful phenotypes reproduce more than unsuccessful phenotypes. The phenotypes that proliferate are, by definition, more fit than phenotypes that don't. Over ontogenetic timescales, success is notably harder to define.
In Reed's ecological selectionism, success is defined in terms of how well an animal is able to open up to the affordances in the econiche: The values in an animal's econiche are embodied in the available affordances, and the meanings are embodied in the information available to these animals. No individual animal can use all the values or all the meanings. Psychology is in large part the analysis of how animal efforts to use value and meanings are selected and shaped by evolution, development, and experience. (Reed, 1996, p. 97) As we saw in the previous paragraph, Reed presupposes a relatively stable econiche (over ontogenetic timescales) to which individuals adapt to a greater or lesser degree. Those neuronal groups are selected that improve the individual's contact with the world.
Although we think Reed's account of value is an important step in the right direction, we think it is missing a number of important aspects. Reed is right in insisting that no animal uses all the affordances in the environment, but he keeps the values and meanings in the environment relatively fixed over time. However, whether responding to an affordance is appropriate is highly dynamic and dependent upon situational context and, particularly for humans, on the sociomaterial practice (Rietveld, 2008b;Rietveld & Kiverstein, 2014;Wittgenstein, 1953). To understand how one can have a notion of success that is flexible and context sensitive, we need to look at the work of Dreyfus and Freeman.

A second flirt: Dreyfus on Freeman
Dreyfus is well known for being one of the greatest critics of classical artificial intelligence and cognitive science (Dreyfus, 1972(Dreyfus, /1992. In many respects, Dreyfus and Gibson share their criticisms of the classical approach: They oppose any mediational elements between animal and environment (see Dreyfus & Taylor, 2015), and both reject the intellectualism and atomism inherent in classical cognitive science.
Dreyfus' positive research program was based on the philosophies of Heidegger and Merleau-Ponty (Dreyfus, 2002(Dreyfus, , 2007Kiverstein & Wheeler, 2012). Two of Merleau-Ponty's concepts are central to his own account: the intentional arc and the tendency toward an optimal grip. The intentional arc is characterized as a feedback loop between a skilled agent and its perceptual world. The agent's previous learning history shows up in the way the environment solicits particular actions, which allows for the direct perception of significance, or of what is relevant to do. The tendency toward an optimal grip is characterized by the tendency of an agent to be moved to improve its relation with the environment by responding to solicitations (Bruineberg & Rietveld, 2014;Dreyfus, 2007). For the skilled architect, her previous experience makes her feel discontented with a door that is too low and immediately makes her perceive a relevant action possibility for improvement. Responding to this solicitation she improves her grip on the situation by making the door higher (Rietveld, 2008b). Dreyfus (2007) saw in Walter Freeman's work the neurodynamical counterpart to Merleau-Ponty's notion of the intentional arc or the dynamically changing selective openness to affordances. Drawing upon work by Freeman (1987Freeman ( , 2000, Dreyfus proposed a holistic and integrated purposive organization that structures our openness to affordances.

Freeman's neurodynamics
Based upon years of work on the workings of the olfactory system in alert and moving rabbits, Freeman (2000) developed a model of rabbit learning through a history of interactions with the environment. He understands the brain to be a nonlinear dynamical system: Dependent on the current state of activation of the cortex, the same stimulus can die out or greatly perturb the dynamics of the system. The same odor of a carrot can, dependent on the current activation pattern of the cortex, have radically different effects. Important to note, the state space of the cortex can be regarded as an attractor landscape with multiple basins of attraction, each directly related to an action. What is crucial here is that each new attractor does not represent, say, a carrot, or the smell of carrot, or even what to do with the carrot. Rather, the brain's current state … is directly coupled with [emphasis added] or resonates to [emphasis added] the affordance offered by the current carrot. (Dreyfus, 2007, p. 258) Dreyfus called this "direct perception of significance" (p. 259). The integrated purposive organization takes the shape of a dynamically changing attractor landscape that captures the significance, or relevance, of affordances. The same patterns that embody the significance of affordances directly "guide the motor systems into sequential movements of intentional behavior" (Freeman, 2000, p. 114). An animal (in a particular macroscopic pattern) perceiving a significant stimulus is directly "readied" to act on relevant affordances.
Crucially this model entails a holistic organization: "When an animal learns to respond to a new odor, there is a shift in all [emphasis added] other patterns, even if they are not directly involved with the learning" (Freeman, 2000, p. 22). In other words, learning a new behavior involves a reorganization of the whole attractor landscape. It is because of this integrated or holistic organization that relevance and context can be already intrinsic to the system from the very beginning.
The basic picture that Freeman provides is that of a stimulus perturbing the actionreadiness pattern of the brain. Over time this might lead to a new organization of the system that changes the way in which the same stimulus perturbs the system. In turn, by acting on relevant affordances, the animal actively changes its environment. It is this feedback loop that requires further attention next.

Context and switching
As mentioned in the previous section, brain dynamics need to be sensitive to context and history: A bottle of water solicits drinking when I just put it there and I am thirsty, but not when my colleague just put his there.
A second, and related, aspect of sensitivity to affordances is our openness to multiple affordances simultaneously. According to Dreyfus, the horizon of experience is structured according to "what will be ignored, what will remain on the outer horizon of experience as possibly relevant, and that will be immediately taken into account as essential" (Dreyfus, 1972(Dreyfus, /1992. When typing these sentences, I am solicited by the keyboard and the screen, and slightly more in the background are a bottle of water, my smartphone, and a pile of philosophy books. But there are also possibilities on the horizon of my field that are not sensorily present: a colleague who might come in, a phone call I might get. When these events occur, my field of relevant affordances restructures itself and attunes to the new relevant aspects of the situation: asking my colleague how she's doing or picking up the phone. From a neurodynamic perspective, this flexible switching in action-readiness patterns is made possible by metastability (Bruineberg & Rietveld, 2014;Friston, 1997;Kelso, 1995Kelso, , 2012. Metastability can be understood as the outcome of two competing tendencies: the tendency of the components to couple together and the tendency to express their independent behavior. In a metastable regime, the system is poised at the edge of instability, a kind of dynamic stability that allows the system to maintain "a balance in the readiness of the system to transit between multiple attractors" (Davids, et al., 2012, p. 119). In the next section, we discuss metastability from the perspective of selectionism and neural dynamics.

"Successful" neurodynamics
Flexibly switching between action-readiness patterns is one important ingredient for skilled action, but switching is in itself not necessarily adaptive, because exploration may lead to problematic errors. The agent is required to be sensitive to how well it's faring in its interactions with the environment, and switch accordingly. Dreyfus (2007) wrote, The animal must take account of how things are going [emphasis added] and either continues on a promising path, or, if the overall action is not going as well as anticipated [emphasis added], the brain self-organizes so the attractor system jumps to another attractor. (Dreyfus, 2007, p. 259) Just like in Edelman's and Reed's work, one ultimately needs to have a notion of success, value, or well-being that is intrinsic to the animal. This is important not only for switching between neural attractors and environmental affordances but also for a learning process that allows the individual to improve in its interactions with the environment.
On Dreyfus's model, whether to switch behaviors or not (and where to switch to) is dependent upon how well an agent takes itself to be faring in its interactions with the environment, and how well it is faring is understood relative to what the agent anticipates. What is needed is an account of anticipation and selective consolidation. Without such a proper account of anticipation and selective consolidation, it remains mysterious how an agent can come to tend toward grip on a situation.

Neurodynamics and variation
The three important aspects of any selectionist theory are variation, encountering the environment, and selective consolidation. One of the main properties of both Edelman's and Freeman's work is that the intrinsic variability and instability of the brain's structure and dynamics are at the core of their theory. The two leading questions to pursue further are then how to best characterize the brain's variability and how to think about the functionality of the dynamics of the brain in connection to the interactions an agent has with its environment. Friston's early work on neurodynamics, which was in part inspired by Freeman's research, can help Gibsonian neuroscience make progress here.

Variability: a hierarchy of timescales
According to Friston (2000), the dynamics of the brain can be characterized from two complementary perspectives. The first characterizes brain dynamics as one dynamical system with a complex attractor manifold. This dynamic might have qualitatively different characteristics, dependent on where on the attractor manifold the system currently is. The other characterizes brain dynamics as a "perpetual transient." In dynamical systems theory, the term "transient" denotes the initial behavior of a system as it approaches an attractor. In the context of the brain, the dynamics can be said to be "perpetually" in this transient metastable state, always approaching but never reaching a stable attractor (Friston, 1997). The reason why the stable attractor is never reached is because the underlying state space of the attractor itself changes over time. These changes might, for example, be due to neuromodulation: The same neural circuit can exhibit distinctly different modes of activity dependent on the context (Briggman & Kristan, 2008;Engel et al., 2010).
The idea of a varying state space gives rise to the idea of "attractors within attractors" (Friston, 2000, p. 241): attractor dynamics over slow timescales (e.g., that of circadian rhythms) constrain and modulate the attractor dynamics of faster timescales (e.g., that of perception and action). We can thus speak of a hierarchy of timescales in the brain (Kiebel, Daunizeau & Friston, 2008), where each timescale provides the context for (or modulates the attractor landscape of) the dynamics at a faster timescale. We therefore suggest that the brain's dynamics are best characterized as a dynamical system with metastable attractor dynamics over multiple timescales, each timescale providing the context for dynamics at faster timescales. Taking the perspective of a hierarchy of timescales helps to explain the selection pressures at work on those control parameters that modulate the dynamics over faster timescales.
It is important to note that the kind of dynamics that might modulate neurodynamics are not confined to the brain. For example, Ito et al. (2014) found that respiration modulates the neurodynamics in the neocortex of awake mice. This occurs not only in the olfactory bulb but also in areas of the neocortex that are not involved in olfactory processing. Drawing upon Ito et al. (2014), Varga and Heck (2017) reviewed a broader body of evidence that purports to show how respiratory dynamics not only modulates neurodynamics but also go on to show how respiratory dynamics might be functional for a wide range of cognitive processes. The respiratory pattern acts as a kind of "pacemaker" for the dynamics of the brain. To some theorists, this finding at least hints at the distinct possibility that, rather than that the brain enslaves the body, the body enslaves the brain (Dotov, 2014;van Orden, Hollis, & Wallot, 2012). At least it shows the intertwinement of neural and extraneural dynamics.
To conclude this section, the brain's dynamics are best characterized as a dynamical system with metastable attractor dynamics over multiple timescales, each timescale providing the context for dynamics at faster timescales. Bodily dynamics, such as respiratory dynamics, can modulate neurodynamics as well. As such, the brain can be characterized as a highly labile organ in open contact with the dynamics of the body it is housed in. These rich (metastable) dynamics are the sources of variability that are the basis for a selectionist account for perception and action. The question then is how these dynamics can be structured by an animal's encounters with the environment.

Selection for variability
So far in this section only the sources of variation of (neuro)-dynamics were provided. The important question now is what its functionality might be. Put in other words: What are the selective pressures at work on the dynamics of the brain when put in the context of exchanges with the environment? On Freeman's account, the cortex can be seen as an attractor landscape. Dynamics over slower-time scales (presumably partly driven by subcortical structures; see, e.g., Cisek & Kalaska, 2010;van Maanen et al., 2011 ) that act as control variables for the attractor landscape of the cortex.
Neural selection selects for those dynamic control variables that best fit the situation, but crucially this requires enough diversity and switchability. This suggests that metastable dynamics is itself selected for because it is the source of variability in the brain: "If it is necessary to have metastability to facilitate neuronal selection then that metastability has, by definition, adaptive value. It will therefore be selected for at both an evolutionary and neuronal level" (Friston, 2000, p. 248). An agent's metastable neurodynamics support the individual's evolvability by providing the diversity of the options that can be selected.
We can now put together a number of ideas presented so far to understand the selective pressures at work on neurodynamics. First, responsiveness to affordances can be better or worse in the context of a particular situation (Rietveld, 2008b). Second, the attractor dynamics of the cortex structures the relevance of an agent's affordances, this is Freeman's model. Third, following Friston the attractor dynamics of the cortex are underpinned by dynamical control variables. Now, the extra assumption is that dynamical control variables are subject to selective consolidation. That is to say, the brain needs to be sensitive to how well things are going. When things are going well, it needs to consolidate or "reinforce" those dynamics (Friston et al., 1994). Combined, these assumptions lead to the idea that there are selective pressures on the intrinsic dynamics of the brain to steer the agent towards better interactions with the environment.
What is required for this story to work is a consolidation of "successful" dynamic control parameters. This raises the question about what normative terms like "successful" and doing "well" mean in this context. This is be the topic of the next section.

Selection and anticipation
Already in the early work by Friston (1997bFriston ( , 2000 one can see an interest for the selective pressures at work on neurodynamics when put in the context of perception and action. These ideas get extended and formalized in more recent work on what is called the free-energy principle (Friston, 2010;Friston & Stephan, 2007). The basic idea behind the free-energy principle is that any system that avoids a tendency to disorder, necessarily constrains its interactions with the environment. Biological systems are able to comply with these constraints by minimizing the information-theoretic quantity of variational free-energy (see Bruineberg, Kiverstein, & Rietveld, 2016, for an explanation of the free-energy principle in the context of ecological psychology).
The main novelty of the free-energy principle is to unify several forms of value under the header of anticipation. Phenotypes are defined in relation to their viable or characteristic states (roughly defined as the states you tend to find a flourishing phenotype in over time). If you want to look for flourishing whales, look in deep sea, not at shore. The tautology here is that for a flourishing animal, those states are valuable that it tends to frequent and it frequents those states that are valuable. We have seen such a conception of value already earlier when value was considered in the context of selectionism (Friston et al., 1994).

Perceptual and active inference
Originally, the quantity of free-energy was used in the context of purely perceptual inference (Dayan, Hinton, Neal, & Zemel, 1995). That is to say, given a set of data: What is the most parsimonious model that best explains the data? The process of perceptual inference can be likened to that of a scientist building a causal model that best explains some observations (Friston, 2005;Rao & Ballard, 1999). The scientist tries to minimize the error between observations and the predictions of the model. Perceptual inference fits with Gregory's (1980) reconstructive account of perception that ecological psychologists reject. In that context, predictive success means epistemic success. In later formulations, action is added as well-initially only to support perceptual inference (Friston, Adams, Perrinet, & Breakspear, 2012). Action is then likened to setting up worldly experiments that are able to test between different causal models. As such, action is auxiliary to perceptual inference. Again, the only success that counts is epistemic success: acquiring knowledge about the causal structure of the world.
However, when perception and action are put in the context of a flourishing embodied agent, things start to change considerably (Bruineberg, Kiverstein, & Rietveld, 2016;Friston, 2011). Perception and action do not stand in the service of developing a hypothesis about the causal structure of the world but rather about ensuring that the animal inhabits a viable econiche. A flourishing agent needs to anticipate states that are compatible with its own existence and ways of flourishing (cf. Fajen, 2007). Even though the most likely explanation of its current sensations is that the agent is standing under a too hot shower, it needs to treat that situation as a very unlikely (untypical) event, and act on the world to transition to more typical sensations. Hence, in its very makeup as a living, embodied, and situated being, it is committed to the "hypothesis" that it is doing well. Perception and action are not about reconstructing the hidden causal structure of the environment but about securing that the agent maintains favorable relationships with its environment.
What is at the heart of the free-energy principle then is a congruence between the agent's econiche and the agent's system of anticipations (the so-called generative model; see next). Value is still tied to anticipation, but anticipation is not in itself about coming up with the "correct" hypothesis about the world. The free-energy principle borrows its account of value from selectionism and evolutionary biology: A population of freeenergy minimizing agents, all with different anticipatory dynamics, will in any given environment be differentially succeeding in staying alive. The system of anticipations of a successful agent will then be better fit to its environment than that of the others, as that agent is better able to have low surprising interactions with its environment. The states the agent anticipates with high propensity (Friston et al., 1994) will, in that case, be the states in which the agent flourishes. Hence, an agent will come to anticipate flourishing states by the simple reason that if it would not anticipate to be in states in which it is flourishing, it would stop doing well or cease to exist. The selection pressures on the agent push the agent's anticipatory dynamics in the direction of congruence with its niche. If the agent's anticipatory dynamics are congruent with the agent's embodiment and sociomaterial situatedness, the agent is doing well: Embodiment plays a fundamental and bilateral role in the free-energy formulation. On the one hand, agents embody (model) causal structure in the environment. On the other hand, the physical instantiation of this model is embodied in the environment. Only when the two are mutually compatible can the agent exist. (Friston, 2011, p. 90) In the free-energy principle, this attunement between environmental dynamics and agential dynamics is crucial. The question then is how to best understand the congruence between agent and environment under the free-energy principle. We address this issue in the next section.
Embodying the econiche So far we have presented a modern version of selectionism, called the free-energy principle. The free-energy principle solves the problem of value by a dual appeal to anticipation. First, an animal's system of anticipations needs to be congruent with the structure of its environment. Second, an animal must minimize the discrepancy between its anticipations and the feedback it is getting from the environment. Although they are typically aligned, the two can come apart: If an agent would anticipate an internal body temperature of 40 C, and bodily processes would work so as to reduce the discrepancy between anticipation and the body, then discrepancy might be minimized, but still the agent quickly becomes ill and might die.
Still, one might think that despite the importance of the structure of the environment and despite the importance of the biases imbued on the agent by selection for flourishing, the free-energy principle is nonetheless intellectualistic at heart: An agent comes to infer the hidden causal structure of the environment by minimizing the prediction-error between the sensory consequences of a hypothesis and actual sensory input. However, we think this objection is less problematic than it might seem because much of the mathematical formalisms rely upon forms of "generalized synchronization" (Friston, 2013), the kind of synchronization exhibited by coupled clocks and other coupled dynamical systems. Resonance is a kind of synchronization that we find in many places in nature (Stepp & Turvey, 2010). Echoing Reed's (1987) critique on Edelman, we might say that, in many ways, Friston seems to want to endorse a sort of "resonance" account, but his language often leads to a more "cognitivist" interpretation (see Bruineberg, 2018, pp. 30-33).
The key question for the ecological-enactive free-energy principle (E-FEP; Bruineberg, Kiverstein, & Rietveld, 2016) is not how the brain comes to infer the hidden state of the environment but how the agent acts on the world so as to make the environment conform to what it anticipates. If the agent anticipates a flourishing state, the system of anticipations will steer its interactions with the environment toward flourishing. Our E-FEP approach has generalized synchronization and resonance at its core and attempts to explain how, as a result of free-energy minimization, neurodynamics becomes attuned to anticipate relevant affordances that make the whole system tend toward grip on its ecological niche.
This brings us in a position to answer the question that motivated the title of this article: What is inside your head once you have figured out what your head is inside of? What does it mean for an agent's anticipatory dynamics to be congruent with the structure of the niche? How to think about the relation between the econiche and the structure of the agent? Again, here the distinction between instructionism and selectionism shows up: "An agent does not have a model of its world-it is a model. In other words, the form, structure, and states of our embodied brains do not contain a model of the sensorium-they are that model" (Friston, 2013, p. 213).
From an instructionist perspective, the agent would have a model that instructs it what is out there and what to do. From a selectionist perspective, the structure of the agent is selected for being able to anticipate the unfolding of the environment. In doing so, it necessarily comes to embody the structure of the niche, a system capable of perceiving the meaningful and relevant features of the environment: "Each phenotype or agent embodies an optimal model of its econiche" (Friston, 2011, p. 89). This pertains not only to the sensorily present aspects of the environment: Because she is familiar with the environment, a teacher, for example, can anticipate writing on the blackboard even though her back is facing the board.
At the very minimum, this being a model of its econiche implies that the agent embodies in its structure and organization the skills that complement the econiche. By being attuned to its environment an agent anticipates not so much the causal structure of the environment per se but rather the dynamic nested structure of the relevant affordances in the environment. By being situationally responsive to the relevant affordances in the environment, an agent comes to have grip on its interactions with the environment and can thrive in the characteristic states that make up its way of life. Playfulness, seeking novelty, and acquiring new skills in new practices are part of what characteristic states are in the human ecological niche (Kiverstein, Miller, & Rietveld, 2017) and can therefore be accounted for in E-FEP.

Conclusion: anticipating affordances
In this article we have provided an integration of ecological psychology with selectionist neuroscience. From an ecological perspective, the central question to be asked to neuroscience is how to account for context-sensitive selective openness to affordances. Although mainstream cognitive neuroscience is built on intellectualist and reconstructive foundations, we believe that a nonintellectualist, nonreconstructive neuroscience, based on selectionist principles, is currently available. These lines have previously been explored by Reed and Dreyfus in their treatment of Edelman and Freeman, respectively, and can be further developed on the basis of E-FEP, our ecological-enactive understanding of Friston's free-energy principle.
What is central to the approach we take in this article is, to paraphrase Reed (1989), to explain how self-organization in the nervous systems necessarily leads to a system that is sensitive to the relevant affordances in the environment. Important to note, sensitivity to these affordances does not require representing them: What is necessary for detection and recognition is not representation, but a system that itself is a population whose elements are specific to the relevant dynamically changing components of the stimulation and embodies a selective principle that facilitates the emergence of functional units. (Reed, 1989, p.107) The emergence of functional units specific to the dynamically changing situation can be seen as self-organized coordinating action-readiness patterns of brain and body that shape the organism's openness to the affordances in the environment (Bruineberg & Rietveld, 2014), or as the self-organized formation of neural coalitions adapted for the specific situation (Anderson, 2014).
It is important here that the possibility to switch to new functional units (states of action-readiness) is highly adaptive. Given that we live in a highly dynamic world, being metastably poised to switch to multiple new relevant action-readiness patterns is itself an adaptive trait, and necessary for an agent to tend toward grip on its interactions with the environment.