KatInterview

Simulating Traffic Participants for Autonomous Vehicle Training

Machine LearningModel answer
HardModel answerMachine Learningsimulationreinforcement-learningautonomous-driving

Last updated

Design a system for modeling the behavior of surrounding vehicles, pedestrians, and cyclists in a closed-loop driving simulator used to train and evaluate an autonomous driving agent.

Background

You are on a team building a closed-loop simulation platform for an autonomous vehicle (AV) program. The simulator is used both to train a planning or RL-based ego policy and to run regression evaluations. In addition to the ego vehicle, the simulator must populate the scene with realistic traffic participants: other cars, cyclists, and pedestrians.

The behavior of these background agents turns out to be one of the hardest problems in AV simulation. If agents are too simple, the ego policy learns to exploit their predictability and breaks on real roads. If agents are too unrealistic, evaluation metrics become meaningless.

Your Task

Address the following three parts:

Part 1 — Approaches Describe the main strategies for modeling background agent behavior (e.g., replaying recorded data, rule-based models, learned policies). For each, identify the core tradeoff between realism, reactivity to the ego, controllability, and computational cost.

Part 2 — System Design Propose a concrete architecture for a hybrid agent-modeling system. Cover how agents are selected and routed to different behavior models, how a learned model is structured, how you maintain physical plausibility, and how you achieve controllability for scenario construction (e.g., scripting a specific cut-in or an aggressive driver).

Part 3 — Validation How do you know your agent-modeling strategy is good enough? Define a validation methodology that connects agent quality to downstream ego training and evaluation outcomes.

What is Expected

A strong answer is structured, acknowledges trade-offs explicitly, proposes concrete design choices with justifications, gives rough numbers where useful (latency budget, scale), and identifies the most common failure modes. You do not need to implement code, but referring to specific model architectures, training techniques, or metrics is expected.

Hints

Hint 1

Log replay seems like the easiest and most realistic option — think carefully about what happens after the ego deviates from the recorded trajectory, and how you would detect and handle that moment.

Hint 2

A learned behavior-cloning model trained on human demonstrations will look realistic at first, but think about what happens when it is rolled out for 10–20 seconds in a closed loop. What training technique addresses this?

Hint 3

Realism and controllability pull in opposite directions. Think about how conditioning variables (goal, style, seed) let you get both from the same model, and how you would use that to generate safety-critical scenarios without producing physically impossible ones.