
This project started back in early 2022, with the simple challenge of ‘can I build a program that can navigate the London Underground?’ It turns out, no I couldn’t. Turns out pathfinding algorithms can be a pain.
A year later, I revisited the concept, still with no clue how to go about creating the algorithm, but this time with a lot more programming skill. And this time, I did it. What you see in the image above is the response from trying to navigate from Aldgate East to Hammersmith. It can handle changing lines, too. Here’s an extreme example, one of the 38 given options when going from Reading to Pimlico:

The main thing the program can’t do is handle one-way lines. This has the side effect of believing that you can go from Terminals 2&3 to Terminal 4 on a single Piccadilly train (which doesn’t affect much, as you can on the Elizabeth line anyway)
Note: I didn’t find out until this project was finished that TfL have a public API specifically for this. Whoops. At least this one I made myself 🙂