Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5

Author Topic: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy  (Read 9445 times)

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #45 on: March 05, 2012, 06:21:40 pm »

Unless you happened to get there before you went through all one hundred million, and that seems likely.

Reelya

  • Bay Watcher
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #46 on: March 05, 2012, 06:25:43 pm »

Yes, but we're talking about search ALL links off each page, before deciding which route to take. How can you "find" the route when you're searching all the links in parallel?

This is the domain of search algorithms as seen in chess etc. Have you looked at how quickly modern supercomputers CPU and RAM gets swamped by even relatively simple games?

You can do depth-first or breadth-first search. My comment was in response to someone wishing that the program found shorter routes. i.e testing ALL routes even after one existing one is found (assuming you're using depth-first search). But with "depth first" you need to explore an unknown number of bad routes before finding the good route. And with breadth-first you search all links off each possible route in parallel until one of the routes is a winner. Both have pro's and con's.

If you want the "shortest route" as the person wishing for the Xefer algorithm to be improved did, then you have to keep searching even after a single route is found.
« Last Edit: March 05, 2012, 06:29:33 pm by Reelya »
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #47 on: March 05, 2012, 06:29:14 pm »

Unless you searched full breath before depth.
If you searched your entire tier X depth, then you can be sure that x + 1 will be longer, thus you can stop at the first result.

Reelya

  • Bay Watcher
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #48 on: March 05, 2012, 06:30:17 pm »

Yes but that's likely to be minimum of 5 links, hence the 100 million routes i talked about. And '40' is just a guesstimate. Many pages will have more than 40 links.

Plus the memory needed to keep track of all the URLs for the various links and searching the database constantly to check that each new URL isn't on another page's path already, all for some lame web joke game.
« Last Edit: March 05, 2012, 06:32:10 pm by Reelya »
Logged

Qmarx

  • Bay Watcher
  • "?"
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #49 on: March 05, 2012, 06:31:26 pm »

Easiest just to start at philosophy and search backwards.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #50 on: March 05, 2012, 06:32:55 pm »

Yes but that's likely to be minimum of 5 links, hence the 100 million routes i talked about. And '40' is just a guesstimate. Many pages will have more than 40 links.

Plus the memory needed to keep track of all the URLs for the various links and searching the database constantly to check that each new URL isn't on another page's path already, all for some lame web joke game.
Persuading argument, would be very fun to test though...

Easiest just to start at philosophy and search backwards.
Good god man, are you trying to break the internet?

Qmarx

  • Bay Watcher
  • "?"
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #51 on: March 05, 2012, 06:51:39 pm »

Good god man, are you trying to break the internet?

You'd only have to access each page on wikipedia once to build a database.  The algorithm would be pretty simple, too.  You'd have to go through the whole 31 gb data dump, but that shouldn't be that hard.

There's already an option for 'pages that link to this page', after all.
Logged

Sensei

  • Bay Watcher
  • Haven't tried coffee crisps.
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #52 on: March 05, 2012, 07:23:55 pm »

Also: http://en.wikipedia.org/wiki/Michel_Folco
Ha! No links, eat that, theory!
I went on there and fixed it. Personally.

« Last Edit: March 05, 2012, 07:25:40 pm by Sensei »
Logged
Let's Play: Automation! Bay 12 Motor Company Buy the 1950 Urist Wagon for just $4500! Safety features optional.
The Bay 12 & Mates Discord Join now! Voice/text chat and play games with other Bay12'ers!
Add me on Steam: [DFC] Sensei

Criptfeind

  • Bay Watcher
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #53 on: March 05, 2012, 07:26:00 pm »

Easiest just to start at philosophy and search backwards.

You would have the exact same issue. It gets exponentially bigger each time you don't get the link to it.
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #54 on: March 05, 2012, 07:56:56 pm »

Try The Onion again.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #55 on: March 05, 2012, 08:01:27 pm »

I went on there and fixed it. Personally.
But now you are invoking the exception that proves the rule... Do you mean to imply that there are French writers that are not human?

Qmarx

  • Bay Watcher
  • "?"
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #56 on: March 05, 2012, 08:51:10 pm »

Easiest just to start at philosophy and search backwards.

You would have the exact same issue. It gets exponentially bigger each time you don't get the link to it.

What do you mean by exponentially bigger? 

You're essentially building a tree iteratively starting from 'philosophy', right? 
All you're doing, then, is going through and building an array of articles, and which article they're attached to on the shortest path.  If you do breadth-first, you'll handle all of the articles in a non-descending order by degree of separation.  So find a link, check to see if it's in the array, if it isn't, add it to the end of the list and record what the article it's linked to (along with degree of separation if you like),


While towards the end (article 3.5 million or so) there might be a bit of slowdown when you start to check whether the article is already added, but I'm fairly certain there are algorithms that handle that sort of thing elegantly.
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #57 on: March 05, 2012, 09:04:12 pm »

Yes, but by going for a known target each time, the philosophy article, you can store heuristics on each URL reference (you've already needed to create a graph of the URLS links) which says the number of steps to philosophy. You can also look for "trunk" articles and avoid "leaves' in the graph.

That only needs to be done once, and all future searches could just follow the "path of least resistance" (just pick the link with lowest steps number) as in A* search.

With a "moving target" you'd need to work out a new set of heuristics for every search.
« Last Edit: March 05, 2012, 09:06:01 pm by Reelya »
Logged

JoshuaFH

  • Bay Watcher
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #58 on: March 05, 2012, 09:06:00 pm »

So what's the longest you could find? Mine is Arthur Tyndall at what I think is 30 steps.

EDIT: Holy moly. Tried just pasting the code for the image export, but the chunk for it's image location is 107,000 characters long, and I don't want to bother hosting it myself.
« Last Edit: March 05, 2012, 09:07:49 pm by JoshuaFH »
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Xefer Wikipedia Radial Graph - All Roads Lead to Philosophy
« Reply #59 on: March 05, 2012, 09:07:11 pm »

Swimming at the 1904 Summer Olympics – Men's 440 yard breaststroke
32 links.
Pages: 1 2 3 [4] 5