isRelatedTo

Motivation:
The core idea behind this project originated when I came upon the concept of Six Degrees of Separation. It says that all people are six, or fewer, social connections away from each other. So given two people, suppose Alice and Bob, if I start doing a search from Alice, can I find out the string of events/places/people that connect her to Bob? Would the results be interesting?
Goal:

Input: Graph G = (V, E) like Wikipedia, source node u, target node v
Output: Some directed path connecting u to v
The path is directed. This means that the path from v to u would be different.

Solution:

We turn to Wikipedia. The assumption is that if there was a person/event/place of interest in Alice's life, then Wikipedia has it documented and has a link to said event. We collect all the links in Alice's wiki page, then collect the links in all of those pages, and so on, until we hit our target, the wikipedia page for Bob. Instead of sending GET requests to potentially thousands of pages, we instead use a heuristic to rank the pages we have seen so far, and assign them a rank. The page with the highest rank is always selected as the next page to explore.
The heuristic itself is pretty simple. We collect all the links in Bob's page. For every page p that we see when we start exploring from Alice's page, we see how many of the links in p are common with the links in Bob's page. The greater then number of common links, the higher is p's overall rank.
For those familiar with the algorithm, this is a direct application of the Best First Search used in AI.
Note that this is just one link between the 2 pages. It is not the shortest link. It is not all the links. It is just one link between the source and the target.

Experimental Setup and Code:
The code is written entirely in JAVA by me. I did not use any libraries because I wanted to also see what writing a text parser for a website looked like. The JAVA code can be found here.
To run the code, make the following changes:
1) In the file WWWE.java, change the SEED_URL = "wiki/Greg_Mitchell" to your source wiki page link. This will be treated as the source vertex, u
2) In the same file, change the targetSearchQuery = "/wiki/Karin_Thürig" to your target wiki page link. This will be treated as the target vertex, v.
3) That's it. Go to Main.java and run the code.
Do note that the SEED_URL does not have the forward slash in front while the targetSearchQuery does.

Results and Observations:
1) Let's start with some links that we do know the relation between. Consider Idris Elba and Robert Downey Jr. Both of them have been a part of MCU. So we could expect some link between them from there.
This is what we get:
Trace Path:
/wiki/Robert_Downey_Jr.
/wiki/List_of_Marvel_Cinematic_Universe_films
/wiki/Marvel_Studios
/wiki/DC_Comics
wiki/Idris_Elba
As it turns out, Idris Elba played the character of Roque in a movie adaptation of DC Comic book named "The Losers". DC Comics wiki page has to contain Marvel.

2) Now let's consider 2 links that may not be that obvious. What about the Dalai Lama and Michael Jackson.
Trace Path:
/wiki/Michael_Jackson
/wiki/List_of_Billboard_Hot_100_chart_achievements_and_milestones
/wiki/Aretha_Franklin
/wiki/Condoleezza_Rice
/wiki/Central_Intelligence_Agency
wiki/Dalai_Lama
Turns out CIA had a program "to keep the political concept of an autonomous Tibet alive within Tibet and among several foreign nations". Condoleezza Rice worked with the CIA and also was a piano player. She performed with Aretha Franklin. Aretha was ranked 19th among the Billboard Hot 100 All-Time top artists, which also contained Michael Jackson.