Advanced

Re: GC9Q7T6 - Checker request

[Resolved] GC9Q7T6 - Checker request
August 19, 2022 01:30PM
I like to request a checker for GC9Q7T6. There is a different checker for this GC-code already, but unfortunately this challenge was not accepted by the reviewer, so I like to change this checker to the following conditions:

Find a cache in 4 countries on each of 2 continents (= a total of 8 unique countries)
OR
Find a cache in 3 countries on each of 3 continents (= a total of 9 unique countries)
OR
Find a cache in 2 countries on each of 4 continents (= a total of 8 unique countries)
OR
Find a cache in 1 country on 5 continents (= a total of 5 unique countries)

The definition of a continent can be consistent with the usual definition used on PGC (I can provide a full list of countries if necessary though). Russia, Turkey and Cyprus can therefore be counted for either Asia or Europe, but not for both; i.e. if any of these countries is included in Asia, they cannot count for Europe as well (or vice versa).

These conditions have been accepted by a reviewer. Let me know if there are any questions.

Thanks in advance,
Pihoqahiak
Re: GC9Q7T6 - Checker request
August 29, 2022 03:45PM
Hi,

any updates on my request yet?

Thanks,
Pihoqahiak
Re: GC9Q7T6 - Checker request
August 29, 2022 05:30PM
Unfortunately none of the conjunctive test scripts (that I am familiar with) have support for continent definitions, so this will likely require some work.
Re: GC9Q7T6 - Checker request
August 29, 2022 08:14PM
Would it help if I provide a list of countries for each continent?
Re: GC9Q7T6 - Checker request
August 31, 2022 11:51PM
No, we have that data already.



Here is a brief explanation of how the Project-GC infrastructure is setup.

Quote

The challenge checker infrastructure is split into two parts. First, there are scripts, that usually check for something generic like "X finds of Y cache type". Then, there are tags, which associate scripts to actual challenge caches. For example, a tag might say that "to qualify for GC12345, run 'X finds of Y cache type' with X=100 and Y=Multi-cache". This makes scripts re-usable for multiple challenge caches.

What we have available are scripts like:

  • Find X caches in Y countries in Z continents
  • Conjunctive test: qualify for A or B or C or D

So, it "should" be as simple as using the script for "Conjunctive test: qualify for A or B or C or D" with A="Find 1 caches in 4 countries in 2 continents" and B="Find 1 cache in 3 countries in 3 continents"... etc, etc.

Unfortunately, "Find X caches in Y countries in Z continents" isn't set up to integrate well with "Conjunctive test: qualify for A or B or C or D". So it is not that simple. It will take some work to set them up to cooperate nicely.

Hopefully that explanation makes sense.

I am happy to do the work. However, I am starting university and don't have very much time right now.



Edited 1 time(s). Last edit at 08/31/2022 11:51PM by Hügh. (view changes)
Re: GC9Q7T6 - Checker request
September 01, 2022 09:03AM
Thanks for the explanation. Of course I understand that there are more important things in life than challenge checkers ;) Keep me updated, if it will take too much of your time, I can always change this challenge into something easier
Re: GC9Q7T6 - Checker request
November 09, 2022 06:56PM
I've re-re-re-extended the multi-test checker to support a continent/country/type check (it already had a bunch of country/continent definition data). Here's the link to the checker:
https://project-gc.com/Challenges/GC9Q7T6/72727

I need to travel more apparently... I have 3 continents, but only 1/2/3 countries each.

Please test, verify and respond.
Re: GC9Q7T6 - Checker request
November 09, 2022 07:07PM
Thank you so much for this! I'll be away for a couple of days, so I'll extensively test this afterwards and send you the feedback. One thing I already noticed in the Tag:

Tag comment: Find any combination of caches in 4 countries in 2 continents, 3 countries in 3 continents, 4 countries in 2 continents or 5 countries in one continent.

This should read:
Tag comment: Find any combination of caches in 4 countries in 2 continents, 3 countries in 3 continents, 2 countries in 4 continents or 1 country in 5 continents.

I haven't tested if the checker itself works according to the correct criteria. I see in the script output that it also mentions the number of types. This is not relevant in my challenge, I'm not sure if this is just the output or that the checker somehow checks for this too?

Anyway, many thanks for creating and as said, I'll send more feedback after I had the chance to fully test this.
Re: GC9Q7T6 - Checker request
November 09, 2022 07:36PM
I've fixed the tag comment... for some reason, country and continent keep getting reversed in my mind (but I think the actual tag was correct). I've modified it so the output only mentions countries/types if there is more than one type/country required per continent. This can be seen in the last condition, because you only require one country for each continent, but the other tests list the number of countries.
Re: GC9Q7T6 - Checker request
November 14, 2022 12:18PM
I ran some more tests with different users and found the following results:

- Antarctic and subantarctic islands is not included as a continent. Can this be included? The 5 countries included can be similar to the ones used for the statistics page (Antarctica, South Georgia and the South Sandwich Islands, French Southern and Antarctic Territories, Heard Island and McDonald Islands, Bouvet Island)

- There are some inconsistencies between the number of countries on the stat page vs. the checker outcome. My stats:
Europe: 44 (vs. 43 in checker)
North America 16 (vs. 15 in checker)
Asia 14 (vs. 12 in checker)
Oceania 8 (same in checker)
Africa 5 (same in checker)

Maybe this has to do with Cyprus, Russia and Turkey being included in both Asia and Europe? I don't know where the North America difference comes from though. If you can provide me with the list of countries used for this checker, I can go through this myself if you want, to see where these differences may come from.

- From my initial request: "Russia, Turkey and Cyprus can therefore be counted for either Asia or Europe, but not for both; i.e. if any of these countries is included in Asia, they cannot count for Europe as well (or vice versa). " --> How does the checker deal with this? Especially when both continents are just below the requirement threshold, the distribution of these countries matter (i.e. someone has 3x Europe and 3x Asia and has also found a cache in Cyprus and Turkey, both continents should be assigned one of these countries each for the checker to be green. I wasn't able to test for this, so maybe this works perfectly fine already. I was just wondering. Also, if this condition is very difficult to include, I would absolutely be fine to assign CYP, RUS and TUR to only one continent and put a note on the cache page as to why this was done. I think CYP and TUR --> Asia and RUS--> Europe would make the most sense, since this is how it is on geocaching.com

Thanks a lot for your effort!



Edited 1 time(s). Last edit at 11/14/2022 12:22PM by Pihoqahiak. (view changes)
Re: GC9Q7T6 - Checker request
November 15, 2022 02:32AM
I just used the pre-existing continent data in the script I modified, which seemed reasonable to me (and is this):

local ContinentCountries = {
["Africa"] = {"Algeria","Angola","Benin","Botswana","Burkina Faso","Burundi","Cameroon","Cape Verde","Central African Republic","Chad","Comoros","Congo","Democratic Republic of the Congo","Djibouti","Egypt","Equatorial Guinea","Eritrea","Ethiopia","Gabon","Gambia","Ghana","Guinea","Guinea-Bissau","Ivory Coast","Kenya","Lesotho","Liberia","Libya","Madagascar","Malawi","Mali","Mauritania","Mauritius","Mayotte","Morocco","Mozambique","Namibia","Niger","Nigeria","Reunion","Rwanda","Saint Helena","Sao Tome and Principe","Senegal","Seychelles","Sierra Leone","Somalia","South Africa","South Sudan","Sudan","Swaziland","Tanzania","Togo","Tunisia","Uganda","Western Sahara","Zambia","Zimbabwe"},
["Asia"] = {"Afghanistan","Armenia","Azerbaijan","Bahrain","Bangladesh","Bhutan","Brunei","Cambodia","China","Cyprus","East Timor","Egypt","Georgia","Hong Kong","India","Indonesia","Iran","Iraq","Israel","Japan","Jordan","Kazakhstan","Kuwait","Kyrgyzstan","Laos","Lebanon","Macau","Malaysia","Maldives","Mongolia","Myanmar","Nepal","North Korea","Oman","Pakistan","Palestine","Philippines","Qatar","Russia","Saudi Arabia","Singapore","South Korea","Sri Lanka","Syria","Taiwan","Tajikistan","Thailand","Türkiye","Turkmenistan","United Arab Emirates","Uzbekistan","Vietnam","Yemen"},
["Europe"] = {"Aland Islands","Albania","Andorra","Austria","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Czechia","Denmark","Estonia","Faroe Islands","Finland","France","Germany","Gibraltar","Greece","Greenland","Guernsey","Hungary","Iceland","Ireland","Isle of Man","Italy","Jersey","Latvia","Liechtenstein","Lithuania","Luxembourg","North Macedonia","Malta","Moldova","Monaco","Montenegro","Netherlands","Norway","Poland","Portugal","Romania","Russia","San Marino","Sark","Serbia","Slovakia","Slovenia","Spain","Svalbard and Jan Mayen Islands","Sweden","Switzerland","Türkiye","Ukraine","United Kingdom","Vatican City State"},
["North America"] = {"Anguilla","Antigua and Barbuda","Aruba","Bahamas","Barbados","Belize","Bermuda","Bonaire","Bonaire, Sint Eustatius and Saba","British Virgin Islands","Canada","Cayman Islands","Costa Rica","Cuba","Curaçao", "Curacao","Dominica","Dominican Republic","El Salvador","Grenada","Guadeloupe","Guatemala","Haiti","Honduras","Jamaica","Martinique","Mexico","Montserrat","Netherlands Antilles","Nicaragua","Panama","Puerto Rico","Saba","Saint Kitts and Nevis","Saint Lucia","Saint Barthélemy","St Eustatius","St Kitts","Saint Vincent and the Grenadines","Sint Maarten"," Saint Martin", "St. Martin","Trinidad and Tobago","Turks and Caicos Islands","United States","US Virgin Islands"},
["Oceania"] = {"American Samoa","Australia","Cook Islands","Fiji","French Polynesia","Guam","Kiribati","Marshall Islands","Micronesia","New Caledonia","New Zealand","Niue","Norfolk Island","Northern Mariana Islands","Palau","Papua New Guinea","Pitcairn Islands","Samoa","Solomon Islands","Tonga","Tuvalu","US Minor Outlying Islands","Vanuatu","Wallis And Futuna Islands"},
["South America"] = {"Argentina","Bolivia","Brazil","Chile","Colombia","Ecuador","Falkland Islands","French Guiana","Guyana","Paraguay","Peru","South Georgia and the South Sandwich Islands","Suriname","Uruguay","Venezuela"}
}

Unfortunately, the PGC continent stats type data is not available in the API we use, so it appears the only way to assign countries to continents is 'manually' as this script did. If you'd like to modify the above lists to your liking, I can just use those. Although, it appears that different caches from the same countries might return a different value for the country name - for example "Saint Kitts and Nevis" and "St Kitts" are presumably the same, but if you have a find from each, that will count as two countries. We could resolve this by having country 'synonyms', so they only count as one, but again you'd need to provide the exact list of those as well (but, it's not hard to put those into the script as 'exceptions').
Re: GC9Q7T6 - Checker request
November 15, 2022 12:20PM
Here is the revised list. I found quite some old data: I added some missing countries, renamed a few and deleted some old spelling variants, especially in the Caribbean. This list, if done correctly by me, should include all countries as defined by geocaching.com, but the continent definition is the same as the 'Maps' tab in the PGC-profile. I have added Antarctica as a continent to this list ("Antarctic and subantarctic islands", as it is named in PGC), not sure if you have to change some script as well to include this in the checker.

The question still remains about how the checker deals with the countries that are assigned to more than one continent. Currently, there are four of them: Russia (Europe/Asia), Türkiye (this is the current English spelling of Turkey; Europe/Asia), Cyprus (Europe/Asia) and South Georgia and the South Sandwich Islands (South America/Antarctica). Again, if it helps the checker a lot, it is no problem to remove these doubles and assign them to only one of the continents.

local ContinentCountries = {
["Africa"] = {"Algeria","Angola","Benin","Botswana","British Indian Ocean Territory","Burkina Faso","Burundi","Cabo Verde","Cameroon","Central African Republic","Chad","Comoros","Congo","Côte d'Ivoire","Democratic Republic of the Congo","Djibouti","Egypt","Equatorial Guinea","Eritrea","Eswatini","Ethiopia","Gabon","Gambia","Ghana","Guinea","Guinea-Bissau","Kenya","Lesotho","Liberia","Libya","Madagascar","Malawi","Mali","Mauritania","Mauritius","Mayotte","Morocco","Mozambique","Namibia","Niger","Nigeria","Réunion","Rwanda","Saint Helena","Sao Tome and Principe","Senegal","Seychelles","Sierra Leone","Somalia","South Africa","South Sudan","Sudan","Tanzania","Togo","Tunisia","Uganda","Western Sahara","Zambia","Zimbabwe"},
["Asia"] = {"Afghanistan","Armenia","Azerbaijan","Bahrain","Bangladesh","Bhutan","Brunei","Cambodia","China","Cyprus","Egypt","Georgia","Hong Kong","India","Indonesia","Iran","Iraq","Israel","Japan","Jordan","Kazakhstan","Kuwait","Kyrgyzstan","Laos","Lebanon","Macau","Malaysia","Maldives","Mongolia","Myanmar","Nepal","North Korea","Oman","Pakistan","Palestine","Philippines","Qatar","Russia","Saudi Arabia","Singapore","South Korea","Sri Lanka","Syria","Taiwan","Tajikistan","Thailand","Timor-Leste","Türkiye","Turkmenistan","United Arab Emirates","Uzbekistan","Vietnam","Yemen"},
["Europe"] = {"Aland Islands","Albania","Andorra","Austria","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Cyprus","Czechia","Denmark","Estonia","Faroe Islands","Finland","France","Germany","Gibraltar","Greece","Greenland","Guernsey","Hungary","Iceland","Ireland","Isle of Man","Italy","Jersey","Latvia","Liechtenstein","Lithuania","Luxembourg","North Macedonia","Malta","Moldova","Monaco","Montenegro","Netherlands","Norway","Poland","Portugal","Romania","Russia","San Marino","Sark","Serbia","Slovakia","Slovenia","Spain","Svalbard and Jan Mayen Islands","Sweden","Switzerland","Türkiye","Ukraine","United Kingdom","Vatican City State"},
["North America"] = {"Anguilla","Antigua and Barbuda","Aruba","Bahamas","Barbados","Belize","Bermuda","Bonaire, Sint Eustatius and Saba","British Virgin Islands","Canada","Cayman Islands","Costa Rica","Cuba","Curaçao","Dominica","Dominican Republic","El Salvador","Grenada","Guadeloupe","Guatemala","Haiti","Honduras","Jamaica","Martinique","Mexico","Montserrat","Nicaragua","Panama","Puerto Rico","Saint Barthélemy","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Sint Maarten","Trinidad and Tobago","Turks and Caicos Islands","United States","US Virgin Islands"},
["Oceania"] = {"American Samoa","Australia","Christmas Island","Cocos (Keeling) Islands","Cook Islands","Fiji","French Polynesia","Guam","Kiribati","Marshall Islands","Micronesia","New Caledonia","New Zealand","Niue","Norfolk Island","Northern Mariana Islands","Palau","Papua New Guinea","Pitcairn","Samoa","Solomon Islands","Tokelau","Tonga","Tuvalu","US Minor Outlying Islands","Vanuatu","Wallis and Futuna Islands"},
["South America"] = {"Argentina","Bolivia","Brazil","Chile","Colombia","Ecuador","Falkland Islands","French Guiana","Guyana","Paraguay","Peru","South Georgia and the South Sandwich Islands","Suriname","Uruguay","Venezuela"}
["Antarctic and subantarctic islands"] = {"Antarctica","Bouvet Island","French Southern and Antarctic Territories","Heard Island and McDonald Islands","South Georgia and the South Sandwich Islands"}
}
Re: GC9Q7T6 - Checker request
November 15, 2022 04:14PM
Okay - thank you - I see the countries are (mostly) gotten from the ISO-3166 (https://www.iso.org/iso-3166-country-codes.html). It looks like there are some deviations from those in the data however (eg. usually the common name has any "the" discarded from the official country name). I'll just take that list, and make it so that you can match the name using a list. And then use these categorizations that you've got above here, for which continent they are in by default, but also make it so that you can 'override' the continent for any country, when the challenge is tagged, including allowing it to be in multiple continents.

But that's going to take a little bit (but not months this time, don't worry :)).
Re: GC9Q7T6 - Checker request
November 15, 2022 04:45PM
Thanks again for the efforts! I try to get my cache published before the end of the year. I'll work on the cache page in the meanwhile and have it ready for publishing as soon as the checker is done.
Re: GC9Q7T6 - Checker request
November 15, 2022 07:09PM
Okay, I've completed the table, and with countries assigned to multiple continents, it matches exactly with your PGC stats (eg. for example, Russia in the PGC stats is assigned to both Europe and Asia).

It is quite a bit more difficult to 'dynamically' assign the continents, for example, if you find a country in one, then use another multiple assignment for another. I'm going to guess that the situation where it makes a difference is going to be pretty rare, anyhow. So, I've assigned them in the tagged script to match your suggestions of which they should be a part of for the purposes of the script. This slightly lowers your results for Europe and Asia.

Note, you had assigned 5 countries to multiple continents, including Egypt and "South Georgia and the South Sandwich Islands", I put Egypt in Africa and South Georgia in Antarctica for your script (but in both by default). This is easy to change if you want it to.

Oh to travel as much as you have ;). Test it out again and let me know.
Re: GC9Q7T6 - Checker request
November 16, 2022 08:38PM
Well done, it seems to work perfectly as intended!

Good spot on the double Egypt, I totally missed that. So just to summarise, the current checker considers:

Russia -> Europe
Türkiye -> Asia
Cyprus -> Asia
Egypt -> Africa
South Georgia and the South Sandwich Islands -> Antarctica

That's perfect, as that matches the distribution on Geocaching.com.

One last question: would it be a lot of extra work to change the script output, so that you can see what it checks for? It can be really small, like adding '(4 in 2)', '(3 in 3)', etc. So it would maybe look like this:

Instead of:

OR
OK: North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK: North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK: North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK: North America: (pass) Europe: (pass) Asia: (pass) Oceania: (pass) Africa: (pass)

something like:

OR
OK (4 in 2): North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK (3 in 3): North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK (2 in 4): North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)
OK (1 in 5): North America: (pass) Europe: (pass) Asia: (pass) Oceania: (pass) Africa: (pass)

This is really nitpicking, if it is too much of a hassle please don't bother. The checker is already great as it is.

Thanks a lot for your work
Re: GC9Q7T6 - Checker request
November 16, 2022 09:16PM
Good suggestion... The output now shows the extra country/type conditions... i.e:

OK: (4 countries, 2 continents)North America: found 16 countries (pass) Europe: found 42 countries (pass) Asia: found 13 countries (pass) Oceania: found 8 countries (pass) Africa: found 5 countries (pass)

But, you could specify 'type' count and/or country count for a continent, so that's why it specifically says countries in the output. In that case, you'd get (4 types, 2 continents), or if you used both (4 countries, 4 types, 2 continents).
Re: GC9Q7T6 - Checker request
November 16, 2022 09:32PM
It is absolutely perfect right now! No need for types counts in this challenge, but I may add one in the future :)

Thanks again, I'll now try and get this challenge published.
Sorry, only registered users may post in this forum.

Click here to login