## 2 Generation of Motion Trajectory Library
### Standardization Processing  
The reference trajectory datasets \(D^{i}\) are standardized in three aspects to obtain the standardized reference trajectory datasets \(D^{i}_{s}\). In terms of model dimensions, a simplified quadruped robot model is used prior to the optimal control optimization to reduce both the optimization complexity and the degrees of freedom of the robot. As a result, once the optimization is complete, the data must be expanded. Based on the leg symmetry of the quadruped robot, the data from the simplified model can be appropriately expanded:  
\[\left\{ \begin{array}{c}p_{1}=[p_{1,x}(t),p_{w},p_{1,z}(t)]\in\mathbb{R}^{3 \times t}\\ p_{2}=[p_{2,x}(t),p_{w},p_{2,z}(t)]\in\mathbb{R}^{3\times t}\\ p_{-1}=[p_{1,x}(t),-p_{w},p_{1,z}(t)]\in\mathbb{R}^{3\times t}\\ p_{-2}=[p_{2,x}(t),-p_{w},p_{2,z}(t)]\in\mathbb{R}^{3\times t}\\ \end{array} \right. \tag{11}\]  
\[\left\{ \begin{array}{c}S_{E}(t)=[x(t),0,z(t),0,\varphi(t),0]\in\mathbb{R}^{6 \times t}\\ \theta_{E}(t)=[0,\theta_{1}(t),\theta_{2}(t),0,\theta_{1}(t),\theta_{2}(t),0, \theta_{3}(t),\theta_{4}(t),0,\theta_{3}(t),\theta_{4}(t)]\in\mathbb{R}^{12 \times t}\\ P_{E}(t)=[p_{1},p_{-1},p_{2},p_{-2}]\in\mathbb{R}^{12\times t}\\ \end{array} \right. \tag{12}\]  
where \(S_{E}(t)\) represents the expanded trunk state; \(\theta_{E}(t)\) represents the expanded joint positions; \(p_{1}\) represents the extended left front foot position; \(p_{-1}\) represents the extended right front foot position; \(p_{2}\) represents the extended left rear foot position; \(p_{-2}\) represents the extended right rear foot position; \(p_{w}\) represents the foot position Y-axis direction, with a specific value of half the width of the robot trunk; and \(P_{E}(t)\) represents the expanded foot positions. To obtain the correct trajectory data, the data dimensions derived from the simplified two-dimensional sagittal plane model are expanded to the full three-dimensional kinematic space using symmetry constraints (e.g., mirroring sagittal trajectories to lateral joints). The expanded overall state is represented by \(q_{E}(t)=[S_{E}(t),\theta_{E}(t)]\). Numerically, since reference trajectories for different actions may have varying scales, the reference trajectory data must be standardized to minimize feature differences, thereby enhancing the stability of subsequent training:  
\[\mu_{\epsilon}=\frac{1}{N}\sum_{k=1}^{N}\epsilon_{k},\sigma_{\epsilon}=\sqrt{ \frac{1}{N}\sum_{k=1}^{N}\left(\epsilon_{k}-\mu_{k}\right)^{2}} \tag{13}\]  
where \(\epsilon\in D^{i}\) represents the trajectory features, which can be the expanded overall state \(q_{E}\), expanded overall velocity \(q_{E}(t)\), or expanded foot position \(P_{E}(t)\); \(\mu_{\epsilon}\) represents the mean; and \(\sigma_{\epsilon}\) represents the standard deviation. Based on Equation (13), the numerical standardization of all trajectory features is performed as follows:  
\[\epsilon_{norm}=\frac{\epsilon-\mu_{\epsilon}}{\sigma_{\epsilon}} \tag{14}\]  
In terms of structure, the reference trajectory data are used to train a motion prior discriminator, which evaluates the similarity between the actions generated by the policy network and those in the dataset. The data are organized according to the sorting and dimensions that align with the observation space of the adversarial discriminator, facilitating the application of adversarial learning.