- Wikipedia Philosophy Hops Program (From XKCD)
- 25 May 2011 10:05:31 pm
- Last edited by merthsoft on 20 Jun 2011 08:49:15 pm; edited 3 times in total
I made a program to test the hypothesis set out by today's xkcd, specifically that:
Most people who have tried this at this point know that there are some cycles and such, but it's fun to watch it go, and I'd like to start collecting statistics about how many loops and stuff. My friend made this prediction:
Here's a screenshot of it going:
If anyone wants to try it (and has a Windows computer or Mono installed on their Max/Linux computer) you can get it at:
http://merthsoft.com/WikiPhilosophy.zip
It uses .net 2.0.
If you just run it straight it starts from a random page, if you give it a command line parameter it will use that url (it can be anything, even not from wikipedia, but that'll go bad really quickly).
There are some kinks, and so sometimes it just gives up what it's trying, but it does detect loops. It doesn't currently collect and stats other than the the number of hops. I'll improve that later.
Once it gets to philosophy or finds a loop, it waits until you hit a key and then grabs another random page and tries it again.
Quote:
... if you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at "Philosophy".
Most people who have tried this at this point know that there are some cycles and such, but it's fun to watch it go, and I'd like to start collecting statistics about how many loops and stuff. My friend made this prediction:
Quote:
80% of all articles will have a finite number of hops, median number of hops (among those articles with a finite number) will be about 18, max (finite) number of hops will be about 200.
Here's a screenshot of it going:
If anyone wants to try it (and has a Windows computer or Mono installed on their Max/Linux computer) you can get it at:
http://merthsoft.com/WikiPhilosophy.zip
It uses .net 2.0.
If you just run it straight it starts from a random page, if you give it a command line parameter it will use that url (it can be anything, even not from wikipedia, but that'll go bad really quickly).
There are some kinks, and so sometimes it just gives up what it's trying, but it does detect loops. It doesn't currently collect and stats other than the the number of hops. I'll improve that later.
Once it gets to philosophy or finds a loop, it waits until you hit a key and then grabs another random page and tries it again.