To generate the policy repertoire, we use the quality-diversity algorithm called MAP-Elites [1]}. MAP-Elites first discretizes the goal-space \(\mathbb {G}\)  into \(K\)  cells. Then it randomly initializes \(m\)  policies \(\theta _{i=1:m}\)  and evaluates them on each of the dynamics conditions \(\psi _{i=0,\ldots , N-1}\)  in the simulator. Then it creates the tuples \(\langle \theta _i, \tau _i, \mathbf {x}_i, c_i\rangle _{i=1:M}\) . Here, \(\mathbf {x}_i\)  is the mean goal-space descriptor and \(c_i\)  is the minimum safety score obtained in all the dynamics conditions with the policy \(\theta _i\) . Then, MAP-Elites attempts to insert the tuples into the respective cells in the repertoire based on their corresponding goal-space outcome. If two tuples fall in the same cell, the tuple with the maximum safety score is inserted. After this initialization, MAP-Elites performs the following steps iteratively until the policy evaluation budget is reached:
