From UBC Wiki


Authors: Jack, Ethan, Jillian
GitHub repo here

What is the problem?

The Greater Vancouver Area covers an enormous amount of area, and it has a transit system to match. Unfortunately, this system can be confusing and difficult to navigate, especially for people who are new to the city. Many students at UBC, for instance, are from cities across Canada and around the world. We will investigate the feasibility of using first-order logic programs to allow users to query the system to figure out one of two things: a) how to get from UBC to one of the many landmarks around Metro Vancouver, and b) which locations are accessible along which routes, whose starting point is UBC.

What is the something extra?

As most transit apps of today's world operate, we will take into consideration bus transfers to get to specific locations, as well as options for least walking vs least buses taken (with a maximum walking amount).

What did we learn from doing this?

Our project attempted to find the best route to landmarks within Vancouver using the public bus system from UBC (or from any stop going east as expanded scope). One of our initial challenges was to figure out how to represent bus routes and landmarks in prolog in a structure that we can easily navigate through and query over. We ended up with a structure similar to a linked list for the bus routes where a stop will also have an id for next stop. This allowed us to quickly traverse down bus routes to figure out paths to each landmark. Our next challenge was to write code to efficiently get results from our data. This was difficult but the end result was a fairly simple few lines of prolog that nicely returns the estimated travel time per route to a specified landmark. Our final data structure did not make it easy to handle potential bus transfers but with some alterations to the bus stop structure this should be possible. The relative simplicity of our final code and the connected map-like structure of the data leads us to believe that logic programming is suitable for this task.