Behavioral and Cognitive Robotics
An adaptive perspective

Stefano Nolfi

© Stefano Nolfi, 2021   |   How to cite this book   |   Send your feedback   |   Collaborate

Index Next Chapter

3. Embodiment

3.1 Introduction

The term embodiment is used to indicate agents that possess a physical body. In the case of robots, the body is composed of parts made of different materials and arranged in a given morphology. The role of the body has been largely underestimated  during the 70’s, when the deliberative view of intelligence was dominant. The importance of the body started to be appreciated only later when a series of studies demonstrated the strict interdependence between the body and the brain both in natural systems (Thelen & Smith, 1994; Spivey, 2007) and in robots (Pfeifer and Bongard, 2016).

This drastic change of perspective led to the elaboration of a new scientific paradigm that is indicated with the term embodied mind (Varela Thomson and Rosch, 1991) or embodied cognitive science (Pfeifer and Sheier, 1999; Pfeifer and Bongard, 2016). According to this paradigm, intelligent behavior is the emergent product of many decentralized interactions occurring between the brain of the agent, the body of the agent, and the environment. The function of each of these elements is interdependent and cannot be separated by the function of the other elements. The body plays a role as important as the role of the brain.

3.2 On the importance of fine-grained morphological properties

Clearly, the overall morphology of a robot constraints the behavior that it can produce. Morphologies suitable to fly might not be suitable to swim and vice versa. However, the fine-grained characteristics of the body matter as well. Indeed, robots can exploit the morphological properties of their body to produce effective behaviors. For example, they can exploit the size, the shape and the elasticity of their body parts and the effects that these properties have on the interaction between the robot and the environment to produce a desired behavior. 

The importance of detailed characteristics of robots’ bodies can be illustrated by passive walking robots (McGeer, 1990; Collins et al., 2005), i.e. brainless bipedal robots capable to walk on an inclined slope without actuators. These machines are constituted only by rigid bars linked with passive hinge joints (see Figure 3.1). Despite their simplicity, they are capable to produce a walking behavior, they are energy efficient and they are robust to environmental disturbances. Moreover, they display a natural walking behavior (Video 3.1).

Figure 3.1. Schematization of a 2D passive walker. (Figure adapted from McGear, 1990)

The walking behavior of these machines emerges from the interaction between the body of the robot and the slope mediated by the effect of gravity and collisions. Indeed, the force generated by gravity on the body parts of the robot and the force originating from the collisions of the feet with the ground modify the position of the hip and of the other parts forming the legs. The modification of the positions and the orientations of the body parts, in turn, alters the way gravity acts on the body parts. The sequence of these bi-directional interactions, in which gravity and collisions modify the state of the robot and the new state of the robot combined with its morphological characteristics regulates the effects of gravity and collisions, generate a periodic dynamical process (the walking behavior) that stays stable as long as the machine is on the slope.

Video 3.1. Passive Dynamic Walker. (; McGeer, 1990).

Clearly, possessing articulated legs constitutes a prerequisite for the production of the walking behavior in these robots. However, the detailed characteristics of the body, i.e. the length of the upper and of the lower segments, the mass of each part, and the rigidity/elasticity of the material matter as well. Indeed, even small variations of these properties can compromise the walking ability. In other words, the walking ability of a passive walker depends on the fine-grained characteristics of its body.

For the sake of analysis, we can divide the periodic walking behavior exhibited by a passive walker robot in four phases:

  1. The robot starts swinging its right leg forward by exploiting the effect of gravity and inertia while maintaining its left leg extended thanks to the support of its left foot (that is in contact with the ground) and thanks to the support of the fully extended left knee joint.
  2. Once the right leg becomes fully extended, the robot touches the ground with its right foot and keeps moving its hip forward as a result of inertia. These movements combined with the pivot action of the right leg produces an elevation of the left leg from the ground.
  3. The robot starts swinging its left leg forward by exploiting the effect of gravity and inertia while maintaining its right leg extended thanks to the support of the right foot, in contact with the ground, and thanks to the support of the fully extended right knee joint.
  4. Once the left leg becomes fully extended, the robot touches the ground with its left foot and keeps moving its hip forward as a result of inertia. This movements combined with the pivot action of the left leg produces an elevation of the right leg from the ground.
  5. Repeat the above four phases.

The sub-behavior produced during each phase crucially depends on the fine-grained characteristics of the body of the robot. For examples, the mass of the shank codetermines the swinging speed during phases 1 and 3. The swinging speed, in turn, codetermines the angle that the knee joints assume at the end of the swinging phase when the foot touches the ground. The angle of the knee at the end of the swinging phase combined with the angular limit of the knee joints determines the pivot action that starts the swinging of the other leg. Overall, this implies that the mass of the parts of the body, the length of the segments, and the angular limits of the joints are crucial for the production of the walking behavior. They should be set carefully to ensure that the interaction between the body and the environment produce a walking behavior.  

3.3 Morphological computation

As we stated in the previous Chapter, the role of the brain is that to codetermine the actions performed by the robot in a context dependent manner. The same role, however, can be played by the body of the robot. Indeed, as we have seen in the previous Section, the velocity with which a passive walker moves its legs during a swinging phase depends on the mass of its shanks. The mass of the shank, therefore, can play the same role of an integrated set of sensors, neurons and actuators able to detect information about the current position of the body parts of the robot, compute the state of the actuators, and exhort a torque on the joint so to appropriately alter the speed of the legs. The ability of the robot’s body to perform the same function of the brain has been named morphological computation (Pfeifer, Iida & Gómez, 2006).

In the case of the passive walkers illustrated above, the role of regulating the actions performed by the robot in a context dependent manner is entirely played by its body. In other cases, such function is carried by both the body and the brain. Examples of the latter cases includes quasi-passive walkers capable of walking also in flat terrain (Omer et al., 2009) and compliant quadruped robots (Spröwitz et al., 2013).

The possibility for a robot to produce a given desired behavior thanks to a proper body and/or to a proper brain has two important implications. The first is that the robot can use morphological computation to perform regulations that would be difficult or impossible to perform through the brain, e.g. very fast regulations. This implies that robots exploiting morphological computation can outperform robots lacking this property. The second implication is that robots can produce “complex” behavior with “simple” brains. Eventually, even without brain, as in the case of the passive walkers.

Morphological computation also implies that the ability of codetermining the robot’s actions in a context dependent manner can be distributed among the brain and the body of the robot. This implies (i) that the functions played by the body and by the brain are not separated, and (ii) that the role played by the brain cannot be explained without considering the role of the body and vice versa.

3.4 Body adaptation

The body of the robot can be adapted so to enable the robot itself to perform a desired function.

An interesting example of body adaptation is constituted by the work of Cheney, Clune & Lipson (2014) who evolved robots formed by cubic cells made of different materials to move as fast as possible over a planar surface. The cells are distributed within a grid of 10x10x10 voxels. Each voxel can be empty or can include a cell of one of the following types: a bone cell made of rigid material, a tissue cell made of soft material, a muscle cell that periodically contracts and expands, or a muscle cell that periodically expands and contract (Video 3.2).

Video 3.2. Evolving robots formed by cubic cells of different type. Rigid, soft, contracting-and-expanding, expanding-and-contracting cells are indicated in blue, cyan, red and green, respectively (; Cheney, Clune & Lipson, 2014).

In the example shown in the Video, the evolving robots are sensor-less. In other related models, however, the expansion and contraction behavior of the muscle cells is regulated on the basis of the state of local sensors (see Cheney, Clune & Lipson, 2014).

The content of each voxel is determined through an evolved developmental network that receives as input the Cartesian coordinate of each voxel and produce as output the content of the voxel (for details, see Cheney, Clune & Lipson, 2014). Evolving robots are situated over a flat surface. The fitness corresponds to the distance covered by the robots during an evaluation episode.

As illustrated in Video 3.2, the morphology of the robots varies across generations. The evolutionary process produces robots with more and more adapted bodies capable to walk better and better until the process converge on a given morphological solution that remains relatively stable in successive generations. The morphology, the behavior, and the performance exhibited by evolved robots vary considerably in different replications of the experiment.

These robots represent another clear illustration of the principle of morphological computation. They are brainless, like passive walkers. Consequently, their ability to walk comes exclusively from their morphological characteristics.

A following work demonstrated the possibility of using a similar approach to evolve creatures made of living cells capable to swim in a liquid environment (Kriegman et al., 2020). This was realized: (i) by evolving in simulation creatures formed by rigid and contractile cells for the ability to swim in a liquid environment, and (ii) by creating living agents formed by cardiomyocyte and epidermal stem cells assembled to create morphologies similar to those of the evolved creatures (Video 3.3). These creatures display behaviors similar to that displayed by the corresponding evolved creatures in simulation (Video 3.3). Remarkably, they are capable to explore their aqueous environment for days without human intervention.

Video 3.3. Evolved robots made of passive and contractile cells evolved in simulation and then manufactured by using living cells. (; Kriegman et al., 2020).

3.5 Co-evolving the body and the brain

The robots described in the previous section are brainless. However, one can also evolve the body of robots that include a neural network controller. In other words, one can set-up an experiment in which the body and the brain of the robots co-evolve.

This can be done by using a fixed number of morphological and control parameters and by using a direct encoding method in which each morphological and control parameter is encoded in a corresponding element of the genotype. Alternatively, it can be realized by using an indirect encoding method and genotypes with varying length.

The direct encoding method has been used by Pagliuca & Nolfi (2020) to adapt the brain and the detailed morphological properties of robots with a predetermined bauplan and to evolve robots in which both the general an detailed characteristics of the body are subjected to variations. In both cases the robots are formed by a fixed number of cylindrical elements attached through actuated hinge joints (Figure 3.2). However, in the first case the robots are characterized by an hand-designed morphological layout that is substantially preserved since the range of variation of the morphological parameters is limited. This is the case, for example, of the HalfCheetah robot (Todorov, Erez & Tassa, 2012; Coumans & Bai, 2016) with variable morphological parameters shown in Figure 3.2 (top). In the second case, instead, the robots are constituted by a collection of identical elements assembled in a uniform bauplan that can be transformed substantially. This is the case of the robots shown in Figure 3.2 (bottom) formed by 11 segments attached to each other through actuated hinge joints. In these robots the number of morphological parameters subjected to variation and the range of variation is larger.

Figure 3.2. Top: An Halfcheetah robot with morphological properties that can vary up to 20%. Bottom: A robots formed by 11 segments attached to each other through actuated joints in which the morphological parameters are allowed to vary within larger ranges.

The robots are provided with feed-forward neural network controllers. The sensory neurons encode: the velocity and the orientation of the central segment, the angular position and velocity of the actuated joints, and the state of  contact sensors located on the segments. The motor neurons encode the torque applied to the actuated joints. The morphological parameters that are subjected to variations are the length and the diameter of the segments, the angular limits of the joints, and, in the case of the second set of experiments, the default angle of each segment with respect to the previous segment. The range of variation of the morphological parameters is limited to 20% in the case of the first set of experiments and is larger in the case of the second set of experiments (see Pagliuca and Nolfi, 2020).

Video 3.4 shows the behavior of typical evolved robots. The obtained results indicate that the possibility to vary the morphology of the robot within limits permits to achieve better performance with respect to control experiments where the morphology of the Halfcheetah robots remain fixed (Pagliuca and Nolfi, 2020). The results of a second set of experiments allowing the morphological properties to vary in larger ranges indicate that evolution successfully discover suitable morphological bauplans from scratch (Pagliuca and Nolfi, 2020). The analysis reported by the authors also indicate that the advantage gained by co-evolving the body and the brain derives by the possibility to adapt the features of the body to the current features of the brain and vice versa.

Video 3.4. Top: Behavior of a typical evolved Halfcheetah robot with the parameters of the morphology are allowed to vary up to 20%. Bottom: Behavior of a typical robot when the general bauplan of the robot’s body is evolved as well.

Other works have been realized by using indirect encoding methods and genotypes with variable length (Sims, 1994; Lipson and Pollack, 2000; Auerbach et al., 2014) Lipson and Pollack (2020), for example, proposed evolving robots composed by a variable number of elementary elements (cylinders, actuated telescopic joints, and neurons) arranged in variable configurations. The actuated telescopic joints permits to vary the length of the cylinders while the robot interacts with its environment. The genotypes of the evolving robots are formed by a list of tuples that encode the elements forming the body and the brain of the robot as well as the relation between these elements. More specifically each tuple encodes an element belonging to one of the following categories: vertices (i.e. point in a Euclidean space), cylinders, neurons, and actuators. Moreover, each tuple encodes the following parameters:

Variations are introduced by using genetic operators that: (i) perturbate randomly the real number of parameters (e.g. the coordinates of vertexes, the connection weights of neurons etc.) or replace the integer parameters with a new integer in the available range (e.g. the index of cylinders and neurons), (2) add a new random tuple or remove an existing tuple, (3) replace a tuple encoding a cylinder with two tuples encoding two cylinders extending between the two original vertices.

The robots are evolved for the ability to move as much as possible. The fitness is computed by measuring the distance from the initial and final position of the center of mass of the robot during an evaluation episode.

Video 3.5. Robots with co-evolved body and brain. (; Lipson & Pollack, 2000).

Video 3.5 shows the behavior and the morphology of typical evolved robots.  As shown in the Video, the solutions evolved in simulation can be manufactured by creating the body parts with a 3D printer and by manually assembling the motors and the electric wires.

3.6 Defining embodiment

I began this chapter by saying that the term embodiment refers to the fact that robots have physical bodies and that the properties of the body co-determine the behaviors displayed by the robots. From the perspective of this initial definition, embodiment is a categorical property own by robots and missing by other agents, e.g. web bots. It is a constituting property of all robots.

After having illustrated the way in which the body influences the behavior of a robot we can introduce a more specific definition of embodiment that has a quantitative nature. Embodiment indicates the extension to which the body of a robot is adapted to the other constituting elements: the brain of the robot, the environment, and the task that the robot should accomplish. I believe that this definition describes the true essence of embodiment. Moreover, I believe that this definition has a practical utility since it permits to differentiate robots that are capable to exploit their morphological properties from robots lacking this ability.

On the basis of this definition we could state that a robot, with certain morphological properties, is more embodied than a second robot, with different morphological properties. We can say that the higher the level of embodiment is, the greater the chances that the robot will operate effectively are. Moreover, we can say that the higher the level of embodiment is, the greater the amount of computation performed by the body is (and consequently the smaller the amount of computation that needs to be performed by the brain is).

3.7 Learn how

Read the sections 5 of Chapter 13 to familiarize with evorobotpy2, a simple but powerful software that enables you to evolve robots in simulation. Use evorobotpy2 to evolve an agent capable to solve the acrobat problem by following the instructions included in the Exercise 4. Then read section 13.6 and follow the instructions included in the Exercise 5 to learn how to co-evolve the body and the brain of a robot formed by multiple segments and adapted for the ability to locomote.


Auerbach J.E., Aydin D., Maesani A., Kornatowski P.M., Cieslewski T., Heitz G., Fernando P.R., Loshchilov I., Daler L & Floreano D. (2014). RoboGen: Robot generation through artificial evolution. In H. Sayama, J. Reiffel, S. Risi, R. Doursat, & H. Lipson (Eds.), Proceedings of the Fourteenth International Conference on the Synthesis and Simulation of Living Systems (ALIFE 14). New York: The MIT Press.

Cheney N., Clune J. & Lipson H. (2014). Evolved electrophysiological soft robots. In H. Sayama, J. Reiffel, S. Risi, R. Doursat, & H. Lipson (Eds.), Proceedings of the Fourteenth International Conference on the Synthesis and Simulation of Living Systems (ALIFE 14). New York: The MIT Press.

Collins S., Ruina A., Tedrake R & Wisse M. (2005). Efficient bipedal robots based on passive-dynamic walkers. Science 307 (5712): 1082–1085.

Coumans E. & Bai Y. (2016). Pybullet, a python module for physics simulation for games, robotics and machine learning., 2016–2019.

Kriegman S., Blackiston D., Levin M. & Bongard J. (2020). A scalable pipeline for designing reconfigurable organisms. PNAS: 1910837117.

Lipson H. & Pollack J.B. (2000) Automatic design and manufacture of robotic lifeforms. Nature 406 (6799): 974-978

McGeer T. (1990). Passive dynamic walking. International Journal of Robotics Research 9 (2): 62–82.

Omer A.M.M., Ghorbani R. Lim H. & Takanishi A. (2009). Semi-passive dynamic walking for biped walking robot using controllable joint stiffness based on dynamic simulation. Proceedings of the IEEE/ASME International Conference on Advanced Intelligent Mechatronics. Singapore: IEEE Press.

Pagliuca P. & Nolfi S. (2020). The dynamic of body and brain co-evolution. arXiv preprint arXiv:2011.11440.

Pfeifer R. & Bongard J. (2016). How The Body Shapes the Way We Think: A New View of Intelligence. Cambridge, MA: MIT Press.

Pfeifer R. & Scheier C. (1999). Understanding Intelligence. Cambridge, MA: MIT Press.

Pfeifer R., Iida F & Gómez G. (2006). Morphological computation for adaptive behavior and cognition. International Congress Series, 1291: 22-29. Berlin, Germany: Springer Verlag.

Sims K. (1994). Evolving 3D morphology and behavior by competition. Artificial Life 1 (4): 353-372.

Spivey M. (2007). The Continuity of Mind. New York: Oxford University Press.

Spröwitz A., Tuleu A., Vespignani M., Ajallooeian M., Badri E. & Ijspeert A. J. (2013). Towards dynamic trot gait locomotion: Design, control, and experiments with Cheetah-cub, a compliant quadruped robot. The International Journal of Robotics Research 32(8): 932–950.

Thelen E. & Smith L.B. (1994).  A Dynamic Systems Approach to the Development of Cognition and Action. Cambridge, MA: MIT Press.

Todorov E., Erez T. & Tassa Y. (2012). Mujoco: A physics engine for model-based control. In Proceeding of the IEEE/RSJ Intelligent Robots and Systems Conference (IROS), 2012 IEEE/RSJ International Conference on, pages 5026–5033. IEEE.

Varela F. J., Thompson E. T. & Rosch E. (1991). The Embodied Mind: Cognitive Science and Human Experience. Cambridge, MA: MIT Press.