# A Survey of Scenario Generation for Automated Vehicle Testing and Validation
## 3 Scenario Generation Methods
### Adaptive Test Scenario Generation Methods
#### 3.2.3 Imitation-Learning-Based Method  
Imitation learning (IL) [54] is a technique that generates test scenarios by learning the behavior of humans or other experts. In generation based on imitation learning, the generation method usually combines imitation learning with other techniques to generate test scenarios. The work in [55] proposed a dynamic test scenario generation method based on conditional generative adversarial imitation learning (CGAIL) [56], which generates test scenario by modeling environmental vehicles as agents with human behavior and simulating the interaction process between autonomous vehicles and environmental vehicles. The study modeled the driving scenario as a Markov decision process (MDP), including a state set, an action set, a policy set, a transition probability function, and a reward set. The hierarchical Dirichlet process hidden semi-Markov model (HDP-HSMM) method was used to cluster the expert demonstration data. The CGAIL method was then used to generate dynamic test scenarios based on scenario category labels. The CGAIL model includes a generator and a discriminator. The generator outputs the actions of environmental vehicles based on the current state and scenario labels, and the discriminator is used to distinguish between expert demonstrations and generated samples. Then, the environmental vehicle is modeled as an agent, the interaction process between it and the autonomous vehicle issimulated, and the performance of the autonomous vehicle in different scenarios is tested. The autonomous vehicles are evaluated by evaluating their different collision rates, failure rates, and success rates in different scenarios. This method can generate adaptive test scenarios and model environmental vehicles as agents with human behavior, simulating the time sequence interaction process between autonomous vehicles and environmental vehicles, providing a more realistic evaluation environment than static testing. Moreover, by clustering real traffic environments and integrating scenario category labels, this method can generate test scenarios with diverse and multi-modal characteristics, improving the test coverage and effectiveness. However, the training process for generative adversarial networks (GAN) and CGAIL models requires a large amount of computing resources and time, and therefore may not be suitable for situations with limited resources. Additionally, the quality and diversity of the generated scenarios are highly dependent on the richness and representativeness of the training data. If the training data are insufficient, the generated scenarios may not cover all possible driving situations. In general, the test scenario generation process of AVs can be summarized as the process shown in Figure 6. This is the framework for generating test scenarios, showing the entire process of generating a test scenario. Figure 6: Adaptive scenario generation framework. This framework clearly shows how to generate test scenarios for autonomous vehicles. First, we need to determine the type of ODD, whether it is car-following ODD, lane-changing ODD, U-turn ODD, or other types of ODD. Then, the additional constraints of the scenario are determined, such as whether the road is an urban road, a highway, a rural road, or other; how many lanes there are; how many vehicles there are, etc. This information is then used to generate static objects in the scenario, which is the \"static configuration\" in the framework, and the output result is the \"scenario configuration\" in the framework. Then, we judge this to see if the output result meets the scenario specifications we defined at the beginning. If not, then return to the generation stage to regenerate. If it meets the specifications, then enter the next stage of dynamic element generation. The generation of dynamic elements is based on the static elements we just generated. It is crucial that these dynamic elements serve the purpose of the test, which is reflected by the validation criteria.