Adaptive prior selection for repertoire based adaptation in robotics
Among the data-efficient approaches for online adaptation in robotics (meta-learning, model-based reinforcement learning, etc.), repertoire-based learning (1) generates a large and diverse set policies in simulation that acts as a "reservoir" for future adaptations and (2) learns to pick online the best working policies according to the current situation (e.g., a damaged robot, a new object, etc.). Each of these policies performs a different task, for instance, walking in different directions; these policies are then sequenced with a planning algorithm to achieve the given task. In this paper, we relax the assumption of previous works that a single repertoire is enough for adaptation. Instead, we generate repertoires for many different situations (e.g., with a missing leg, on different floors, etc.) in simulation that act as priors for adaptation. Our main contribution is an algorithm, APROL (Adaptive Prior selection for Repertoire-based Online Learning) to plan the next action by incorporating these priors when the robot has no information about the current situation. We evaluate APROL on two simulated tasks: (1) pushing unknown objects of various shapes and sizes with a kuka arm and (2) a goal reaching task with a damaged hexapod robot. We compare with "Reset-free Trial and Error" (RTE) and various single repertoire-based baselines. The results show that APROL solves both tasks in less interaction time than the baselines. Additionally, we demonstrate APROL on a real, damaged hexapod that quickly learns compensatory policies to reach a goal by avoiding obstacle in the path.READ FULL TEXT VIEW PDF
Adaptive prior selection for repertoire based adaptation in robotics
Reinforcement Learning (RL) algorithms achieved impressive successes during the last few years, from beating professional pro players to learning to play games from pixels, but at the expense of enormous interaction time with the system. For example, they required up to 38 days of game-play (real time) for Atari 2600 games [mnih_human-level_2015], 4.8 million games for Go [silver_mastering_2016], or about 100 hours of simulation time (more if real time) to train a 9-DOF mannequin to walk [heess2017emergence]. This makes these algorithms good for policy synthesis, that is, creating a policy for a robot, but impossible to use for online learning in robotics, that is, adapting online to a new system or a new situation.
Model-based reinforcement learning algorithms (MBRL) allow robots to learn policies with less interaction time by alternating between learning a dynamical model of the robot from the observed data, and using that model for control (e.g finding a policy [deisenroth2011pilco, chatzilygeroudis2017black, kaushik2018multi] or using it for model predictive control [williams2017information, nagabandi2018learning, chua2018deep]). Since these algorithms optimize a policy (or plan an action) on the learned dynamical model, they can be highly data-efficient. However, MBRL does not scale well with the dimensionality of the state-space as the amount of data required to learn a model typically scales exponentially with the dimensionality of the input space.
A promising way to address the “curse of dimensionality” of reinforcement learningfor online adaptation is to learn a model that corrects the expected outcome of a repertoire of elementary policies learned beforehand in simulation [cully_evolving_2015, cully_robots_2015, chatzilygeroudis2018reset, duarte2017evolution, sharma2019dynamics]. This process splits the policy search problem in two: policy search happens in simulation, where many samples can be used, whereas adaptation happens in the task space, which is usually lower-dimensional. For instance, given a repertoire that makes an 6-legged robot (18D joint space) walk in each direction (one policy for each direction, 2D task space), we can learn to predict how this space is transformed when transferred to a damaged robot (e.g, one missing leg) [chatzilygeroudis2018reset]. With an accurate correction model, a planning algorithm can then select a sequence of elementary policies that takes into account the outcome difference between the prior — the intact robot in simulation — and the reality — the real, damaged robot. In essence, this means learning a model in the task space (e.g., the coordinates of the end effector), instead of the state-space (e.g., the joint positions) like in MBRL; since the dimension of task space is often much smaller than the state-space, this reduces the dimensionality of the model, and therefore the amount of interaction time.
Like with any learning algorithm based on prior knowledge, the effectiveness of the adaptation process depends critically on the difference between the prior and the reality: the bigger the difference, the worse it will perform (more interaction time, lower quality policies). In this paper, we address this issue by allowing the adaptation algorithm to select the most interesting prior among a set of priors learned beforehand. In other words, we learn several repertoires in simulation with different conditions (e.g., different damage) and the robot adapts by both searching for the most suitable prior and correcting their expected outcome.
To do so, we propose to generate several repertoires using MAP-Elites [cully_robots_2015, mouret_illuminating_2015] (in simulation) for a sub-set of probable situations that maps the relative observations (e.g relative displacement) to unique open-loop controllers. Using these repertoires as prior mean-function for Gaussian process regression model [rasmussen2006gaussian]
, we learn as many model as the number of repertoires, which map expected observation to actual observations. Instead of selecting a single global model for planning and controlling the robot, we pose this as a maximum a posteriori (MAP) estimation problem of the next action, given the priors, the past observations and the goal. We call this algorithm APROL (Adaptive Prior selection for Repertoire-based Online Learning).
To be useful for online learning in robotics, learning has to happen within a very short interaction time (ideally less a few minutes) [chatzilygeroudis2018survey]. In this direction, MBRL algorithms showed promising results by allowing robots to learn new skills within a few minutes of interaction with the real world [kaushik2018multi, chatzilygeroudis2017black, deisenroth_gaussian_2015, chua2018deep]. These model-based approaches mainly fall into two categories depending upon where the learning process is inserted [chatzilygeroudis2018survey]: (1) alternating between learning a model and learning an optimal policy according to the model, which is called model-based policy search [deisenroth_gaussian_2015, chatzilygeroudis2017black], and, (2) learning a model of the system dynamics which is then used along with a planner to solve the given task [chua2018deep, williams2017information], which is often called adaptive model predictive control. Most of the experiments so far have been based on episodic learning: after each trial, the robot is reset to the same starting state. While this makes sense for manipulation tasks, which can be reset easily, it is difficult to use for locomotion tasks in the field.
Nevertheless, learning a model that is good enough to plan and control a complex robot requires large amount of data/observations. This contrasts with animal behavior which can adapt to new situations (such as uneven terrain, broken limbs) within a minute or even in seconds. To accelerate the learning process and thereby increasing the data-efficiency, many recent papers propose to leverage prior knowledge about the system dynamics, that is, a known but imperfect simulator. In traditional robotics, the parameters of a parametric model are identified from data[Hollerbach2016]; in more recent approaches [chatzilygeroudis2018using, cutler_efficient_2015], a parametric [chatzilygeroudis2018using] or fixed [cutler_efficient_2015]
model is “corrected” with a non-parametric model to capture potentially non-linear effects. Meta-learning is a second way of using prior knowledge (usually also from simulation), that is, learning from simulated experiments how to adapt the model quickly (for instance, by starting from a well-chosen set of parameters for the model)[nagabandi2018learning].
Repertoire-based learning is another promising approach for data-efficient adaptation with priors [cully_evolving_2015, cully_robots_2015, chatzilygeroudis2018reset, pautrat2018bayesian, sharma2019dynamics, duarte2017evolution]. The general idea is to first generate a large and diverse repertoire of policies (hundred to thousands policies) with a known but imperfect simulation, and then learn to pick from these repertoire the policies that work on the actual robot in the current situation. The repertoire-based algorithm that is the closest to the present work is “Reset-free Trial and Error” (RTE, [chatzilygeroudis2018reset]). In this algorithm, a repertoire of elementary policies is learned with MAP-Elites [mouret_illuminating_2015, cully_robots_2015] to reach points around the current positions; for instance, one policy to walk forward, one policy to walk backward, one policy to turn right by 30 degrees, etc. On a damaged robot, this repertoire needs to be modified since policies that are supposed to make the robot move forward do not lead to the same behavior anymore. To adapt this repertoire, the algorithm learns a Gaussian process from the execution of the elementary policies to “move” the policies in the repertoire to their “location” (expected final position) on the real robot. To choose the next policy, RTE uses Monte Carlo Tree Search (MCTS) so that it can exploit the uncertainty predictions of the GP when planning a sequence of elementary policy.
Using a repertoire of pre-learned policies assumes that the repertoire contains policies that will work in the current situation (e.g., with a damaged robot): since the repertoires are learned without anticipating situations, it is possible that no policy work (although experiments show that a single repertoire allow to adapt to surprisingly many situations [cully_robots_2015]). A way to relax this assumption is to provide many repertoires (several dozens) and make the algorithm choose the most likely one according to the observations. This approach was recently proposed for Bayesian optimization with many prior repertoires [pautrat2018bayesian], but only for episodic learning. In that case, the repertoires contain many ways of achieving a single task (forward walking); for non-episodic learning and planning [chatzilygeroudis2018reset], we need to use repertoires that contain many different objectives (e.g., walking in each direction).
Compared to neural networks, Gaussian processes can easily include prior knowledge about the function[rasmussen2006gaussian]. In particular, we can provide a prior mean function to the GP model which is our prior belief about the prediction when no data is available to train the model. In Bayesian optimization community, there are many recent works that use non-constant priors coming from simulation to model the cost function using GP [pautrat2018bayesian, cully_robots_2015]. Instead of learning the system model from scratch, many recent works also used priors from simulation to learn a “residual model” with GP, i.e, the difference between the simulated and real robot. For example, model-based policy search algorithm like PILCO [deisenroth2011pilco] or Black-DROPS [chatzilygeroudis2017black] can be combined with simulated priors and learn to control a cart-pole in 2 to 5 trials [cutler_efficient_2015, Saveriano2017DataefficientCP, chatzilygeroudis2018using].
On the one hand, these contributions prove that using well-chosen priors with GPs is a promising approach for data-efficient learning, however, on the other hand all previous algorithms assume that we know the “correct” prior in advance. This is a very strong and crucial assumption as a misleading prior can substantially increase interaction time needed to learn to control the system. In this paper, we relax this assumption and argue that using multiple priors for a subset of possible set of situations and allowing the algorithm to choose the best one for modeling and planning improves online learning and adaption for robotics.
We consider a robot that (1) knows its environment, (2) knows its current state (e.g., its Cartesian position), and (3) has access to one or several prior models of its dynamics (simulator(s)). Our objective is to reach an goal state from a starting state when the dynamics of the robot does not perfectly match the one of the prior model(s); this mismatch can originate from the reality gap, from a mechanical damage, from a new floor type, from an interaction with a novel object, etc.
To reach the goal state, the robot executes a sequence of discrete elementary policies from a repertoire. Each elementary policy allows the robot to transition from state to state according to a transitions probability , where is the policy selected at time-step . After each transition, the robot can observe its new state and update the transition probabilities for the selected policy and, potentially, for other similar policies. Here we consider several priors, that is, several repertoires of elementary policies for various situations that the robot might face. Each of these policies is associated to a transition probability. Our problem is therefore fully specified by a set of repertoires of policies
, a set of probability distributions for each policy of each repertoire, an initial stateand an objective state . The best sequence of elementary policies is the one that minimizes the number of state transitions to reach the goal state on the real robot.
Note that our objective is to select the best prior, but we do not assume that one of the priors perfectly matches the actual situation: we are interested in cases in which even the best prior will require some adaptation. Our main idea is that the right prior will make adaptation easier.
APROL is based on 3 main stages: (1) generating repertoires (priors) in simulation for various situations (2) using the repertoires and observations from the real robot to learn and update the transition models (3) given a goal, planning the next elementary policy to be applied on the robot by picking the best elementary policies from the available repertoires. Compared to previous work about reset-free repertoire-based adaptation [chatzilygeroudis2018reset], the main novelty is how to use several repertoires in the planning algorithm. Compared to previous work about Bayesian optimization with priors [pautrat2018bayesian], we use a different strategy to choose the repertoire and do not need any reset.
We assume that the robot is controlled by a low-level elementary policy parameterized by
and that any point on the task-space (or goal-space) can be described by a vector. Additionally, we assume that a set of probable situations for the robot is available. Then, for each situation, a repertoire of elementary policies and their corresponding transitions are generated in simulation, such that the task-space is covered as well as possible [cully_robots_2015, cully_evolving_2015, Duarte2018EvolutionOR]. Assuming Gaussian probability distribution for the transitions, can be expressed in terms of mean and a diagonal covariance . Thus, a repertoire is a set of tuples . Optionally, considering a deterministic simulator, can be set zero. Additionally, fixing the starting state of the robot in the simulation, will be constant for all the tuples. These tuples from each of the repertoires become priors (or primitive transition dynamics) which can be updated from the observations collected during the deployment of the robot.
To generate these repertoires, we use an iterative algorithm called “MAP-Elites” [cully_robots_2015, mouret_illuminating_2015, vassiliades2017using]. MAP-Elites discretizes the task-space into some regions or cells. At the beginning, MAP-Elites randomly initializes some policies and test them in simulation to find out their transitions and performance. Then, they are placed in corresponding cells in the repertoire. After that, MAP-Elites iteratively picks a policy from any of the occupied cell, adds random variation to it, evaluates it in the simulation and places this new policy in the corresponding cell. Each cell can contain only one policy, the one with higher performance value. One thing to be noted here that although MAP-Elites is computationally expensive, it can be parallelized on large clusters to compute the repertoires before deployment of the robot (see Suppl. Mat. for details).
Since the policies in the repertoires come from simulator, how they change the state (the transitions) is an approximation of the reality. Moreover, if the real situation of the robot (e.g, different floor condition, novel object to interact with, mechanical damage etc.) is different from that of the repertoires, then the initial transitions probabilities will not align with the real system.
For a policy , the transition dynamics is given by for the state (assuming deterministic simulator). Suppose, produces a task-space transition to on the real robot from the state . Now, we can learn this transition dynamics using the transition as a prior for state and policy . More concretely, we learn a mapping where input is and the target is . We can update this model every time we collect more observation from the real robot during deployment.
To learn this model, we use Gaussian process (GP) regression. A GP is an extension of multivariate Gaussian distribution to an infinite-dimension stochastic process for which any finite dimensions will be a Gaussian distribution[rasmussen2006gaussian]. For each prediction dimension , it is a distribution over functions, specified by mean function and covariance function :
Let is the set of observations, is the “prior” mean from the simulations (i.e the repertoires) and is the prior noise, then the GP is computed as follows:
Once GP models are initialized, the robot is deployed in the environment. Given the task, the robot has to plan sequentially the next elementary policy to solve the task. We assume that the main task/goal of the robot is sub-divided into a sequence of goals in the task-space by a task planner. Then we can frame the next policy selection problem as a maximum a posteriori (MAP) estimation problem of action, given the current sub-goal , the past observations and the repertoires . Let, be any elementary policy and be the probability of the repertoire to match the actual situation, given the past observations. Then, the next elementary policy is given by
Ignoring the denominator,
Equation 6 gives the MAP estimation of the next elementary policy from the repertoires to be applied on the robot to achieve the current sub-goal in one-step.
Now, is the prior belief over the policies. It can be set equal for all the policies in the repertoires. However, setting higher probability for the ones that have transition in the neighborhood of the desired transition and setting zero for others will improve the computation time.
is the likelihood of the transition to given the repertoire , observations and the elementary policy
. This can be computed using the mean and variance prediction of the GP transition model learned usingwith the repertoire as mean-function.
represents the likelihood of a repertoire being able to represent the reality for the robot. We define a closeness score that represents how close the mappings of the repertoire are compared to real world observations.
where, is the real transition on the robot after applying a policy from the repertoire and is the corresponding transition in the repertoire. Now, for a real robot, can be stochastic for a given policy. Moreover, for different policies from the same repertoire can be different. This makes stochastic in nature. Thus, the overall score of the repertoire can be defined as the expectation of . However, to compute a good estimate of the true expectation will require several observations from all the repertoires, which will make the adaptation process slow. Hence, it becomes a problem of exploration vs exploitation. To deal with this, we borrow the concept of Upper Confidence Bound (UCB) from multi-armed bandits problem formulation [sutton1998reinforcement]. Instead of estimating the expectation by taking the mean of the scores, we compute the UCB as follows:
Where, is the total number policies tried on the robot, is the number of times the policies were used from the repertoire and is a positive constant. Normalizing these UCB scores will give higher probability value to those repertoires which have higher “mean score” and to those repertoires that are not tried enough compared to others on the real robot:
Combining everything, at every time-step, optimizing the equation 6 gives the optimal policy to be used for the given sub-task. Since our policy space is discrete and equation 6 is fast to evaluate (it does not involve the simulator), we can simply evaluate all the elementary policies from all the repertoires to find out the optimal according to equation 6.
We evaluate APROL on two simulated tasks: (1) object pushing task with a 7-DOF arm and (2) goal reaching task with a damaged hexapod. Additionally, we demonstrate the capability of APROL on a damaged hexapod robot that has to reach target positions as quickly as possible. A video of the experiments are available online111Video: http://tiny.cc/aprol_video.
The goal here is to push objects of various shapes and sizes to different goal locations in minimum number of steps. In this task, we assume that the robot has access to its model (so that it can be controlled in Cartesian space) and to the center and orientation of the object from a vision system (for instance, there is a QR code sticked on the object). However, the robot does not have any knowledge about the shape and size of the objects. The objective is to adapt to push objects of unknown shapes and guide them to the target position.
Elementary policy: We encode the elementary policy (open loop controller) of the robot with 2 parameters in . These two parameters specify a straight line connecting two points around the center of mass of the object taking into account the orientation of the object. For given control parameters, the robot’s end effector follows the line specified by the parameters in one time-step (2 seconds).
Policy-repertoires: we pre-generated policy repertoires for 7 different objects (see Suppl. Mat.) using the MAP-elites algorithm in simulation. Since the goal of the task is to reach different positions on the 2D surface, therefore, the task-space is the 2D coordinates on the plane. In the repertoires, every policy corresponds to the transition probability of the objects on this plane. Note that we exclude the exact repertoire that matches with the object in all the experiments except for CP (very close prior) variants.
Execution: Given a goal and the current state of the robot, at every control-step (2 seconds) of the robot, robot uses the A* algorithm to plan a shortest sequence of sub-goals in the task space, then it attempts to achieve the first sub-goal using APROL. After each execution of an elementary policy, the robot updates its model and re-plans using A*.
We evaluated different approaches with 40 replicates, randomly varying the initial orientation of the objects and randomly picking the priors for the single prior (SP) variants. Fig. 2 shows that APROL performs as good as that of using a very close prior (CP-L variant) to the reality (i.e the object) of the task for adaptation. Here very close prior means the priors that are very close to the shape and size of the real object. APROL outperforms the variant that uses multiple priors but without any learning (APROL-NL variant), which shows the importance of the online adaptation phase in APROL. In both the experiments, APROL beats the single prior variants with and without learning the transition dynamics(SP-L, SP-NL).
This task is performed both in simulation and on a real hexapod robot. In this task, the robot might encounter various situations, such as, damage to one or more legs (e.g, blocked joints or a lost leg) and various friction conditions of the floor (e.g., very low, moderate and very high friction co-efficients). The goal here is to reach the specified position in minimum number of steps. Here, the robot has the knowledge of its position and orientation (e.g., from SLAM or visual odometry system). Additionally, we assume that the robot has the complete knowledge of the obstacle positions as well as dimensions. However, the robot does not have any knowledge about the damage to its legs and floor friction condition.
The robot has 6 identical legs, each of which has 3 degrees of freedom (DOF). The first DOF () controls the horizontal movement of the leg and the seconds and the third DOFs () control the elevation of the leg. is the negative of to make the final segment of the leg parallel to the body. Therefore, there are independent joints in the robot. Each of these joints are controlled with 3 parameters: the amplitude, the phase, and the duty-cycle. These parameters define the elementary policy for the robot (see [cully2015robots] for details).
Policy repertoires: Before deployment, policy repertoires for various situations are generated for the robot using MAP-elites in simulation. Here, situations can be floor friction coefficient and single or double leg block (see Suppl. Mat.). Each repertoire contains discrete mappings from 36D policy to the transition probability on 2D surface.
Execution: At every control-step (3 seconds), the robot uses the A* planning algorithm to plan a sequence of elementary policies. Then it tries to reach the first sub-goal using using APROL. The process continues until the robot reaches the goal state. After each execution of an elementary policy, the robot updates its model and re-plans using A*.
In the simulated hexapod goal reaching task, we evaluated each of the variants with 40 replicates. Fig. 3 shows that APROL performs at least as good as that of using a very close prior (i.e CP-L variant) to the reality (i.e the exact leg damage and very similar floor friction). APROL outperforms the variant that uses multiple priors but without any learning (APROL-NL variant). Here also, it shows the importance of the learning phase in APROL. Additionally, APROL beats the single prior variants with and without learning the transition dynamics(SP-L, SP-NL). Note that APROL did not have the exact prior in its repertoires while conducting the experiments.
Additionally, we demonstrate the capability of APROL in a real hexapod damage recovery and goal reaching task (Fig 4). This is a challenging task, since the exact prior repertoire gives high reality gap on the real robot. We show that, with APROL, the robot learns the compensatory policies quickly to reach the goal by avoiding the obstacle in the path.
Prior knowledge is key for rapid adaptation, may it be in repertoire-based learning, meta-learning, or model-based policy search. By allowing to select the best prior among many, we relax the assumption that a single prior can capture all the situations. Here we showed that this strategy, combined with planning and repertoires, leads to a highly data-efficient adaptation algorithm that allows robots to adapt to new objects or unexpected damage. Compared to model-based reinforcement learning [deisenroth_gaussian_2015, chatzilygeroudis2017black], this repertoire-based algorithm is fast because it simply runs A* in 2D between each elementary policy, instead of searching for a policy (which can take up to 30 minutes in algorithms like PILCO). At any rate, a similar strategy to select priors could be useful in meta-learning or in model-based reinforcement learning.
We use an iterative evolutionary algorithm called Multi-dimensional Archive of Phenotypic Elites (MAP-Elites)[mouret_illuminating_2015, cully2015robots, vassiliades2017using] to generate the policy repertoires. MAP-Elites discretizes the task-space into some equal cells, where is a user defined parameter. For both the hexapod experiment and object pushing experiment the task-space is the 2D surface (i.e x and y co-ordinates) since both of them are goal (i.e the x,y co-ordinate) reaching task. Once the task space is discretized, MAP-Elites randomly initializes policies and evaluate them in the simulator of the robot for their corresponding task-space transition probability and performance. Here performance is an user defined function using which some constraints can be imposed on the behavior of the robot. For example, we can compensate the policy based on the joint torques it caused on the robot. After the evaluation, these policies as well as their performances are placed in the respective cells according to the respective task-space transition probability on the simulated robot. Since our simulator is deterministic, this transition probability can be given by only mean , where is the policy and is equal to the task-space transition . After this initialization, MAP-elites perform the following three steps iteratively until the maximum number of valuations are reached:
Randomly selects one of the occupied cells and adds random variation to the policy parameters.
Simulates the policy to get the task-space transition probability and performance.
Inserts the new policy into the corresponding cell of the repertoire if it ends up in an empty cell or performs better than the existing controller (discard the existing policy in the cell)
Although MAP-Elites is computationally expensive, it can be parallelized on large clusters to compute the repertoires before deployment of the robot. We generate such repertoires for various situations that the robot might face. For example, for the hexapod damage recovery and goal reaching task, we generate repertoires for various combination of fiction co-efficients and leg damages (single and two leg damages). Out of possible combinations, we selected combinations to generate the repertoires for the hexapod. Similarly, for the object pushing task we generated repertoires for 7 different objects (Fig. 5). Note that while conducting the experiments, we do not use the exact prior that matches with the real situation.
For the object pushing task, we did not use any performance score for the policies. Therefore, MAP-Elites simply replaces the old policy in the cell if the new policy belongs to that cell. However, for the hexapod, we want the robot to face the direction towards which it is moving. Therefore, we give a score which is equal to negative of the difference between robots body angle and the direction toward which it moves. Additionally, set the parameters for the damaged legs zero while evolving the policies in simulation through MAP-Elites. Alternatively, we could also compensate the policies not to control the damaged legs by giving a score equal to the negative of maximum joint displacement of the damaged legs.
For the arm, MAP-Elites did 300000 policy evaluations and for the hexapod 500000 policy evaluations in the simulator for each of the repertoires. Thanks to the cluster of computers, several repertoires could be generated in parallel in a few hours.
For both the tasks, we used python with pybullet physics simulation library [coumans2013bullet]. For comparison with RTE [chatzilygeroudis2018reset] in the hexapod damage recovery task we used author provided code222https://github.com/resibots/chatzilygeroudis_2018_rte. For Gaussian process regression we used gpy library [gpy2014].
In both the experiment, we used Gaussian process (GP) with squared exponential kernel given by:
We did not optimize the hyperparameters of the GP. For both the tasks, we setand .
For both the tasks, we assume that transition dynamics in the task space does not vary depending upon the position of the object or the hexapod. Which is true for our specific scenarios unless the hexapod collides with an obstacle or the object falls from the table. Therefore, instead of using as input to the GP, we only give as input. The output of the GP is relative change in state in the task space, which is the relative 2D co-ordinate position of the hexapod as well as for the objects.
For the object pushing task, we encode the elementary policy of the robot with parameters each of which are in the range . Considering the orientation of the object, these two parameters specify a straight line connecting two points on a circle surrounding the center of mass of the object. Every time the policy is set on the robot, the trajectory of the end effector is computed and followed by the robot. The duration of execution of each policy is 2 seconds. In 2 seconds, the robot completes the whole trajectory computed from the parameters. Note here that since the robot use inverse kinematics to compute the joint angles to follow the trajectory and since we do not set any constraint on the angle of the end effector, the evolved policy does not give exact the intended behavior even if the repertoire matches the real object.
For the Hexapod, the policy contains parameter in the range . This consists of 3 parameters for each of the joints (total 12 independent joints). These 3 parameters are for amplitude, phase and duty-cycle of the joint. Once these 36 parameters are set on the robot, it computes the joint trajectories and executes it for 3 seconds. We use the same controller described in [cully2015robots].