Introducing project Oblio

In the wee hours of Monday morning, while most of my side of the world is tucked away in bed, Europeans sit in stadiums, basking in the shimmering heat rising from black tarmac, and the unmistakable scream of 24 Formula 1 cars. That scream is turned right down on my tv. I don’t want to wake anyone, so I’ve turned all the lights off too. The flickering screen lights the room just enough to see. But I’m so awake; tonight I’m on European time.

This is my first coding blog, and it’s about a software project that burrowed itself into the back of my mind some time during my undergrad years… probably while watching the F1. I wanted to write something that would calculate the fastest path around a given track (for a given car). It should show you the line, the breaking points, how and where to apex. There are so many specific non-trivial questions that one can ask about a racing line, and in lieu of any computational analysis, racers depend on their gut-feelings for answers. Take “turn 8” of Istanbul Park (the Turkish F1 circuit), a sequence of four connected left-handers. You wouldn’t guess by looking at it, but the best approach in a F1 car is to entirely miss the first apex. Someone should write some software, I thought, to answer these questions. It would benefit serious and casual racers and once written could be applied equally well to scale-model racing, marine racing, and cycling.

The project always seemed too daunting. It’s only in the last year that I’ve spent any real time thinking about it. Introducing project Oblio.

Background stuff

The problem has already been tackled … sort of … and solve … ish. Here is a summary of the relevant/related work I’ve come across:

  • F1 teams use racing simulators so that drivers can drive the track over and over, practicing each corner until they’ve perfected them. Check out the Red Bull simulator based on the rFactor physics engine.
  • In Colin McRae Rally 2, the video-game, the AIs are trained neural networks. The neural networks are trained to control the cars — how to steer, brake, and accelerate to get the car to follow the driving line, given that the car will slide around on the road. The driving line, however, was pre-determined… not solved (ref).
  • Gran Turismo also used pre-determined driving lines for its AIs.
  • There are generic optimisation algorithms, such as “A*”, which may be adapted to this problem. However they are more commonly used to find the shortest path, not the quickest path, and it is unclear (to me) whether they would be computationally feasible. Have a look at a book called “AI Game Programming Wisdom”.
  • RARS has been inactive for 7 years now. It was an on-line race driven between ai-driven cars. The developers would not know the track prior to the race, so the cars had to use input from their simulated environment to control themselves automatically. Most of the ideas are pretty basic. Examples include using imaginary probes in front of the car that push off oncoming walls to keep the car on the track — too primitive really.
  • There is a really fun document by Brian Beckman called “The Physics of Racing“. Brian covers a huge number of areas including tyre grip budgets (distributed between cornering, braking, and acceleration), suspension (their response to bumps in the road). A couple of chapters are dedicated to analysing cornering strategies, but these are restricted to isolated corners.
  • Thomas Gustafsson from Linköping University has addressed my question in his thesis, “Computing The Ideal Racing Line Using Optimal Control“. His simulations require hours (even days) to run on a server. This precludes implementing his method in consumer software (and forget about the iPhone app). Nevertheless, Thomas’s work provides some great insights.

… post to be continued.