Hierarchical Reinforcement Learning for Concurrent Discovery of Compound and Composable Policies

  • 2019-08-01 17:29:20
  • Domingo Esteban, Leonel Rozo, Darwin G. Caldwell
  • 0

Abstract

A common strategy to deal with the expensive reinforcement learning (RL) ofcomplex tasks is to decompose them into a collection of subtasks that areusually simpler to learn as well as reusable for new problems. However, when arobot learns the policies for these subtasks, common approaches treat everypolicy learning process separately. Therefore, all these individual(composable) policies need to be learned before tackling the learning processof the complex task through policies composition. Moreover, such composition ofindividual policies is usually performed sequentially, which is not suitablefor tasks that require to perform the subtasks concurrently. In this paper, wepropose to combine a set of composable Gaussian policies corresponding to thesesubtasks using a set of activation vectors, resulting in a complex Gaussianpolicy that is a function of the means and covariances matrices of thecomposable policies. Moreover, we propose an algorithm for learning bothcompound and composable policies within the same learning process by exploitingthe off-policy data generated from the compound policy. The algorithm is builton a maximum entropy RL approach to favor exploration during the learningprocess. The results of the experiments show that the experience collected withthe compound policy permits not only to solve the complex task but also toobtain useful composable policies that successfully perform in theircorresponding subtasks.

 

Quick Read (beta)

Hierarchical Reinforcement Learning for Concurrent Discovery of Compound and Composable Policies

Domingo Esteban1,2, Leonel Rozo3 and Darwin G. Caldwell1 1Department of Advanced Robotics, Istituto Italiano di Tecnologia, Via Morego 30, 16163 Genova, Italy [email protected] and [email protected]2DIBRIS, Università di Genova, Via Opera Pia 13, 16145, Italy3Bosch Center for Artificial Intelligence, Robert-Bosch-Campus 1, 71272 Renningen, Germany. [email protected]
Abstract

A common strategy to deal with the expensive reinforcement learning (RL) of complex tasks is to decompose them into a collection of subtasks that are usually simpler to learn as well as reusable for new problems. However, when a robot learns the policies for these subtasks, common approaches treat every policy learning process separately. Therefore, all these individual (composable) policies need to be learned before tackling the learning process of the complex task through policies composition. Moreover, such composition of individual policies is usually performed sequentially, which is not suitable for tasks that require to perform the subtasks concurrently. In this paper, we propose to combine a set of composable Gaussian policies corresponding to these subtasks using a set of activation vectors, resulting in a complex Gaussian policy that is a function of the means and covariances matrices of the composable policies. Moreover, we propose an algorithm for learning both compound and composable policies within the same learning process by exploiting the off-policy data generated from the compound policy. The algorithm is built on a maximum entropy RL approach to favor exploration during the learning process. The results of the experiments show that the experience collected with the compound policy permits not only to solve the complex task but also to obtain useful composable policies that successfully perform in their corresponding subtasks.

\algrenewcommand\algorithmicindent

0.6em

I Introduction

Reinforcement learning (RL) is a general framework that allows an agent to autonomously discover optimal behaviors by interacting with its environment. However, when applied to robotics scenarios some specific challenges arise, such as high-dimensional continuous state-action spaces, real-time requirements, delays and noise in sensing and execution, and expensive (real-world) samples [1]. Recently, several authors have overcome some of these challenges by using deep neural networks (NN) as parameterized policies for generating rich behaviors in end-to-end frameworks [2][3]. Nevertheless, learning the high number of parameters of deep NNs in complex tasks involves a large number of interactions with the environment that compromises the real-world sample challenge.

Fig. 1: A possibly complex robotic task (compound task) can be decomposed into a collection of simpler and reusable tasks (composable tasks). During the RL process, the robot interacts with the environment and receives a vector with the corresponding rewards. At each iteration, the robot action is sampled from the compound policy π obtained from the combination of the corresponding composable policies {π[k]}1K and a set of state-dependent activation vectors {𝐰[k]}1K. Both composable policies and activation vectors are learned simultaneously using the same interaction data.

Several algorithms have been proposed to improve sample efficiency of model-free deep RL by making a better use of the sample information (data-efficiency), obtaining more information from data (sample choice) and improving several times the policy with the same samples (sample reuse) [4]. However, learning a complex robotic task may still be slow or even infeasible when the robot learns from scratch. An appealing approach to deal with this problem is to decompose the task into subtasks that are both simpler to learn and reusable for new problems.

Many tasks in robotics may intuitively be divided into individual tasks, for example, the task of moving an object to a specific location may be decomposed into reaching for the object, grasping it, moving it to the target, and releasing it. Therefore, when a robot is provided with a collection of policies defined in these composable tasks, a new RL problem can be stated as learning how to mix these composable policies such that the performance criterion of the complex task is optimized. Note that shifting the complexity of this task learning problem to layers of simpler functionality is mainly studied in the field of hierarchical RL. However, the assumptions of common hierarchical RL algorithms limit their application in several robotic tasks.

Firstly, several hierarchical RL methods decompose the complex RL problem temporally, meaning that during a certain period of time the behavior of the robot is delegated to a specific subtask policy [5]. This temporal decomposition is suitable for robotic tasks that can be divided sequentially, however, many others require the robot to perform individual tasks concurrently. For example, a manipulator carrying an object and avoiding an obstacle at the same time. Secondly, common learning methods optimize the individual policies and the compound policy through independent single-task RL processes  [6][7][8]. Therefore, the robot has to continuously interact with the environment to learn, possibly from scratch, first a collection of composable policies, and only after that their composition, compromising sample efficiency.

Under this scenario, we propose a two-level hierarchical RL approach where a set of Gaussian policies, constituting the low level of the hierarchy, are composed at the high level by means of state-dependent activation vectors defined for each policy. These activation vectors allow to consider concurrently actions sampled from all the low-level policies and preferences among specific components. Furthermore, we propose in section IV two alternatives for obtaining a compound Gaussian policy as a function of the parameters of the low-level policies and their corresponding activation vectors. An algorithm for learning both high- and low-level policies within the same learning process is proposed and detailed in section V.

As an illustration, Figure 1 shows how the proposed algorithm executes actions sampled from the high-level policy, and then exploits this experience for learning simultaneously both low-level policies and activation vectors in an off-policy manner. The results of the experiments detailed in section VI show that the proposed algorithm obtains a high-level policy that solves compound tasks while learning useful low-level policies that can be potentially reused for new tasks. Supplementary videos and code of the proposed approach are available at: https://sites.google.com/view/hrl-concurrent-discovery

II Related Work

Complex problems in RL usually involve either tasks that can be hierarchically organized into subtasks, scenarios requiring concurrent execution of several tasks, and tasks with large or continuous state-action spaces [9]. Hierarchical RL approaches split a complex task into a set of simpler elementary tasks [10]. Some of these methods have been successfully applied in robotics by exploiting temporal abstraction, where the decision to invoke a particular task is not required at each time step but over different time periods [5][11]. As a consequence, these methods assume that a high-level policy, which selects the subtask, and low-level policies, which select the action, are executed in different time scales. In contrast, the approach proposed in this paper considers that the decisions at both levels of the hierarchy are executed at each time step.

The temporal abstraction assumption in most hierarchical RL methods also involves that during a certain period of time the robot only performs a particular task. RL problems requiring policies that solve several tasks at the same time are commonly stated as multiobjective or modular RL problems [12][13]. The policies of all these subtasks may be combined using weights describing the predictability of the environmental dynamics [14], or the values obtained from the desirability function in a linearly-solvable control context [15]. Another alternative is to combine action-value functions of composable tasks, and then extract a policy from this combined function [8]. The latter paper is similar to ours since the composable policies are also optimizing an entropy-augmented RL objective, however, their combination is carried out at the level of action-value functions unlike our policy-based approach. Moreover, their composable policies have been previously learned in independent processes, in comparison to the algorithm proposed here where both compound and composable policies are improved in the same RL process.

Exploiting the experience collected using a particular policy (so-called behavior policy) to concurrently improve several policies is a promising strategy that has been previously explored in literature. The Horde architecture shows how independent RL agents with same state-action spaces can be formulated for solving different problems [16]. This approach proposed by Sutton et al. is relevant because exploits its off-policy formulation for improving all the policies in parallel.

Several works extended the Horde formulation and used deep NN for dealing with high dimensional or continuous state-action spaces, and also to provide a modularity that can be exploited for modeling and training independent RL problems [17][18][19][20]. The Intentional-Unintentional agent [17], for example, shows how deep NN policies and value functions can be learned even with an arbitrarily selected behavior policy. However, this policy can also be chosen at each time step by following a hierarchical objective, and the selection process can be improved as a function of the performance in the complex task [20]. Note that the policies in [17][20] are deterministic, and then the exploration should be carried out by adding a noise generated from an Ornstein-Uhlenbeck process. In contrast, all the policies in this paper are stochastic and the exploration is generated directly from the behavior policy, that is the stochastic high-level policy.

Most of the notation and the approach proposed in this paper are inspired by the Scheduled Auxiliary Control (SAC-X) method [21]. SAC-X solves complex tasks based on a collection of simpler individual tasks, and learns from scratch, both high- and low-level policies simultaneously. However, this method considers temporal abstraction in the hierarchy, and therefore the high-level policy is a scheduler that occasionally selects one low-level policy. Therefore, the policies at the low level of the hierarchy can only be executed sequentially and run at a different time-scale than the policy defined in the high level. This methodology differs from our approach as we consider a framework that is able to execute different policies concurrently.

III Preliminaries

The sequential decision making process of a robot could be modeled by a Markov decision process (MDP) , defined by the tuple (𝒮,𝒜,ps,r), where 𝒮D𝒮 and 𝒜D𝒜 are continuous state and action spaces of dimensionality D𝒮 and D𝒜, respectively. At each time step t, the robot selects an action 𝐚t𝒜 according to a policy π which is a function of the current state of the environment 𝐬t𝒮. After this interaction, the state of the environment changes to 𝐬t+1𝒮 with a probability density ps=p(𝐬t+1|𝐬t,𝐚t), and the robot receives a reward according to the function r:𝒮×𝒜. The robot’s goal is to maximize the expected infinite-horizon discounted accumulated reward G(τ) of the trajectory τ={𝐬0,𝐚0,𝐬1,𝐚1,}, induced by its policy π. That is to say J(π)=𝔼τ[G(τ)]=𝔼τ[t=0γtr(𝐬t,𝐚t)].

III-A Maximum Entropy Reinforcement Learning

The exploration required for a robot to generate behaviors that produce high return can be directly obtained by the stochastic policy π(𝐚t|𝐬t), where the randomness of the actions 𝐚t given the state 𝐬t can be quantified by the entropy of the policy. Maximum entropy reinforcement learning or entropy regularized RL [22][23] is a formulation that augments the previous RL objective by including the entropy of the robot’s policy J(π)=𝔼τ[t=0γt(r(𝐬t,𝐚t)+α(π(|𝐬t)))], where (π(|𝐬t)) denotes the entropy of an action 𝐚t with distribution π(𝐚t|𝐬t) and is computed as (π(|𝐬t))=𝔼𝐚tπ[-logπ(|𝐬t)]. The parameter α controls the stochasticity of the optimal policy. Note that the conventional RL objective is recovered in the limit α0.

III-B Soft Actor-Critic algorithm

Soft actor-critic (SAC) is an off-policy actor-critic deep RL algorithm that optimizes stochastic policies defined in the maximum entropy framework [24]. The algorithm is built on a policy iteration formulation that alternates between policy evaluation and policy improvement steps. In the former, a parameterized soft Q-function Qϕ is updated to match the value of the parameterized policy π𝜽 according to the maximum entropy objective, while in the latter the policy π𝜽 is updated towards the exponential of the updated Qϕ. The update rules for the NN parameters ϕ and 𝜽 are given in section V, and more details of the SAC algorithm can be found in [24][25].

IV Composition of modular Gaussian policies

Acquiring autonomously a robotic skill for a specific task can be achieved by directly optimizing the maximum entropy RL objective with the experience collected from the task execution. Nevertheless, when a new task defined in the same state and action spaces has to be learned, the robot should interact again with the environment to obtain useful data for improving the policy for this new task. Sample efficiency is a key concern in robotics, therefore in this section we propose a two-level hierarchical model that seeks to construct a set of simpler and reusable policies in the low level of the hierarchy, and a high-level policy that combines them for solving a more complex task. In addition, in section V, we will introduce an algorithm for exploiting better the interaction data and learning both low- and high-level policies all together.

IV-A Hierarchical model for composing modular policies

First, let us assume that several complex tasks can be decomposed into a set of K composable tasks 𝒯={𝒯[k]}1K. All of them have the same state space, action space and transition dynamics, however, each one is characterized by a specific reward function r[k](𝐬t,𝐚t). Thus, the corresponding MDP for each composable task 𝒯[k] is (𝒮,𝒜,ps,r[k]). Second, let us assume that stochastic policies defined in these MDPs, called composable policies, are conditional Gaussian distributions π[k](𝐚|𝐬)=𝒩(𝐦[k],𝐂[k]), with mean vector 𝐦[k]𝒜 and diagonal covariance matrix 𝐂[k]=diag[σ12,σ22,,σD𝒜2].

Let us also define a (possibly more complex) compound task , described by the combination of the tasks in 𝒯. As with the composable tasks, also shares the same state space, action space and transition dynamics, but it is characterized by the reward r(𝐬t,𝐚t). Finally, a stochastic policy defined in the resulting MDP (𝒮,𝒜,ps,r) is named compound policy π. This policy reuses the set of composable policies Π={π[k]}1K defined in 𝒯, by using the set 𝒲={𝐰[k]}1K where 𝐰[k]D𝒜 is an activation vector whose components are used to combine each DoF of the action vector. Therefore, the compound policy is modeled as a two-level hierarchical policy π=𝚏(𝒲,Π).

The generation process of an action from the compound policy involves first obtaining the actions from Π in the low level of the hierarchy, and then combining them at the high level of the hierarchy. Instead, we here exploit the assumptions made for the composable policies and propose two formulations of 𝚏 for obtaining a policy π(𝐚|𝐬) that is also conditional Gaussian and defined in terms of the means 𝐦[k] and covariances matrices 𝐂[k] of the composable policies. As a result, an action from the compound policy can be sampled directly from the resulting conditional distribution, 𝐚π(𝐚|𝐬).

The first option for 𝚏 is to consider that the action of the compound policy is the convex combination of elements of actions sampled from the composable policies. As the actions for each composable policy are conditionally independent given the states, and each π[k](𝐚|𝐬) is conditional Gaussian, the resulting action is also normally distributed. Therefore, the compound policy is π(𝐚|𝐬)=𝒩(𝐦,diag(𝐜)), where the components in 𝐦 and 𝐜 are computed as

ci=k=1K(wi[k]σi[k])2,mi=k=1Kwi[k]mi[k], (1)

for all 1iD𝒜, with wi[k], mi[k], σi[k] as the corresponding elements of the activation vector, mean vector, and standard deviation vector for the composable policy π[k].

The second alternative for modeling 𝚏 is to consider that each component i in the resulting action vector is obtained from a product of conditional Gaussians π(ai|𝐬)k=1K(π[k](ai|𝐬))wi[k]. As a result, the compound policy is also π(𝐚|𝐬)=𝒩(𝐦,diag(𝐜)) where the components in 𝐦 and 𝐜 are computed as

ci=(k=1Kwi[k](σi[k])2)-1,mi=ci(k=1Kwi[k](σi[k])2mi[k]), (2)

for all 1iD𝒜, with wi[k], mi[k], σi[k] defined as in the first case.

IV-B Hierarchical Policy and Q-functions Modeling

The composable tasks in 𝒯 are formulated as independent RL problems, and thus the corresponding policies are also independent. In this line, the mean 𝐦[k] and covariance matrix 𝐂[k] 11 1 More specifically a vector of log standard deviations. that describe a composable Gaussian policy can be obtained from an independent NN. Nevertheless, we can exploit the assumption that all the tasks in 𝒯 share the same state space, and therefore use shared layers across all the policies for obtaining features that can be exploited by all the policies. The parameters of the resulting NN policy are denoted by 𝜽𝒯, and include both the parameters of each NN policy and the shared layers.

Moreover, the function 𝚑 required for obtaining the state-dependent activation vectors {𝐰[k]}1K=𝚑(s), can also be modeled by an NN with parameters 𝜽w. This new NN is included in the previously described NN and thus also exploits the features obtained in the shared layers. Therefore, the whole hierarchical policy is parameterized by π𝜽, an NN with parameters 𝜽=[𝜽𝒯𝜽w] and depicted in Fig. 2.

In the same way, an NN with an architecture similar to the hierarchical policy can be used to model the Q-functions of both the composable policies and compound policy. Therefore, the resulting NN, denoted by Qϕ and depicted in Fig. 2, has parameters ϕ=[ϕ𝒯ϕ].

\thesubsubfigure Hierarchical policy
\thesubsubfigure Q-value function
Fig. 2: Policy and Q-value function neural networks. (a) the first layer is shared among all the modules, the modules for the composable policies are shown in blue and the module that outputs the activation weights is depicted in purple. The outputs of all these modules are then composed in 𝚏 by using one of the alternatives described in Section IV-A. (b) the first layer is also shared among all the modules, and then each module outputs the corresponding approximated Q-value.

V Simultaneous Learning and Composition of Modular Maximum Entropy Policies

Most methods learn the composable tasks one at a time, and later, the compound task. This procedure is not scalable as all the experience collected for each learning process is only used for that specific process. Also, it is not possible to start learning more complex tasks unless all the composable policies have been successfully learned. The method proposed in this section is based on the idea that a single stream of experience can be used to improve not only the policy that is generating the behavior but also, indirectly, many other policies. Similar to [17] and [21], our method assumes that the robot receives, at each time step, the rewards for different tasks, and each reward has an assigned policy that tries to maximize its corresponding return G by using the same collection of state-action pairs.

V-A Off-Policy Multi-task Policy Search

The sets of composable policies Π and activation vectors 𝒲 required for a compound policy π to solve task , can be learned simultaneously. To do so, let us assume that, at each time step, the robot receives a stream of rewards 𝐫t=[rt[1]rt[K]rt]𝖳, that is, a vector whose components are the reward rt of the compound task and the reward rt[k] of each composable task in 𝒯.

Moreover, the method considers that the behavior or intentional policy, i.e. the policy followed by the robot to interact with the environment, is always the compound policy π. The experience at each time step (𝐬t,𝐚t,𝐫t,𝐬t+1) is collected in the dataset 𝒟, and subsequently used for improving compound and composable policies. As a result, the data in 𝒟 is off-policy experience for the composable policies because it is generated from a different policy [26]. Thus, the composable policies (from now on unintentional policies [17]) are target policies in the off-policy setting.

Therefore, by considering the parameterized policy π𝜽 (see section IV-B) with parameters 𝜽=[𝜽𝒯𝜽w], the optimal parameters 𝜽* are those that maximize the objective

Jπ(𝜽)=Jπ(𝜽w;)+k=1KJπ(𝜽𝒯;𝒯[k]), (3)

where Jπ(𝜽𝒯;𝒯[k]) denotes the performance criterion of the composable policy π𝜽[k] in task 𝒯[k], and Jπ(𝜽w;) the performance criterion of the compound policy π𝜽 in task .

V-B Multi-task Soft Actor-Critic

As mentioned in section III-A, the maximum entropy objective incentives exploration, which is critical for the introduced method as the composable policies are learned unintentionally and their influence in the sampling process is indirect. Thus, each policy seeks to optimize the maximum entropy objective

J(π[j])=t=0𝔼π[j][γt(r[j](𝐬t,𝐚t)+α(π[j](|𝐬t)))] (4)

where r[j] is the reward function of the corresponding task j(𝒯{}).

Considering the SAC algorithm described in section III-B, the learning process for all the aforementioned policies is an alternating procedure of policy evaluation, where the value function is computed for all the policies, and policy update, where the policies are improved with their corresponding value functions. Therefore, at each time step, the parameterized Q-function Qϕ optimizes the soft mean-squared bellman error of all the policies

JQ(ϕ)=𝔼(𝐬t,𝐚t)𝒟[12j(Qϕ[j](𝐬t,𝐚t)-(r[j](𝐬t,𝐚t)+γ𝔼𝐬t+1ps[Vϕ¯[j](𝐬t+1)]))2] (5)

for all the tasks j(𝒯{}), where the value function Vϕ¯[j] is implicitly parameterized through a target soft Q-function with parameters ϕ¯ via

Vϕ¯[j](𝐬t)=𝔼𝐚tπ𝜽[j][Qϕ¯[j](𝐬t,𝐚t)-αlog(π𝜽[j](𝐚t|𝐬t))] (6)

On the other hand, the components of (3) for the policy improvement step of the parameterized policy π𝜽 are defined as

Jπ(𝜽𝒯;𝒯[k])=𝔼𝐬t𝒟[𝔼𝐚tπ𝜽[k][Qϕ[k](𝐬t,𝐚t)-αlog(π𝜽[k](𝐚t|𝐬t))]] (7)

for each composable task 𝒯[k] in 𝒯, and

Jπ(𝜽w;)=𝔼𝐬t𝒟[𝔼𝐚tπ𝜽[Qϕ(𝐬t,𝐚t)-αlog(π𝜽(𝐚t|𝐬t))]] (8)

for the compound task . Note that the parameters 𝜽w required for modeling the activation vectors in 𝒲 are the only ones updated in the compound policy because, as discussed in [21], there is no guarantee to preserve the unintentional policies. As a consequence, the proposed algorithm improves the parameterized hierarchical policy π𝜽 in a two-step process with random minibatches from 𝒟. First, by optimizing 𝜽𝒯 with (7) for all the composable tasks. And second, by fixing 𝜽𝒯 and optimizing 𝜽 through (8).

As suggested in [27], the practical algorithm considers two soft Q-function NNs with parameters ϕi trained independently to optimize (5). Furthermore, the algorithm includes a step to calculate α automatically by optimizing

J(α[j])=𝔼𝐚tπ[j][-αlog(π𝜽[j](𝐚t|𝐬t))+α¯[j]] (9)

for j(𝒯{}). Therefore, the whole training process with the proposed method, called Hierarchical Intentional-Unintentional (HIU), is summarized in Algorithm subsection V-B.

\alglanguage

pseudocode {algorithm}[t] HIU-SAC {algorithmic}[1] \StateInitialize target network weights: ϕ¯iϕi for i{1,2} \StateInitialize an empty replay memory 𝒟 \Foreach iteration

\For

each interaction step \StateSample compound action 𝐚tπ𝜽(𝐚t|𝐬t) \State Sample transition from the environment: 𝐬t+1ps(𝐬t+1|𝐬t,𝐚t) \State Store the interaction data in the replay memory: 𝒟𝒟{(𝐬t,𝐚t,𝐫t,𝐬t+1)} \EndFor

\For

each gradient step \State Update Q-networks parameters:ϕiλQ^JQ(ϕi) for i{1,2}

\State

Update composable policies parameters: 𝜽𝒯λπ^Jπ(𝜽𝒯;𝒯)

\State

Update compound policy parameters: 𝜽λπ^Jπ(𝜽;)

\State

Update temperature parameters:

α[j]λα^Jα(α[j]) for j(𝒯{})

\State

Update target Q-networks weights:

ϕi¯ρϕi+(1-ρ)ϕi¯ for i{1,2}

\EndFor\EndFor

VI Experiments

In order to analyze the proposed approach, several experiments were carried out in four robotic tasks that can be intuitively decomposed into simpler tasks. The goal of these experiments is to evaluate if the proposed approach 1) solves an RL problem with a policy that reuses a set of composable policies, and at the same time, 2) obtains composable policies with performance similar to dedicated single-task policies.

VI-A Tasks Description

In the first environment, shown in Fig. 3, the agent is a 2D point particle that has to reach the position (-2,-2). The state of this environment is continuous and defined by the position (x,y) of the particle, and the control actions are its velocities (x˙,y˙), then D𝒮=D𝒜=2. The initial position of the particle is sampled from a spherical Gaussian distribution centered in the position (4,4). This task can be decomposed into two composable tasks, namely, reaching the position -2 in the x coordinate, and reaching the position -2 in the y coordinate. Therefore, the compound policy to reach (-2,-2) has to combine the corresponding composable policies.

The second and third environments correspond a 3-DoF planar manipulator simulated in Pybullet [28], and whose control actions are joint torques, then D𝒜=3. The second environment, shown in Figure 3, requires the robot to reach a random goal pose and is described by a state composed of the joint positions and velocities of the robot, and the relative position of the robot end-effector w.r.t the goal, then, D𝒮=8. The third environment, displayed in Figure 3, requires the manipulator to reach a cylinder and push it to a target location. In addition to the joint positions and velocities, the state also includes the positions of the end-effector, the cylinder and the goal, then D𝒮=12.

Finally, the proposed approach is also tested in a more complex task, where a simulated CENTAURO robot [29] has to reach a target 3D pose while balancing an object with a tray, as depicted in Figure 3. The tray is firmly attached to the robot hand but not the cylinder. The control actions are task joint torques of the right arm, then D𝒜=7. Note that if a zero-torque control action was applied to the joints, the cylinder would fall by its weight. The state in this scenario is composed of the arm joint positions and velocities, pose errors and rate of change of the errors between the target pose and the center of the tray, and between the desired pose of the cylinder in the tray and its current pose, then D𝒮=38.

\thesubsubfigure
\thesubsubfigure
\thesubsubfigure
\thesubsubfigure
Fig. 3: Experimental scenarios: (\subrefFig:description_navigation2d) 2D particle that reaches a fixed goal position. (\subrefFig:description_reacher) 3-DoF planar manipulator reaching a random 2D goal position (green circle). (\subrefFig:description_pusher) 3-DoF planar manipulator that should push the randomly-placed yellow cylinder to a varying 2D goal position (green circle). (\subrefFig:description_centauro) CENTAURO robot that simultaneously balances a tray with a cylinder and moves to a random 3D goal pose.

VI-B Robot Learning Details

The NN models proposed in subsection IV-B are used for learning the four tasks above described. The same architecture is used in all the experiments, namely, NNs with ReLU nonlinearities in the hidden nodes and none in the outputs. However, the number of nodes depends on the task, as summarized in Table I.

The tasks are learned with the algorithm proposed in section V and the following hyperparameters: Adam optimizer with learning rates λQ=λπ=λα=310-4, target smoothing coefficient ρ=510-3, and discount factor γ=0.99. The NNs are trained using stochastic gradient descent with batches sampled from 𝒟 after an interaction with the environment. The entropy target ¯[j] is the same for both composable and compound policies, however its value varies for each task. These values and the replay buffer size 𝒟 for each environment are also depicted in Table I.

The two composition strategies described in section IV are denoted with HIUSAC. The alternative that considers Equation (missing) is denoted by HIUSAC-1, while the solution using Equation (missing) is denoted by HIUSAC-2. For comparison purposes, the SAC algorithm was used to learn both compound and composable policies in single-task RL formulations.

TABLE I: Environment-specific hyperparameters
(1) (2) (3) (4)
Units per layer 64 128 128 256
Training steps 1.5104 1.5105 1.5105 1.5106
Size 𝒟 5106 5106 5106 1107
Size Minibatch 64 256 256 256
¯ 0 1 1 1

(1) 2D navigation with point particle (Figure 3).
(2) Reaching task with 3 DoF manipulator (Figure 3)
(3) Pushing task with 3 DoF manipulator (Figure 3)
(4) Reaching and tray balancing task with CENTAURO (Figure 3)

VI-C Results

Figure 4 shows the learning curves of the composable policies obtained with both HIUSAC-1 and HIUSAC-2 for the 2D particle environment. The achieved performance is similar to that obtained directly in the compound task with the SAC algorithm. The approximated soft Q-values for the velocities (actions) given some specific positions of the particle (state) are depicted in Figure 4. Notice how the actions and soft Q-values vary as a function of the position, capturing the specifications of their respective tasks. This is a remarkable result as the composable policies were learned unintentionally with off-policy experience collected only with the compound policy.

\thesubsubfigure
\thesubsubfigure
Fig. 4: Navigation task of a 2D point particle: (a) SAC denotes the compound and composable policies obtained with the SAC algorithm in single-task formulations. The policies obtained with the algorithm proposed in section IV are denoted by HIUSAC-1 and HIUSAC-2, with the former considering Equation (missing) and the latter using Equation (missing). The learning curves show that both the compound and composable policies can successfully perform their respective tasks using the proposed hierarchical model, while being competitive with the single-task formulations. (b) Actions sampled from these policies seek to move the point particle to their respective target. The soft Q-values of these policies, depicted as contour plots, show the values for the actions in five different positions.
\thesubsubfigure Reaching Environment
\thesubsubfigure Pushing Environment
\thesubsubfigure CENTAURO Environment
Fig. 5: Learning curves for the compound task and the composable tasks for the reaching, pushing and CENTAURO tasks. The figures show the average return for the proposed approach with the two composition strategies described in section IV. The method that considers Equation (missing) is denoted by HIUSAC-1. On the other hand, the method that considers Equation (missing) is denoted by HIUSAC-2 The resulting policies obtained with both alternatives are compared with the ones obtained from single-task RL formulations with the SAC algorithm.

The learning curves of the other three environments are displayed in Figure 5. As noted previously, the tasks with the planar manipulator are more complex than the navigation of the 2D particle because the action space, i.e. joint torques, influence directly in the task of reaching the x position and the task of reaching the y position. Therefore, it is more difficult to assign proper activation vectors for the respective composable policies. However, both HIUSAC-1 and HIUSAC-2 obtained successful composable and compound policies, all of them with a performance similar to the policies obtained with the SAC algorithm in single-task RL formulations. However, as we can notice in the composable task 2 for the reaching environment (Figure 5), both alternatives require more iterations to converge.

Finally, the results obtained for the task carried out by the CENTAURO robot are reported in Figure 5. In this case, the composable policy converges faster and results in higher average returns when compared to the policy obtained in the single-task formulation. This results demonstrate how the complexity of one task can be solved with a collection of simpler subtasks by exploiting a hierarchical off-policy formulation. An interesting result is that the performance of the composable policies for task 2 exceeds that of their single-task counterparts. We attribute this to the fact that the compound policy explores better the environment and therefore the collected experience contains more meaningful information than those obtained in single-task RL formulations. Between HIUSAC-1 and HIUSAC-2, the latter converges faster and results in higher average returns in the compound task and also the composable ones.

VII Conclusions and Future Work

In this paper we have proposed a hierarchical RL approach for tasks that can be decomposed into a collection of subtasks that require to be performed concurrently. The Gaussian policies corresponding to these subtasks are combined using a set of activation vectors. These activation vectors allow to consider concurrently actions sampled from all the low-level policies and preferences among specific components. Furthermore, two methods were proposed to obtain a compound policy that is also Gaussian and a function of the means and covariances matrices of the composable policies.

Moreover, we proposed an algorithm for learning both compound and composable policies within the same learning process by exploiting the off-policy data generated from the compound policy. Note that populating the replay memory buffer with rich experiences is essential for acquiring multiple skills in an off-policy manner. The composable policies learned unintentionally had similar performance than the policies obtained in single-task formulations only when the compound policy was able to efficiently explore the environment. For this reason, the algorithm was built on a maximum entropy RL framework to favor exploration during the learning process.

Nevertheless, choosing the temperature parameters for the maximum entropy RL objective is challenging for the compound policy because its stochasticity is determined by the activation vectors and the stochasticity of all the composable policies. As a result, high temperature values favors higher entropy policies and the compound policy will show preference for composable policies with high stochasticity. However, this preference is made to the detriment of preferring policies with good performance but low entropy. We have used the automating entropy adjustment strategy proposed in [27] that reduces this problem, however now the problem is derived to choose the minimum expected entropy for both composable and compound policies. This value was easier to set for the simpler environments of the experiments, but more challenging for the complex ones. Therefore, future work could be focus in developing a mechanism that allows to obtain this value automatically based on the performance of both compound and composable policies.

On the other hand, in this paper, the action value functions of the composable policies are only used in the policy evaluation step of these policies. However, these models capture the performance of the policies in their respective tasks, and therefore they are important sources of information that could be considered by the compound policy.

Finally, an important motivation for task decomposition is reusing the composable policies in new tasks. Future work will be to analyze the behavior of the composable policies when they are reused in different compound tasks. It is important to know how the performance of new compound policies is affected by composable policies obtained in different contexts. Moreover, the experiments carried out in this paper were focused in tasks that are decomposed in two subtasks. Future work will consider tasks that could be decomposed in more than two subtasks and tasks where the components of the action vector can be assigned completely to specific tasks, e.g. bimanual tasks.

ACKNOWLEDGMENT

The TITAN Xp used for this research was donated by the NVIDIA Corporation.

References

  • [1] J. Peters, D. D. Lee, J. Kober, D. Nguyen-Tuong, J. A. Bagnell, and S. Schaal, “Robot learning,” in Handbook of Robotics, B. Siciliano and O. Khatib, Eds.   Springer, 2016, ch. 15, pp. 357–398, 2nd Edition.
  • [2] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra, “Continuous control with deep reinforcement learning,” in International Conference on Learning Representation (ICLR), 2016.
  • [3] S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-end training of deep visuomotor policies,” Journal of Machine Learning Research, vol. 17, no. 1, pp. 1334–1373, 2016.
  • [4] O. Sigaud and F. Stulp, “Policy search in continuous action domains: an overview,” arXiv preprint arXiv:1803.04706, 2018.
  • [5] C. Daniel, G. Neumann, O. Kroemer, and J. Peters, “Hierarchical relative entropy policy search,” Journal of Machine Learning Research, vol. 17, no. 93, pp. 1–50, 2016.
  • [6] K. Mülling, J. Kober, and J. Peters, “Learning table tennis with a mixture of motor primitives,” in IEEE-RAS International Conference on Humanoid Robots (Humanoids), 2010, pp. 411–416.
  • [7] T. Osa, J. Peters, and G. Neumann, “Hierarchical reinforcement learning of multiple grasping strategies with human instructions,” Advanced Robotics, vol. 32, no. 18, pp. 955–968, 2018.
  • [8] T. Haarnoja, V. Pong, A. Zhou, M. Dalal, P. Abbeel, and S. Levine, “Composable deep reinforcement learning for robotic manipulation,” in IEEE International Conference on Robotics and Automation (ICRA), 2018, pp. 6244–6251.
  • [9] N. Sprague and D. Ballard, “Multiple-goal reinforcement learning with modular sarsa(o),” in International Joint Conference on Artificial Intelligence (IJCAI), 2003, pp. 1445–1447.
  • [10] A. G. Barto and S. Mahadevan, “Recent advances in hierarchical reinforcement learning,” Discrete event dynamic systems, vol. 13, no. 1-2, pp. 41–77, 2003.
  • [11] J. Kober and J. Peters, “Learning elementary movements jointly with a higher level task,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2011, pp. 338–343.
  • [12] C. Liu, X. Xu, and D. Hu, “Multiobjective reinforcement learning: A comprehensive overview,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 45, no. 3, pp. 385–398, March 2015.
  • [13] C. Simpkins and C. Isbell, “Composable modular reinforcement learning,” in AAAI Conference on Artificial Intelligence, 2019.
  • [14] K. Doya, K. Samejima, K.-i. Katagiri, and M. Kawato, “Multiple model-based reinforcement learning,” Neural Comput., vol. 14, no. 6, pp. 1347–1369, Jun. 2002.
  • [15] E. Uchibe and D. Doya, “Combining learned controllers to achieve new goals based on linearly solvable mdps,” in IEEE International Conference on Robotics and Automation (ICRA), 2014, pp. 5252–5259.
  • [16] R. S. Sutton, J. Modayil, M. Delp, T. Degris, P. M. Pilarski, A. White, and D. Precup, “Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction,” in International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2011, pp. 761–768.
  • [17] S. Cabi, S. G. Colmenarejo, M. W. Hoffman, M. Denil, Z. Wang, and N. De Freitas, “The intentional unintentional agent: Learning to solve many continuous control tasks simultaneously,” in Conference on Robot Learning (CoRL), 2017, pp. 207–216.
  • [18] T. Schaul, D. Horgan, K. Gregor, and D. Silver, “Universal value function approximators,” in International Conference on Machine Learning (ICML), 2015, pp. 1312–1320.
  • [19] M. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu, “Reinforcement learning with unsupervised auxiliary tasks,” in International Conference on Learning Representation (ICLR), 2016.
  • [20] Z. Yang, K. Merrick, H. Abbass, and L. Jin, “Hierarchical deep reinforcement learning for continuous action control,” IEEE Transactions on Neural Networks and Learning Systems, vol. 29, no. 11, pp. 5174–5184, Nov 2018.
  • [21] M. Riedmiller, R. Hafner, T. Lampe, M. Neunert, J. Degrave, T. Van de Wiele, V. Mnih, N. Heess, and T. Springenberg, “Learning by playing - solving sparse reward tasks from scratch,” in International Conference on Machine Learning (ICML), vol. 80, 2018, pp. 4344–4353.
  • [22] B. D. Ziebart, “Modeling purposeful adaptive behavior with the principle of maximum causal entropy,” Ph.D. dissertation, Carnegie Mellon University, 2010.
  • [23] G. Neu, A. Jonsson, and V. Gómez, “A unified view of entropy-regularized markov decision processes,” arXiv preprint arXiv:1705.07798, 2017.
  • [24] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine, “Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor,” in International Conference on Machine Learning (ICML), 2018, pp. 1861–1870.
  • [25] S. Levine, “Reinforcement learning and control as probabilistic inference: Tutorial and review,” arXiv preprint arXiv:1805.00909, 2018.
  • [26] R. S. Sutton and A. G. Barto, Introduction to Reinforcement Learning, 2nd ed.   Cambridge, MA, USA: MIT Press, 2018.
  • [27] T. Haarnoja, A. Zhou, K. Hartikainen, G. Tucker, S. Ha, J. Tan, V. Kumar, H. Zhu, A. Gupta, P. Abbeel et al., “Soft actor-critic algorithms and applications,” arXiv preprint arXiv:1812.05905, 2018.
  • [28] E. Coumans and Y. Bai, “Pybullet, a python module for physics simulation for games, robotics and machine learning,” http://pybullet.org, 2016–2018.
  • [29] L. Baccelliere, N. Kashiri, L. Muratore, A. Laurenzi, M. Kamedula, A. Margan, S. Cordasco, J. Malzahn, and N. G. Tsagarakis, “Development of a human size and strength compliant bi-manual platform for realistic heavy manipulation tasks,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017.