Six Degrees of Wikipedia, the gameplay
As we've seen in the previous chapter, the Six Degrees of Wikipedia game is a play on the concept of the six degrees of separation theory—the idea that all living things (and pretty much everything in the world) are six or fewer steps away from each other. For example, a chain of a friend of a friend can be made to connect any two people in a maximum of six steps.Â
For our own game, the goal of the player is to link any two given Wikipedia articles, passing through six or fewer other Wikipedia pages. In order to make sure that the problem has a solution (the six degrees of separation theory has not been demonstrated) and that indeed there is a path from our starting article to the end article, we'll pre-crawl the full path. That is, we'll begin with a random Wikipedia page, which will be our starting point, and we'll link through a number of pages toward our destination, the end article. The algorithm for picking the next linked page will be the simplest...