Inspiration

We thought this would be a fun project to do because everyone loves Wikipedia races, and we are both studying searches in AI class this year.

What it does

Our code runs a bidirectional BFS on a Wikipedia page to find shortest route to the target page.

How we built it

We're using an ASP.NET Forms for our server and our search is running in C#, making HTTP requests to the English Wikipedia API

Challenges we ran into

Searching

To begin our project we had to learn how to use the Wikipedia API, but once we formatted our calls correctly it was fairly straightforward to extract the data we needed from the text. We encountered some limitations within the Wikipedia API, which forced us to change the specifics of our code (namely we wanted to only use links found within certain sections of an article, but the API did not provide information on the location of links). Although we both had experience with the A* and BFS algorithms, we encountered challenges implementing a bidirectional BFS while ensuring that the shortest path was always the one returned.

Server

We had essentially zero experience with server backend and frontend, but we managed to get our application working on the server side and to except user input.

Accomplishments that we're proud of

The final version of WikiSolver is orders of magnitude faster than its initial stages, and runs in less than 30 seconds on many test cases. We also removed most of the outstanding bugs in our code to ensure that the shortest path is the one returned.

What we learned

How to use Wikipedia's API, how to make HTTP requests from c#, reading information from the JSON format, and how to create a server to run our code

What's next for WikiSolver

We could expand this application to return a larger number of paths of equal length, to only use links from within the body of the article (which is possible but would require significant modifications to our http requests)

Built With

Share this project:

Updates