4 ms·
So what is the percentage indicate separately from the distance? I think the "right" way to display the distance would be from the closest points in the guesse
by function_seven 5y ago
So what is the percentage indicate separately from the distance?
I think the "right" way to display the distance would be from the closest points in the guessed and target territories. So United States and Canada, sharing a border, would be "0 km", while Canada and Mexico would be whatever the shortest path from border to border would be (like 2,000km?)
I have a feeling that's a bit more difficult than centers, though. But it wouldn't be a problem as far as outlying territories go; the image is of a contiguous landmass, not the entire country.
- polishdude20 5y agoBut then you get Canada and you instantly know it's the USA next.
- Ansil849 5y ago> But then you get Canada and you instantly know it's the USA next. So in your hypothetical scenario....this hypothetical player would know that the only country Canada has a land border with is the USA, but not know what the USA looks like so as to be able to solve this without first guessing Canada? This seems improbable to me. Chances are that if someone knows enough about a country that it's a 'single neighbor' country, or that it has a 'single neighbor' country, they will also know what the country looks like. For example, if someone instantly knows that if they typed in Haiti it must then be the Dominican Republic, chances are very high that they wouldn't have typed Haiti because they also know what the Dominican Republic looks like. Much like chances are high that if someone knows that Canada only borders the USA, they also wouldn't have typed Canada in the first place, but would have guessed USA right away.
- mcorning 5y agoIt's really a shame the developer didn't add this feature. One might be scared off by the large number of geometry files involved with this, but actually this is a great example of when hard coding can supersede dynamic/robust code. It would be better to simply store an object of all countries borders and the their relative direction to one another. I could see this being a slight issue with countries that share a border with another that is many directions of their border (Lesotho and South Africa, for example), but it would still be much less deceptive than saying "the USA is 2000km south of Canada."
- laurent92 5y agoInteresting because, between easy-and-wrong and hard-but-perfect, there is the solution of subtracting the size of each country from their distance.
- cmeacham98 5y agoAssuming by "size" you mean something like average/longest distance from the center this is the worst possible answer because it's super non-intuitive and can create crazy results like negative answers.
- mypalmike 5y ago> I have a feeling that's a bit more difficult than centers, though. This is quite an understatement.
- 3np 5y agoGiven it's a static dataset of countries, the distance of all country pairs could all be precomputed and loaded in memory, I guess ¯\_(ツ)_/¯
- mypalmike 5y agoTrue. 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.