Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance-related issues #104

Open
epixian opened this issue May 31, 2022 · 16 comments
Open

Distance-related issues #104

epixian opened this issue May 31, 2022 · 16 comments

Comments

@epixian
Copy link

epixian commented May 31, 2022

The current mechanism for calculating nearest border relies entirely on the accuracy of the GeoJSON data. While this dataset is more than adequate to render the outline of countries, it is not well-suited for calculating small distances, as noted in recent (closed) issues below.

#98 - Namibia and Zimbabwe are separated by only 150m, but because that rounds to 0km, it sends the message to players that the two countries actually touch. In this case, it should have rounded to 1km
#99 - Israel - Palestine/Israel - Egypt
#100 - Egypt - Jordan - these are only 8km apart while the game lists them as 45.

Don't get me wrong, I love this game and have played it daily since early April, competing against other family members. Even made a whole Google Sheets tracker with stats and individual win-loss-tie records, breakdowns per day and per region, streaks, you name it. It's a very friendly, but very serious competition.

During this time, we've experienced inaccuracies fouling our individual gameplay, but have since come to expect them. However you mentioned on some of these closed issues that you were going to fix them by rounding to the nearest 50km. I don't think that's a viable solution. Instead of reducing inaccuracies, that seems to standardize them.

On the other hand, countries with lots of points along their borders take a serious chunk of time to evaluate, such as the other day when Russia was the mystery country.

Instead, perhaps there could be a small file containing hard coded accurate values for small distances that could be updated as needed, similar to how the app looks for country name aliases.

@epixian
Copy link
Author

epixian commented May 31, 2022

Btw I'd totally help you with this but I'm a Vue.js guy and don't understand React to save my life :)

@the-abe-train
Copy link
Owner

I understand the concern here, and I expect a lot of people are going to feel the same way when the update goes live shortly. I'm going to leave this issue up for a while to collect feedback from players, and I'll include a link to this discussion in a tweet.

The larger problem is that the distances aren't only inaccurate at short range, they are ALL inaccurate to varying degrees because all the borders in the game are approximations. I've been receiving a constant stream of questions about distances being inaccurate since the "closest border" feature was introduced, and I think the most appropriate solution is to display approximate distances.

I was going to go with the nearest 50km but I think I can use 10km as the rounding bin as long as it is acknowledged that water borders are neglected. In addition, to help ease confusion about how these distances are calculated, I updated the first FAQ to the following:

  1. How is the distance between the answer and my guess calculated?
    Distance between countries is defined as the minimum distance between their land borders along the Earth's surface. Territories (areas that appear in gray when their parent country is guessed) and water borders are not included in distance calculations.

Feel free to react to this post and share your feelings in the thread below!

image
image

@epixian
Copy link
Author

epixian commented Jun 1, 2022

Can you elaborate on what constitutes a water border? I'm guessing a river separating two countries. But what about e.g. the Red Sea?

My assumption is that a river is 0km, while anything larger is subject to normal distance calculations.

@the-abe-train
Copy link
Owner

To be very clear, the distance calculation is the distance between vertices of the polygons that represent countries. If there's space between polygons on the globe, either because the lines are imprecise (e.g. the Israel/Jordan border) or because there's a body of water between them (e.g. the Denmark/Sweden border), then there will be a distance between the countries according to the game's logic.

It's been pointed out to me that Denmark and Sweden share a water border, and the distance between them should be 0, but the game does account for that.

@epixian
Copy link
Author

epixian commented Jun 1, 2022

Did you mean to get rid of the 0km entirely? I was not expecting that in the slightest.

@the-abe-train
Copy link
Owner

I did. The small distances that are almost 0 but not quite 0 were causing the most trouble.

@Hphil
Copy link

Hphil commented Jun 1, 2022

Don’t like new rules. When a shared border is listed as less than 10 km, it’s misleading. Yes, 0 is less than 10, but it causes wasted time looking for a country that’s not on the border. If it shares a border, it should say so. Old rules were better. We’ll see how long i and my friends will continue to play.

@I-am-Erk
Copy link

I-am-Erk commented Jun 1, 2022

I would suggest perhaps having the distance framed as a range. Like: "0-50km", "100-200km", etc.

@epixian
Copy link
Author

epixian commented Jun 1, 2022

I think most people play this game from intuition as to what constitutes "touching", and it would be wrong in my opinion to ignore this when attempting to solve the problem.

Here is my understanding (please let me know if this is more or less consensus or if I'm way off here):

  • Two countries touch if they share a land or river border - distance = 0km
  • Two countries do not touch if the only path connecting them is over a body of water (e.g. islands or between continents) - distance is calculated
  • Two countries do not touch if the nearest path is over a body of water, and an overland path exists via one or more other countries (i.e. excludes Spain and Morocco, Sweden and Denmark, etc) - distance is calculated

I think using the GeoJSON data to calculate distances was a good design decision. For large distances, it's generally reliable and hardly a concern. Small island chains can be problematic but you seem to have a decent solution for correcting that. Even for small distances, when two countries share a common Point in their GeoJSON data, that's also generally reliable. There is one exception to this that I'm aware of, and it's due to oversimplification of the border (Namibia/Zimbabwe):
image

However other areas of the map are just plain BadTM and it's no wonder the distances were off (e.g. Egypt/Israel/Jordan):
image

I think in both examples, we can just correct the GeoJSON data and move on. There are likely other examples of this, and we should apply the same corrective action.

Assuming the GeoJSON borders are good enough, the only remaining errors are perceptual where the player's intuition does not match up with the calculation. Again, we need to establish a consensus on what constitutes touching, and once we have that, you could have a "touching.json" file that instructs the distance utility to return 0km or a calculated value as needed.

@SuperCoolDude
Copy link

SuperCoolDude commented Jun 2, 2022

Today's answer also had an example of this "issue". It said Italy was less than 10km away from Slovenia, but really it should be 0, so it was confusing finding the correct answer since I assumed it COULDN'T be Slovenia.

If you want to make it harder maybe say 0-10 km like someone else suggested, as having it as <10km is a bit misleading.

@princessbear
Copy link

I’m no coder, but I am a geography nut. Please put it back the way it was.

@epixian
Copy link
Author

epixian commented Jun 2, 2022

@SuperCoolDude if you absolutely need to name the mystery country, please only do so after the day has passed so it doesn't spoil gameplay for other people.

@the-abe-train
Copy link
Owner

Given all the confusion, I'm considering changing "< 10 km" to "0 km", and keeping the rest of the update the same. How do the people feel about this?

@epixian
Copy link
Author

epixian commented Jun 2, 2022

@the-abe-train see #107 for addressing the border issues in the middle east. Am happy to help run through any problem areas you have.

@princessbear
Copy link

Given all the confusion, I'm considering changing "< 10 km" to "0 km", and keeping the rest of the update the same. How do the people feel about this?

——-
I would be good with that!

@filbo
Copy link

filbo commented Jun 3, 2022

This discussion reads as if there is a visible distance-o-meter while playing the game. I am not aware of any such thing. Or is it entirely about which color-band a country falls into?

Today's run had the '< 10 mi' / '< 10 km' toggle. I played before I found this discussion; and I found the target country before I noticed the toggle, so I didn't get an impression of what it actually does in live play. As a pure user interface matter, I had no clue what that toggle was meant to do. It should have a tooltip or ... some sort of in situ explanation.

Back to color bands: it would help me a great deal if there was an on-screen table of colors. I'm often misled by thinking 'aha, darkest red!', then my next guess is even darker. I'm not red/green colorblind but I guess my memory for which shade is which is insufficient. Call it 'failing to have absolute pitch' for colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants