Aspects of the disclosure relate to routing an autonomous vehicle. For instance, the vehicle may be maneuvered along a route in a first lane using map information identifying a first plurality of nodes representing locations within the first lane and a second plurality of nodes representing locations within a second lane different from the first lane. While maneuvering, when the vehicle should make a lane change may be determined by assessing a cost of connecting a first node of the first plurality of nodes with a second node of a second plurality of nodes. The assessment may be used to make the lane change from the first lane to the second lane.