The Google Maps public transport routing in London is often sub-optimal. It seems very hesitant to recommend taking the tube - an example recently involved it recommending that I took a 45 minute bus rather than a 10 minute tube journey.
I imagine that the problem is hard - in London you can easily have 10 different bus routes available. Start combining multiple buses in complicated routes and the number of possible routes grows exponentially. It may also be that the system places different value on the variables than me - journey cost, number of changes, the journey time, the likelihood of delay (buses in rush hour can be slow!) and acceptable walking distance all play a part in my selection of routes, but if the algorithm is set up differently then it might produce a different result. I think Google are trying to address this by gathering data about your habits and informing choices based on that (certainly Google Now makes route recommendations based on my location history, and tweaks that based on historical route preference). It will be interesting to see how this progresses.
There's sort of an opposite weirdness in San Francisco which is a bit ironic given where Google is located. Namely, based on various visits, Google seems very big on one taking the streetcar. Now SF streetcars are all very scenic and fun and all that but--with the possible exception of a few routes at non-crowded times of day (if there is such a thing)--useful public transportation they really aren't. (For one thing, there's often a block long line of tourists waiting to get on.)
But, yeah, it's hard. Not sure how you handle it other than just excluding streetcars from the list. (Which might not be a terrible heuristic in SF; locals feel free to disagree.)
I imagine that the problem is hard - in London you can easily have 10 different bus routes available. Start combining multiple buses in complicated routes and the number of possible routes grows exponentially. It may also be that the system places different value on the variables than me - journey cost, number of changes, the journey time, the likelihood of delay (buses in rush hour can be slow!) and acceptable walking distance all play a part in my selection of routes, but if the algorithm is set up differently then it might produce a different result. I think Google are trying to address this by gathering data about your habits and informing choices based on that (certainly Google Now makes route recommendations based on my location history, and tweaks that based on historical route preference). It will be interesting to see how this progresses.