[Developers] Kevin Bacon game via Freebase
Philip Kendall
philip-freebase at shadowmagic.org.uk
Tue May 5 13:33:05 UTC 2009
On Mon, Apr 27, 2009 at 04:47:54PM -0700, Barak Michener wrote:
>
> So you can actually break the query up like so (for 3-ply):
[ ... ]
> In general, for $PLY >= 2, you build two queries the same way you
> currently do, each of depth $PLY/2, with one taller if the number is
> odd, with the two endpoint ids at the deepest points. You'll always have
> an intermediate actor at the top. You can then read from the inside-out
> of "a:film" and then run outside-in down "b:film" to form the page.
>
> Query redangling is always fun and interesting. "Flatter" queries tend
> to work better. With this you should be able to fare a bit deeper.
Thanks. Implementing that does seem to have helped a lot :-)
http://kevinbacon.pak21.user.dev.freebaseapps.com/
I haven't been able to find a query which times out when a link between
the two actors does actually exist -- does anyone have any thoughts on
how to detect if really isn't a link between two actors, or am I going
to be best just capping the search at (say) a ply of 10?
Cheers,
Phil (still looking for a graphic designer if there's anyone out there!)
--
Philip Kendall <philip at shadowmagic.org.uk>
http://www.shadowmagic.org.uk/
More information about the Developers
mailing list