Patent attributes
Aspects of the disclosure relate to controlling a first vehicle in an autonomous driving mode. While doing so, a second vehicle may be identified. This vehicle may be determined to be a tailgating vehicle. An initial allowable discomfort value representing expected discomfort of an occupant of the first vehicle and expected discomfort of an occupant of the second vehicle may be identified. Determining a speed profile for a future trajectory of the first vehicle that meets the value may be attempted based on a set of factors corresponding to a reaction of the tailgating vehicle. When a speed profile that meets the value cannot be determined, the value may be adjusted until a speed profile that meets the value is determined. The speed profile that meets an adjusted value is used to control the first vehicle in the autonomous driving mode.