Map-based Multi-Policy Reinforcement Learning: Enhancing Adaptability of Robots by Deep Reinforcement Learning

10/17/2017 ∙ by Ayaka Kume, et al. ∙ Preferred Infrastructure 0

In order for robots to perform mission-critical tasks, it is essential that they are able to quickly adapt to changes in their environment as well as to injuries and or other bodily changes. Deep reinforcement learning has been shown to be successful in training robot control policies for operation in complex environments. However, existing methods typically employ only a single policy. This can limit the adaptability since a large environmental modification might require a completely different behavior compared to the learning environment. To solve this problem, we propose Map-based Multi-Policy Reinforcement Learning (MMPRL), which aims to search and store multiple policies that encode different behavioral features while maximizing the expected reward in advance of the environment change. Thanks to these policies, which are stored into a multi-dimensional discrete map according to its behavioral feature, adaptation can be performed within reasonable time without retraining the robot. An appropriate pre-trained policy from the map can be recalled using Bayesian optimization. Our experiments show that MMPRL enables robots to quickly adapt to large changes without requiring any prior knowledge on the type of injuries that could occur. A highlight of the learned behaviors can be found here: .



There are no comments yet.


page 1

page 4

page 5

page 6

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Humans and animals are well-versed in quickly adapting to changes in not only their surrounding environments, but also to changes to their own body, through previous experiences and information from their senses. Some example scenarios where such adaptation to environment changes takes place are walking in a highly crowded scene with a lot of other people and objects, walking on uneven terrain, or walking against a strong wind. On the other hand, examples of bodily changes could be wounds, incapability to use certain body parts due to task constraints, or when lifting or holding something heavy. In a future where robots are omnipresent and used in mission critical tasks, robots are not only expected to adapt to unfamiliar scenarios and disturbances autonomously, but also to recover from adversaries in order to continue and complete their tasks successfully. Furthermore, taking a long time to recover or adapt may result in mission failure, while external help might not be available or even desirable, for example in search-and-rescue missions. Therefore, robots need to be able to adapt to changes in both the environment and their own body state, within a limited amount of time.

Recently, deep reinforcement learning (DRL) has been shown to be successful in complex environments with both high-dimensional action and state spaces [1, 2]. The success of these studies relies on a large number of samples in the orders of millions, so re-training the policy after the environment change is unrealistic. Some methods avoid re-training by increasing the robustness of an acquired policy and thus increasing adaptability. In robust adversarial RL, for example, an agent is trained to operate in the presence of a destabilizing adversary that applies disturbance forces to the system [3]. However, using only a single policy limits the adaptability of the robot to large modifications which requires completely different behaviors compared to its learning environment.

Fig. 1: Time lapse of the OpenAI Walker2D model walking for 360 time steps using a policy and succeeding while intact (top), failing due to a joint being limited (middle), and succeeding again post-adaptation despite the limited joint marked in red by selecting an appropriate policy using our proposed method (bottom).

We propose Map-based Multi-Policy Reinforcement Learning (MMPRL), which trains many different policies by combining DRL and the idea of using a behavior-performance map [4]. MMPRL aims to search and store multiple possible policies which have different behavioral features while maximizing the expected reward in advance in order to adapt to the unknown environment change. For example, there are various ways for multi-legged robots to move forward: walking, jumping, running, side-walking, etc. In this example, only the fastest policy would survive when using ordinary RL, whereas MMPRL saves all of them as long as they have different behavioral features. These policies are stored into a multi-dimensional discrete map according to its behavioral feature. As a result, adaptation can be done within reasonable time without re-training the robot, but just by searching an appropriate pre-trained policy from the map using an efficient method like Bayesian optimization, see Figure 1. We show that, using MMPRL, robots are able to quickly adapt to large changes with little knowledge about what kind of accidents will happen.

The rest of this paper is organized as follows. Related work is described in Section II, while Section III explains our proposed method. Section IV outlines our experiment setup and evaluation setting, with results presented in Section V. Section VI describes our future work and conclusion.

Ii Related Work

Ii-a Self-recovering Robots

A variety of methods have been employed in existing work on self-recovering robots. Most of this work has focused on minimizing the time needed to adapt. An intelligent trial-and-error method (IT&E) which quickly adapts to a large change in the robot state such as an unexpected leg injury has been proposed in [4] and [5]. A stochastic derivative-free method is used to populate a map of behaviors, from which a policy is selected at the time of damage. However since this method uses predetermined periodic patterns, it cannot change its gait according to exteroceptive sensor readings of the environment. Bongard et al. [6] dealt with damage recovery by continuously comparing an updated simulation of the robot with a predetermined undamaged self-model in order to track changes and damages to the body. Following this work, Koos et al. [7] also used a self-model. The main difference is that this work uses the undamaged self-model of the robot to discover new behaviors, instead of continuously updating it. This reduces the complexity of the problem since it is not attempted to diagnose damages, making it faster to adapt. However these works also do not take considerable environmental changes into account.

Yet another approach was proposed in [8], which focuses on damage recovery for legged robots implemented with multiple central pattern generator (CPG) controllers. The CPG controllers are synchronized by default, until a leg is damaged. A learning algorithm is then employed to learn the remaining legs’ oscillation frequencies to resynchronize them, enabling the robot to continue to walk. However, this work does not seem to focus on adapting quickly.

Ii-B Improving Robustness in Deep Reinforcement Learning

Deep reinforcement learning (DRL) has recently gained much attention and its range of applications has extended to the fields of game playing [2, 9], robot control [1, 10, 11], natural language [12], neural architecture search [13] etc. For more details, we kindly refer the reader to the survey [14]. One of the important problem settings in deep reinforcement learning is domain adaptation: training an agent to adapt to a new environment different from its training environment within a short amount of time (e.g., knowledge transfer from simulation to a real setting, compensating for physical parameter changes, grabbing unknown objects, etc.).

Various approaches exist to tackle this problem, such as estimating system parameters in the new environment online 

[15, 16], training a prediction model with a few examples and using it to change the policy [17, 18], source domain randomization during training to improve robustness [19, 20], adversarial training [3, 21], and introducing modularity or hierarchy [22] to encourage the reuse of submodules corresponding to unchanged parts in the environment.

Ii-C Neuroevolution

Another area relevant to our research is neuroevolution, which is a technique to optimize neural networks with genetic methods, and has been studied extensively

[23, 24, 25].

Increasing the size of the networks in these methods has been challenging, because the search process relies on random perturbations on these parameters, making it vulnerable to the curse of dimensionality. Recently, researchers have applied neuroevolution to deep neural networks consisting of many parameters. For instance, Miikkulainen

et al.[26]

used genetic methods to search layer connections in combination with supervised learning to weight optimization, while Alvernaz

et al.[27] have reduced the number of dimensions of a visual input by using an auto-encoder and applied genetic methods on compressed hidden states. Another remarkable work has been done by Salimans et [28], in which they propose an evolutionary strategy while getting results comparable to state-of-the-art deep reinforcement learning methods with the same network architecture, though requiring several times the number of samples for complex environments.

Iii Proposed method

We propose MMPRL, a method which combines intelligent trial-and-error (IT&E) [4] with deep reinforcement learning (DRL) to make a robust system that deals with bodily and environmental changes within a short amount of time. Moreover, we improve the sample efficiency in the IT&E algorithm by changing its search method during the map creation phase. Specifically, we replace the random mutation step in IT&E with an update by DRL. This raises the likelihood to mutate in the correct direction, which in consequence allows us to learn larger networks. The result is a DRL method that is capable of adapting to both environmental and bodily changes.

We have chosen Deep Deterministic Policy Gradient (DDPG) [1] as the DRL method, but other methods can also be used. MMPRL trains thousands of different policies and searches for the appropriate policy among these to adapt to new situations within only a few iterations. Unlike previous methods, which aim to train a single strong policy, each policy can be trained with a simple network architecture and learning rule, instead of more sophisticated methods such as RNN or hierarchical RL. The following subsections will briefly discuss the methods our work is based on.

Iii-a Deep Deterministic Policy Gradient (DDPG)


be a Markov decision process with state

, (continuous) action

, transition probability

, reward function , discount factor , and initial state distribution . RL typically learns a policy to maximize the expected discounted accumulated reward from the initial state, where . DDPG [1] is a DRL method to deal with multi-dimensional continuous action spaces. This algorithm learns not only a policy (actor), but also learns the state-action value function (critic). The critic is learned as in Q-learning, by minimizing the temporal difference error derived from the Bellman equation [29]. But calculating the maximum of the value function is computationally expensive, so it is replaced by the policy function output :


where is the one-step transition (state, action, next state, reward) taken from the agent’s experience. The actor is updated as shown in  Equation 2, which steers the output in the direction of the gradient to maximize the output of the critic.


Like in Deep Q-learning (DQN) [30], a replay buffer is used to sample a minibatch to minimize correlations between samples. The minibatch is then used to update both the actor and critic.

Iii-B Intelligent Trial and Error (IT&E)

IT&E is an algorithm proposed by Cully  et al. [4], which is based on evolutionary strategies, to quickly adapt to abnormalities. This method consists of two phases: the map creation phase (MAP-Elites algorithm) and the adaptation phase (M-BOA algorithm). In the map creation phase, many policies are stored in a high dimensional map which represents features of a specific task. When an unexpected situation occurs, the default policy might not work any longer. In that case, Bayesian optimization [31] is used to search the map for a policy more suited to the new situation.

Iii-B1 Map creation phase

The map used in this method is multidimensional, and at most one policy and its performance is stored at each coordinate. Each coordinate can be accessed through a behavioral descriptor, which describes the general characteristics of various possible policies and is designed by the user. This means that policies with coordinates close to each other, also have a similar behavior. In the initialization step policies are generated randomly, for which the performance and behavioral descriptor is evaluated. The behavioral descriptor is then used to store the generated policy in the map, or to replace another less performing one if the coordinate is already occupied.

Once the initialization step is finished, the algorithm will update the policies similar to population based methods such as evolutionary strategies. This way, a policy is able to mutate such that its behavioral descriptor transforms, which can then again be stored in a new location in the map. We kindly refer the reader to [4] for more details.

Iii-B2 Adaptation phase

In the adaptation phase, the created behavior-performance map is explored to find a policy that suits the current situation using Bayesian optimization. During this phase, performance of the robot is repeatedly observed and used to re-evaluate the performance of the stored policies. After this update, the algorithm will continue to search for a new policy until one is found that works in the new situation.

Gaussian Processes are used to re-evaluate the performance of the policies stored in the map , after a change has occurred. A Matérn kernel was used as the kernel function . Given observations , where is the selected coordinate of the map at the iteration and is an observed performance with policy which is stored at , the estimation of performance at

is a Gaussian distribution

, where


is an user defined parameter that model the observation noise.

The next observation is selected by taking the maximum of the upper confidence bound:


Once again, we refer the reader to [4] for more detailed information on the entire adaptation phase.

Iii-C Map-based Multi-Policy Reinforcement Learning

It is well known that in DRL algorithms, including DDPG, performance usually depends on randomness in the environment, the exploration and furthermore the initialization of the weights, as shown in [32]. This causes the results to vary, which is usually not desirable. However, this also means that whenever DDPG is unstable, a new policy is born with a different behavior. In our case, this can be utilized to generate policies with very different behaviors, which can then be stored in a map as done in IT&E.

Like IT&E, our method has a map creation phase and an adaptation phase. Time is abundant before deployment of the robot, so we choose to perform the map creation phase during this time to store as many policies as possible, while the adaptation phase will start when needed during task execution. Note that our work does not actually detect when the robot should transit to the adaptation phase from its normal phase, meaning that we do not detect the change itself to which the robot needs to adapt. We believe that this can be easily done using various existing methods, but we consider this to be out of our scope.

For our adaptation phase we use M-BOA, which is the same as in the original IT&E algorithm. However our map creation phase is a modified version of the original MAP-Elites algorithm. In the map creation phase of IT&E, new behaviors are generated by random perturbation of existing behaviors, so this method is only effective in low-dimensional parameter spaces [4]. In our map creation phase, we replace the random perturbation part by an update of DDPG. By making use of DDPG and its instability, we can generate new policies despite of using high-dimensional parameter spaces. We use multiple DDPG agents configured with different initial values, to stimulate the generation of policies with varying behaviors and to parallelize the system. Furthermore, each agent uses its own replay buffer at all times. The result is increased stability of the total system, despite the high variation in the learning result of each agent.

Algorithm 1 shows the outline of the algorithm for one agent in the map creation phase. Each agent updates the actor and critic with DDPG until its iteration reaches according to Equation 1 and Equation 2 as described in Section III-A. For each iteration, we measure the performance of the policies and update the behavior-performance map similar to IT&E. Both the actor and critic used in the iteration are stored in the map. After iterations of the algorithm, we randomly pick a stored pair of policy and critic every once in freq iterations from the map.

Initialize a behavior-performance map.
Initialize policy , critic , replay buffer .
for  to  do
     if  then
     if  then
Algorithm 1 MMPRL (single agent)

Iv Experiment Setup

To evaluate MMPRL, we conduct experiments using a simulated environment in OpenAI Gym [33] in combination with the MuJoCo 1.50 [34]

physics engine. As deep learning framework we use Chainer 

[35]. All our experiments were run on a machine equipped with 128 GB RAM, an Intel Xeon E5-2523v3 CPU, and a Maxwell GeForce GTX Titan X.

Iv-a Robot Models

The models we use in simulations are the hexapod robot acquired via [36], and the Walker2D from OpenAI Gym, see Figure 2.

Iv-A1 Hexapod

Each leg of the hexapod has three actuators. The height of the robot is in the neutral position. Its goal is to move forward in the world, which in our case is along the x-axis. Furthermore, we use target joint angle positions of all joints as action, each of which ranges from   to   .

For the agent observations, we use a

-dimensional vector which includes the current height of the robot (1), orientation of the robot in quaternions (4), joint angle positions of all joints in each leg (18), booleans for each leg whether it is making contact with the ground (6), and the relative height of 12 points in space, see 

Figure 2, which form a grid below the robot (12).

The time step of the hexapod simulation is and an action is selected every time steps. We limit an episode to be at most steps and the episode will end whenever the robot falls down on its legs or jumps above a certain height.

The reward function is defined as follows.

where is the covered distance of the robot in the current time step since the previous time step, is the survival reward, which is on survival and if the episode is terminated by the aforementioned conditions, is the number of legs making contact with the ground, is the vector of squared sum of external forces and torques on each joint, are the target joint angles (the actions), and is the weight of each component with , , and . The values of these weights remain the same throughout all of our experiments.

We use a 6-dimensional map to store the policies, of which the performance is evaluated by the total forward distance in time steps. Furthermore, we define the behavioral descriptor corresponding to this map as , where represents the fraction of the stance time of leg during one episode.














Fig. 2: Models used in our experiments: hexapod robot (left), where the numbers represent the leg index and the arrow depicts its forward direction. In some experiments we refer to the toe of the robot, which is marked in red here for leg 3. The red dots underneath the hexapod represent the grid from which relative height is measured for observation; Walker2D (right) with its head marked in yellow (also used in some of our experiments) and the joints are marked by the blue dots.

Iv-A2 Walker2D

The Walker2D model has two legs and each leg also contains three joints, see Figure 2. Again, we use a 6-dimensional map to store policies and performance is evaluated in the same fashion using the total forward distance in time steps. However, we define a different behavioral descriptor for the Walker2D:

Where . and are the angles of joint and respectively in time step . Each entry in the descriptor is quantized uniformly to values between the min and max value of the entry.

For more detailed information on the action, observation, and reward function, we refer the reader to OpenAI Gym.

Iv-B Evaluation Settings of Environment and Robots

Both agents are trained with constant settings, while the agents are tested in various environments and conditions in the adaptation phase. We remind the reader that we do not actually detect when a change has occured, and thus when to initiate the adaptation phase. To still test the adaptation performance we start the simulation with the changes already applied, to initiate the adaptation phase immediately.

Iv-B1 Hexapod

For the training phase, we trained the hexapod undamaged on the random stairs as shown in Figure 3. For the first meter, no obstacles are included in the environment. After the first meter, some steps are placed as obstacles with random height  m, width (y direction)  m, depth (x direction)  m and location. Note that the max possible height is of the robot height in its neutral position.

We tested the adaptation performance by changing the situation, where we either (i) let the robot walk on a flat plane after we replace either one or two toes with links of , (ii) keep the robot intact and the plane flat, but introduce an observation delay on purpose, or (iii) make the robot climb stairs with step heights different from the training phase.

In situation (ii) we delay the observation by time steps such that the observation at time step becomes the one at . For situation (iii) the robot is undamaged and each step size of the stairs is chosen as . An example of such a situation is shown in Figure 3 where we sampled the step height with .

Fig. 3: Obstacles used during the (a) training phase of our hexapod experiments, and (b) adaptation phase in the climbing stairs experiment.

Iv-B2 Walker2D

We trained the intact Walker2D on the same environment as provided by OpenAI. For the adaptation experiment, we tested the agent’s performance under the following conditions, where we (i) limit the control range of one of the joints from to , (ii) change the head radius to where , where is the original head radius, and (iii) simulate walking against a slope of degrees by changing the magnitude and direction of the simulated gravity .

Iv-C Hyperparameters

We note that the values of the following hyperparameters are found by trial and error during our experiments. For the hexapod, we use a multilayer perceptron (MLP) with three hidden layers (

, , ) for the actor network. We map the action and observation to a linear layer with 100 units (action) and 300 units (observation) for the critic network. These layers in the critic network are concatenated and connected afterwards to an MLP with two hidden layers (, ).

For the Walker2D we use an MLP with three hidden layers with (, , ) units for the actor, and for the critic a linear layer with units for the action and units for the observation. The layers in the critic network are concatenated and connected to an MLP, but now with (, ) units.

For all networks in both agents, ReLU is used as activation function in the hidden layers, while a hyperbolic tangent is used for the final layer. As optimizer, we use Adam 

[37] with . Moreover, we use a discount factor of , a soft target update rate of , and a replay buffer with a size of for DDPG. During the DDPG training phase, for the first episodes we add zero-mean Gaussian noise to the actions with

of the control range as standard deviation. As for the next

episodes we reduce the standard deviation to of the control range. Finally, we further reduce the standard deviation to of the control range for the remaining episodes.

For every time steps, we update the parameters for tuples in the replay buffer with batch size , after which the soft target policy and critic is also updated. The transitions are selected randomly, but we ensure that at least of the transitions are from the newest episode.

For the map creation phase, we use eight DDPG agents in parallel, which update the same map synchronously. Four of the agents use , while the remaining four agents have set to . As described in Section III-C, the agents start selecting random policies from the map to update when they reach iterations. After the map updates times for the hexapod and times for the Walker2D, we forcefully stop the map creation phase because the number of the policies in the map converges. For Bayesian optimization, we use parameters , the termination condition’s hyper parameter , the hyper parameter for kernel function , and .

Iv-D Baseline Comparison

We evaluate MMPRL on two aspects: its map-creation ability and adaptability.

Iv-D1 Map-creation

For evaluating the map-creation ability, we compare MMPRL to the default MAP-Elites algorithm [4]. More specifically, the speed with which both algorithms generate and store various policies in the map are compared to each other. Moreover, the quality of the stored policies are compared, where quality is defined in terms of covered distance. Furthermore, we choose the Walker2D as the agent for comparison because the policy network of the hexapod is too high-dimensional (although the network for Walker2D is still high-dimensional, but less), for which MAP-Elites is not suitable. The policy generator used in MAP-Elites uses the same MLP as chosen for the actor network in MMPRL (see  Section IV-C).

As for the settings of MAP-Elites, because the performance can differ even if the same policy is used, we use the same policy for 10 episodes and update the map in every episode. During the random sampling stage, each parameter is randomly sampled between [-5, 5]. The decision to use this range specifically was based on the range of network parameters of well learned DDPG policies. After the first 4000 iterations, a policy is picked from the map after which each variable is perturbed with Gaussian noise .

Iv-D2 Adaptability

To evaluate the adaptability of our method, we compare MMPRL policies before and after adaptation to single-policy DDPG (without map creation) by measuring the covered distance in different situations. The DDPG policies are created by running episodes for the hexapod and episodes for Walker2D. For each model, we run eight agents with different random seeds. The actor, critic, and hyper parameters are identical to what we use in MMPRL for DDPG agents. However, we now select the policy which accumulates the most rewards as the single best policy, rather than the one found at the end of training.

V Results

V-a Map Creation Phase

It took about two weeks to create a map with MMPRL for the hexapod and nine days for the Walker2D.

Figure 4 shows the results of the map creation phase of MMPRL compared with MAP-Elites for the Walker2D experiment. MMPRL stored policies, which is of the whole map. The average performance of the map is and the standard deviation is , and the best performing policy covers in distance. This shows that our proposed method outperforms MAP-Elites in the number of policies, max and average covered distance. The policies contain parameters, which is about times more than in [4]. As mentioned in [4] and Section II-C, MAP-Elites and neuroevolutional methods in general do not work well with a high number of parameters such as in our case.

The map generated by MMPRL for the hexapod contains stored policies, which is of the whole map. The average performance is and the standard deviation is , while the best coverage was .

Note that the high variances are due to the fact that we not only store the optimal policy, but many policies which display highly different behaviors. These policies may not be optimal in the default case, but might perform better when a change in situation occurs.

Fig. 4: Experiment results of MMPRL and MAP-Elites for the Walker2D during the map creation phase, showing the occupancy ratio and performance as a function of total number of map updates. The shaded area shows the 25 and 75 percentiles of the stored policies’ performance.

Figure 5 shows some examples of the results by using the stored walking policies. It shows that the map stores not only very high-performing policies like in the top figure, but also stores the policies with different characteristics, such as in the middle figure where joint 4 is not used, or the bottom figure which rarely uses the left leg (purple).

Fig. 5: Time lapse of the Walker2D model walking using different stored policies from time steps 50 to 500. The top figure depicts the best policy stored and is used as initial policy for experiments in our adaptation phase, while the other two figures show peculiar behavior by either not making use of joint 4 (middle), or not using the purple leg at all (bottom).
Fig. 6: Results of hexapod experiments showing the performance of the policies of standalone DDPG and post-adaptation MMPRL (top) and the number of trials needed to find a good policy (bottom). The horizontal axis show the different scenarios to test the adaptation phase, see Section IV-B with N being the default situation. Scenarios of toe replacements are denoted by T and T, where and stand the corresponding leg number. D denote experiments where observation delay of time steps are introduced, while S

stands for the climbing stairs experiments. The height of the stairs is a random variable

. In the top figure, stars represent the initial policies of our map, boxplots show post-adaptation MMPRL policies, and crosses are the eight different standalone DDPG policies (baseline). In the bottom figure, the number of trials to find a good policy for a given scenario is depicted by boxplots. The boxes show the first and third quartiles, whereas the whiskers show minimum and maximum values within 1.5 IQR.

Fig. 7: Results of the Walker2D experiments showing the performance of the policies of standalone DDPG and post-adaptation MMPRL (top) and the number of trials needed to find a good policy (bottom). The horizontal axis show the different cases to test the adaptation phase, see Section IV-B with N being the default situation. Cases of a limited joint are denoted by L where is the number of the joint being limited. H denote experiments where the head size was changed according to where , while S stands for the experiments with a simulated slope of degrees. In the top figure, stars represent the initial policies of our map, boxplots show post-adaptation MMPRL policies, and crosses are the eight different standalone DDPG policies (baseline). Points with performance below zero have been omitted for some of the cases. In the bottom figure, the number of trials to find a good policy for a given scenario is depicted by boxplots. The boxes show the first and third quartiles, whereas the whiskers show minimum and maximum values within 1.5 IQR.

V-B Adaptation Phase

Figure 6 shows the results of the hexapod experiments and Figure 7 shows the results of the Walker2D experiments. Because the initial states are subject to random noise, the performance and the number of trials vary, so we show the average (and quartiles for MMPRL) over runs. The top parts of Figure 6 and Figure 7 show that MMPRL improves the performance after several trials for both agent models, even with a low-performing initial policy. The middle subfigure of Figure 5 is an example where the agent found a policy without using joint 4. During the adaptation phase we observe that this policy is indeed selected often when we disable joint 4 (T4 in Figure 6). For many cases, the performance of our policies after adaptation is better than single DDPG policies. This is especially true in difficult situations when the robot loses toes from adjacent legs (e.g., T03, T12, T34 in Figure 6) or climbs steps which are higher than during training (e.g., S15 in Figure 6).

Furthermore, some changes that we introduce to test adaptability (see Section IV-B) are not directly related to the behavioral descriptor. Examples of these are the introduction of a delayed observation (D in Figure 6) or when simulating a sloped environment (S in Figure 7). However, our method can still find a good policy, even in these cases.

The lower parts of Figure 6 and Figure 7 show that our method adapts within a low amount of trials, which means that adaptation is done within realistic time. For example, whenever the robot loses one toe, the average number of trials is less than . For T3 in Figure 6, the average number of trials taken over runs is and it takes on our machine, which are in simulation time. In T25, which is one of the slowest cases in our experiments, the mean number of trials in runs is and takes , in simulation time. We believe this time is acceptable for use in actual environments. The duration of the adaptation phase can be controlled by changing the parameters of M-BOA. By decreasing or increasing , a better policy may be found, but may need more trials like for T25 in Figure 6. Figure 8 shows the progress of the adaptation phase for different values. We see that performs best in both scenarios T25 and T3. However, it took many trials to converge in the more difficult case T25, while found better policies than or when adaptation must be done in between at most 5 to 10 trials.

In several rare cases, the single DDPG policies perform better than our policies after adaptation (e.g., T3 in Figure 6 or H8 and S-5 in Figure 7). Two possible reasons are that (i) M-BOA could not find the best policy in the new situation, or (ii) the single best policy of one DDPG agent is better than the best policy in our map. In the case of (i), a better policy may be found by changing or of M-BOA. For example if we change to , MMPRL will have similar performance as the second best DDPG policy, as depicted in Figure 8. Case (ii) is a possibility because the policies of MMPRL are also generated by DDPG. The difference is that some policies in the map may not have converged to the optimal policy, because they have not been updated enough to converge. Therefore it is only natural that the optimal policy found by DDPG works better in at least the normal situation. However, we see in Figure 6 and Figure 7 that the same standalone DDPG policies never perform well in different situations. Hence, we conclude that a single policy is not robust enough to adapt to situation changes, while MMPRL can find policies for various conditions.

Fig. 8: Results showing the performance during adaptation for cases in which the hexapod is missing toes for legs 2 and 5 (top), and only leg 3 (bottom). The adaptation phase is done without a stopping criterion for up to 50 trials using three different values. Solid lines show mean performances in 100 runs, while the 25 and 75 percentiles are the shaded area.

Vi Conclusion

We proposed and implemented MMPRL to enhance the adaptability of robots. The results from our experiments show enhanced adaptability for both the Walker2D and the hexapod agents to various environmental changes and body injuries compared to single-policy DDPG. Although some standalone DDPG policies occasionally perform better than one of the chosen policies by MMPRL after adaptation, they never perform well in different scenarios. Moreover, we showed that our method is able to aqcuire higher-dimensional policies for the Walker2D in a more efficient and effective manner compared to the default MAP-Elites algorithm.

For future work, we note that although the current map creation method requires a lot of time, it could be optimized by encouraging the search of undiscovered states by adding a curiosity term to the reward. Finally, we plan to extend our method and show its effectiveness by applying it to physical robots through e.g., transfer learning. In particular, we will extend this work for humanoid robots, which are known to be less tolerant to complex environments.


The authors would like to thank Shin-ichi Maeda for his assistance and support on this work.