Tuesday, April 30, 2024

My First Tesla FSD Experience (12.3.4)


I've been keenly following Tesla since about 2015, and autonomous driving since 2005. As a recent University of Waterloo CS grad in 2005, I even looked into getting involved in the 2007 DARPA Grand Challenge for urban driving. Watching Autopilot progress these last 8 years has been incredible to witness, if from afar.

I've always shied away from wasting Tesla's time for a demo drive, since none of the current Tesla models are a good fit for our family of 4 kids: The Model Y seven seater doesn't have enough leg room (we're pretty tall people), and the Model X is too expensive. But recently Elon said if you're an investor, you really must go experience FSD to understand where the company is headed. And with all of the buzz surrounding V12, I couldn't resist any longer.

After so many years, to finally sit in the driver's seat and tap down to enable FSD, then feel the car come alive. Wow.

Where it Shines


It really works! What is clear is that Tesla has made a huge amount of progress. V12 is well on the way to being a great driver. Round-abouts? Sure thing! Busy expressways that are tricky for even me as a human driver? No problem.

Human-like smarts: Sometimes FSD does things that really impress, such as when I was approaching a stop light and a large tractor trailer was turning left into the oncoming lane beside me. FSD stopped about 15 feet short, as I would on a good day, and the truck made use of that part of my lane to complete its turn, after which FSD moved up to the line. Or on an expressway, where it pays attention to people signaling to enter your lane, making good decisions about whether to slow down and let them in, or just to slow down a bit defensively incase they do but continuing past them if letting them in would require slowing down too abruptly. It even seemed to have a sense, when driving in the left lane of a city street, that if someone pulled out to pass, it should move over to the right lane.

Perceptual accuracy: I quickly came to trust that the system was accurately perceiving stop signs, stop lights, speed limit signs, etc.

Visualizations: Anyone who has followed the progress of FSD knows that the on-screen visualizations are great, helping the driver trust the system.

Freeing up your cognition: As people have remarked, one of the advantages to a supervised FSD system is that it frees up your mind so that you have more mental resources to be on the lookout for dangerous things, resulting in a really nice computer/human synergy.

Acceleration: Everyone knows that Teslas can punch it, but it was delightful to find out that FSD makes use of that acceleration. It makes being driven around feel just a little bit like a roller coaster ride, in a good way.

Automation to the max: Self driving is at its core about moving the car from point A to point B autonomously, but it dovetails with all of the other automation Tesla has implemented, such as not having to unlock or lock your vehicle when you enter/exit, pairing control settings with the person driving, being able to speak your destination (e.g. "take me to Tim Hortons"), not having to turn your lights on/off, not having to turn windshield wipers on/off, etc. As an efficiency minded software guy, I love it!

Areas for Improvement


FSD is an amazing experience, but there are lots of obvious areas for improvement.

Merging last-minute: In every situation where my lane was ending, where any good human driver would merge as soon as it is safe, FSD would drive all of the way to the end until it was forced to merge, even if there was a curb or guardrail that it would hit if it were unable to merge. In each of these cases, there weren't vehicles to my left to prevent the merge, and maybe FSD knew that, but even so this strikes me as poor driving and feels extremely unsafe, which produces anxiety. I was surprised that FSD would drive like this after so many years of development.

Not always helping people merge: A few minutes into my drive, I was on an expressway, and a large pickup truck was taking an on-ramp to enter the expressway, pulling alongside my car to the right. Because the onramp was quite short, the driver seemed to decide not to try to pull in ahead of me, as if to hint that I should accelerate to let him in behind me, but FSD just cruised along directly beside the pickup as they were quickly running out of time to merge. After a few seconds, I felt I needed to intervene for safety, so I accelerated quickly to allow the pickup to merge. Thinking back, I'm not sure the pickup had their blinker on, but even if not, FSD needs to be smarter in situations like this.

Stopping too abruptly: In one case, the traffic ahead slowed because, unbeknownst to me, a vehicle ahead was disabled in my lane. Instead of coming to a stop gradually, FSD seemed to wait until the last minute, and then applied the brakes fairly heavily, which was quite uncomfortable, and created an increased risk for being rear ended. (There was indeed a vehicle behind me that stopped fairly close to me.) In another case, I was approaching a roundabout, and the car was faced with an ambiguity that human drivers are commonly faced with: Is that other car in the roundabout going to exit, allowing me to proceed, or is it going to stay in the roundabout, forcing me to stop? FSD behaved like it was assuming the other car was going to exit, but that car did not exit, so FSD had to brake fairly abruptly.

Missing opportunities to turn: In one case, I was turning left to exit a road, with an oncoming car approaching, and it was safe for the car to proceed, but it was hesitating and looked to not be taking the opportunity, so I pressed the accelerator. In another case, I was making an unprotected left turn to enter a road -- it had a safe opportunity, but didn't take it, and then I was left with my nose uncomfortably far into the lane. In another, I was entering a road by turning right, and it had a safe opportunity that it apparently was not going to take, so I pressed the accelerator.

Getting in a turn-only lane when needing to go straight: At one point the nav was directing me to drive straight through an intersection, but inexplicably FSD turned on the right signal and started changing lanes into a right-turn-only lane. I intervened to prevent it from doing so.

Wobbling back and forth when changing lanes: About 30 seconds into my drive, the car needed to move right into the right-turn lane. It hesitated, and then a second after initially starting to move right, it swayed back to the left, but there was a car directly ahead of me in my lane, creating a fear that it might collide with it. It then turned back right again, successfully changing lanes, but this didn't leave me feeling very confident. This pattern of hesitating and then wobbling right-left-right happened a number of times over the course of my drives.

Not leaving enough space for curbs: For the most part, FSD did just fine here, but sometimes it would get close enough to a curb parallel to my direction of travel that I felt a little uncomfortable and nudged the car a little to add some space. In one case, as I was exiting a round-about, there was a curb that formed a U shape that I definitely would not want to hit, and evidently several drivers had hit it, because it was badly chipped. FSD was heading uncomfortably close to it. I don't think it would have hit it, but I intervened so as not to take any chances.

Stopping 1-3 feet short: A common pattern is that FSD would stop 1 foot or more short of the stop line, and then would sometimes creep up.

Proceeding through intersections too slowly: In a couple of occasions, I was at a T intersection and the car was needing to turn left. It was clearly safe to do so, but the car seemed to pause briefly, and then proceeded but quite slowly for a few seconds. Any car behind me would have likely felt impatient, wondering what was going on. No honks though, thankfully.

Imperfect auto-wipers: As I have seen people bemoan online, the auto-wipers are not perfect. I would give them a score of 7.5 / 10. There were two occasions where they came on for 1-3 minutes with no rain on the windshield, and there was once they did not come on for a few minutes when they ideally would have. For the most part, however, they worked well, and made me smile.

Supervising Can be Tricky


For the most part, playing the role of supervisor works well, but sometimes it can be tricky.

I had one quite unfortunate thing that happened during my demo drives: I needed to turn right, but the street I was turning onto had that lane fully blocked due to construction. At first I was curious: Would FSD navigate the construction correctly? But as it was turning right, I suddenly panicked: It was turning into the left-turn lane for the oncoming direction of traffic. I panicked and stopped the car, now at a 45 degree angle, unable to continue driving in the direction I had been without backing up. Presumably the construction had fully closed the street for my direction of travel. Ugh. Even worse, a car behind me must have been fooled by FSD turning right and had followed me, now pretty close behind me, limiting my options to try to back up a little and get back on the road I had been turning off of.

The final salt in the wound was that in my panic, once I had backed up a little, instead of hitting down on the stalk to put it into drive, I got confused and hit up again, keeping it in reverse, so when I gave it some gas, I lurched even further backwards, almost hitting the car behind me. I was mortified and shaken, and it was pretty hard to enjoy the drive after this point.

After I got going back on the road I had been turning off of, I noticed the car behind me proceeded to turn right, as did the car behind them, so I suspect FSD was actually doing the right thing, and it was me as the supervisor that got spooked and didn't understand how the construction was detouring traffic. But the experience made me realize that, while supervising usually works well, sometimes the car can make a move and your ability to evaluate the movement struggles to keep up, potentially putting you in a bad situation.

This highlights that there really is both reward and risk to inviting people to broadly come and try FSD on a demo drive. The risk of people having this type of experience, paired with all of the needed areas for improvement, some of which affect the safety of the drive, could leave your every day buyer feeling pretty nervous, even overwhelmed.

Thoughts and Conclusions


I'm so glad I had this opportunity to experience FSD. It is a remarkable piece of technology that is rapidly improving, saving lives already, and will save many in the years to come. It seems very likely that Tesla will successfully develop it into a robotaxi product, and I can't wait to see that unfold both in terms of the technology, and how society evolves because of it.

It was also a front row seat to experiencing all of the rough edges that remain. FSD is definitely not where it needs to be as of April 2024 to be a robotaxi, at least in Waterloo Ontario, and so I'm very curious to see how quickly it will improve. Will this new end-to-end neural architecture + massive compute be the last big piece to get it there, at least in limited geographies? Or will there be more architectural evolutions necessary, which may take years plural?

After my demo drive, one of my reactions was to be thankful that Elon has the guts to make this happen. Selling a product like this over the last 8 years hasn't been for the faint of heart, because the imperfections can and have led to some very bad outcomes. But like Elon, I believe that the good that has and will come from this technology hugely outweighs the bad. Easy to say, but harder to stay the course and take all of the heat along the way. I'm also thankful for all of the customers that have been doing a great job actually participating in the birthing of this new capability, putting themselves on the line to test the software, provide feedback both to Tesla and to the community, even helping to finance its development. It's pretty neat that this effort to some degree has been crowdsourced. Some would view that as inappropriate, but I think it's such a beautiful thing to take people along for the journey, giving them an opportunity to be a small part of making something that will change the world and save so many precious lives.

Saturday, July 18, 2020

Parsing Flight Searches Using GPT-3



Experimenting with GPT-3 this week has been a lot of fun, and startling at times.  In addition to quick experiments, I wanted to see what it would be like to try building something "real".

Let's say we're working for an airline, and they'd like their website's search box to be able to handle searches like "flight from Toronto to Orlando on September 9 for under $300", giving the appropriate search results.

Our goal is to convert that to the following Wolfram Language representation:

<|
    "Input" -> "flight from Toronto to Orlando on September 9 for under $300",
    "Expression" -> Entity[
        "Flight",
        <|
            "From" -> Entity["City", {"Toronto", "Ontario", "Canada"}],
            "To" -> Entity["City", {"Orlando", "Florida", "UnitedStates"}],
            "When" -> DateObject[{2020, 9, 9}, "Day", "Gregorian"],
            "Price" -> LessThan[Quantity[300, "USDollars"]]
        |>
    ]
|>

The part we'll use GPT-3 for is to convert the search string to the following:
 
Entity[
    "Flights",
    {
        "Price" -> "Under $300",
        "From" -> "Toronto",
        "To" -> "Orlando",
        "When" -> "September 9"
    }
]

Once we have that, we can use the Interpreter function in Wolfram Language to convert things like "Toronto" to a fully resolved reference like Entity["City", {"Toronto", "Ontario", "Canada"}].

To "train" GPT-3 to do the mapping, we'll include a long preamble with all of our API requests, consisting of examples. For example, to parse the above search string, we'll send the following to GPT-3, where the red text indicates the search string we'd like parsed, and the highlighted text indicates what GPT-3 returns to us:

Phrase: flights from Toronto to Orlando
Object: flights
Descriptors: {from Toronto, to Orlando}
Attributes: {origin, destination}
Representation: Entity["Flights", {"From" -> "Toronto", "To" -> "Orlando"}]

"""

Phrase: first class flights from Vancouver to Tokyo on July 18
Object: flights
Descriptors: {first class, from Vancouver, to Tokyo, on July 18}
Attributes: {class, origin, destination, date}
Representation: Entity["Flights", {"Class" -> "First", "From" -> "Vancouver", "To " -> "Tokyo", "Date " -> "July 18"}]

"""

Phrase: from Shanghai to Dubai on the evening of September 22, window seat
Object: flights
Descriptors: {from Shanghai, to Dubai, on the evening of September 22, window seat}
Attributes: {origin, destination, when, seat column}
Representation: Entity["Flights", {"From" -> "Shanghai", "To" -> "Dubai", "When" -> "Evening of September 22", "SeatColumn" -> "Window"}]

"""

Phrase: isle seat for flight from Buffalo New York to Miami Florida next Thursday
Object: flights
Descriptors: {isle seat, from Buffalo New York, to Miami Florida, next Thursday}
Attributes: {seat column, origin, destination, when}
Representation: Entity["Flights", {"SeatColumn" -> "Isle", "From" -> "Buffalo New York", "To" -> "Miami Florida", "When" -> "Next Thursday "}]

"""

Phrase: cheap flights to orlando in February
Object: flights
Descriptors: {cheap, to orlando, in February}
Attributes: {price, destination, when}
Representation: Entity["Flights", {"Price" -> "Cheap", "To" -> "Orlando", "When" -> "in February"}]

"""

Phrase: book a flight to rome this Saturday, departing between 9 AM and 11 AM
Object: flights
Descriptors: {to rome, this Saturday, departing between 9 AM and 11 AM}
Attributes: {origin, destination, when, when}
Representation: Entity["Flights", {"Destination" -> "Rome", "When" -> {"this Saturday", "departing between 9 AM and 11 AM"}}]

"""

Phrase: red eye back to Boston tomorrow night
Object: flights
Descriptors: {red eye, back to Boston, tomorrow night}
Attributes: {when, destination, when}
Representation: Entity["Flights", {"Destination" -> "Boston", "When" -> {"red eye", "tomorrow night"}}]

"""

Phrase: flight from Toronto to Orlando on September 9 for under $300
Object: flights
Descriptors: {from Toronto, to Orlando, on September 9, for under $300}
Attributes: {price, origin, destination, date}
Representation: Entity["Flights", {"Price" -> "Under $300", "From" -> "Toronto", "To" -> "Orlando", "When" -> "September 9"}]