News for hackers. Stuff that matters.
Re:Worldle by mypalmike on Thursday February 17, 2022 @03:46AM (#30370881)
> I have a feeling that's a bit more difficult than centers, though.

This is quite an understatement.

Re:Worldle by 3np on Thursday February 17, 2022 @04:00AM (#30370982)
Given it's a static dataset of countries, the distance of all country pairs could all be precomputed and loaded in memory, I guess ¯\_(ツ)_/¯
Re:Worldle by mypalmike on Thursday February 17, 2022 @04:55AM (#30371358)
True. But to perform that precomputation, you have to find a database of country geometry outlines. And (manually?) filter out things like Hawaii and Guam from these. Then, assuming country geometry is given as lat lon polygons, it seems you then are computing either O(n^2 * m^2) distances where n is the number of countries and m is the average number of vertices per country. Or you might come up with some space partitioning algorithm on the vertices to reduce that to maybe O(n^2 * m log(m)). It's doable, but my comment was merely pointing out that it's much more complex than comparing country centers.
Re:Worldle by Aeolun on Thursday February 17, 2022 @06:00AM (#30371790)
Oh, good point. Getting an SVG of the world and just brute forcing every country would be near instant.
Re:Worldle by mypalmike on Thursday February 17, 2022 @11:50AM (#30375296)
Hmm. What issue might you encounter trying to solve this problem using an SVG?