Tesla·Machine Learning Engineer·Technical Phone Screen
- Given raw trajectory data of shape [batch, num_waypoint, 2] sampled at 10 Hz, implement an RL reward function that enforces speed limits. Specifically, provide two variants: one that counts or sums waypoints where speed exceeds the limit, and one that penalizes proportionally to how much the speed exceeds the limit at each waypoint.
- How would you handle a speed limit that changes partway through the trajectory, for example 50 mph for the first two seconds and then 30 mph for the remaining three? And if the answer is just 'recompute the reward with state-dependent limits,' why is that insufficient from a policy design standpoint?
“The two-variant part is actually pretty clean to implement once you figure out that speed between consecutive waypoints is just the Euclidean distance divided by the time step (0.1s at 10 Hz).”