Jump to content

Luna

Members
  • Posts

    31
  • Joined

  • Last visited

Profile Information

  • Gender
    Female

Previous Fields

  • Nation Name
    Luna
  • Resource 1
    Pigs
  • Resource 2
    Cattle

Recent Profile Visitors

404 profile views

Luna's Achievements

  1. tl;dr: There's a new tool to find the moon & mars hotspots. Here it is: https://www.cnhotspotfinder.com/ Thanks to riser for collaborating to create it. The Google sheet isn't working anymore and I don't know yet whether it will be fixable, or even worth fixing. So the admin recently made a change to the CN server-side code for choosing the location of the moon & mars hotspots every month. This broke the spreadsheet I made as the hotspots no longer lie on the same neat line that they've always been on. So basically we've had to fall back from only searching a narrow line of points to searching all integer coordinates across the entire sphere, for both moon & mars (and also decoupling the Moon & Mars so test points on one don't narrow down the possibilities on the other). While this in theory is possible with Google sheets, well, narrowing down 169*359 possible hotspots in a spreadsheet is pretty unwieldy. Back when we had the possibilities narrowed down to a line there were only 1218 possible hotspots which can be done with Google sheets reasonably well. So time to use code rather than sheets. I had ChatGPT write code to search through all the possible integer coordinates and list the ones that match the points that have been tested. Look here for a post I made on that. And riser made a website using the code and hosted it. Here it is: https://www.cnhotspotfinder.com/. Keep in mind that the Moon and Mars are now decoupled, so you can use the website for the Moon only or Mars only (or have two instances of the website open in 2 tabs if you're trying to find both). Points from one will no longer help with the other like I said. We only have 1 month of data so far (April 2024) from after admin's change. Maybe with more months of data a pattern will emerge similar to the line from before the change. For now it may take some extra guesses to the find the hotspots each month since there is no such pattern helping us out. And of course there is a possibility that the server is just picking integer coordinates completely randomly now with no pattern in which case things will stay that way. Time will tell.
  2. tl;dr: There's a new tool to find the moon & mars hotspots. Here it is: https://www.cnhotspotfinder.com/ Thanks to riser for collaborating to create it. The Google sheet isn't working anymore and I don't know yet whether it will be fixable, or even worth fixing. So the admin recently made a change to the CN server-side code for choosing the location of the moon & mars hotspots every month. This broke the spreadsheet I made as the hotspots no longer lie on the same neat line that they've always been on. So basically we've had to fall back from only searching a narrow line of points to searching all integer coordinates across the entire sphere, for both moon & mars (and also decoupling the Moon & Mars so test points on one don't narrow down the possibilities on the other). While this in theory is possible with Google sheets, well, narrowing down 169*359 possible hotspots in a spreadsheet is pretty unwieldy. Back when we had the possibilities narrowed down to a line there were only 1218 possible hotspots which can be done with Google sheets reasonably well. So time to use code rather than sheets. I had ChatGPT write code to search through all the possible integer coordinates and list the ones that match the points that have been tested. Look here for a post I made on that. And riser made a website using the code and hosted it. Here it is: https://www.cnhotspotfinder.com/. Keep in mind that the Moon and Mars are now decoupled, so you can use the website for the Moon only or Mars only (or have two instances of the website open in 2 tabs if you're trying to find both). Points from one will no longer help with the other like I said. We only have 1 month of data so far (April 2024) from after admin's change. Maybe with more months of data a pattern will emerge similar to the line from before the change. For now it may take some extra guesses to the find the hotspots each month since there is no such pattern helping us out. And of course there is a possibility that the server is just picking integer coordinates completely randomly now with no pattern in which case things will stay that way. Time will tell.
  3. Falling back to older code I wrote, but which runs locally on my computer. I got chatgpt to write some code a couple of days ago which pretty much does the same thing as my old code. Could be useful if other people want to join in on the hotspot finding, or maybe even turn this into a basic website, as the spreadsheet may continue to be broken depending on exactly what change the admin made. We'll have a better idea next month or maybe later of what admin's change was. Here's the code from chatgpt, with minor edits: import math class TestPoint: def __init__(self, lat, lon, effectiveness): self.lat = lat self.lon = lon self.effectiveness = effectiveness class PossibleHotspot: def __init__(self, lat, lon): self.lat = lat self.lon = lon def calculate_distance(test_point, hotspot): lat1 = math.radians(test_point.lat) lon1 = math.radians(test_point.lon) lat2 = math.radians(hotspot.lat) lon2 = math.radians(hotspot.lon) d = math.acos(math.sin(lat1) * math.sin(lat2) + math.cos(lat1) * math.cos(lat2) * math.cos(lon2 - lon1)) return d def calculate_effectiveness(test_point, hotspot): distance = calculate_distance(test_point, hotspot) effectiveness = (distance * 124.362 / math.pi) / 100 effectiveness = 1 - effectiveness effectiveness = max(math.floor(effectiveness * 100), 50) return effectiveness def find_matching_hotspots(test_points): possible_hotspots = [] for lat in range(-84, 85): for lon in range(-179, 180): hotspot = PossibleHotspot(lat, lon) match = True for test_point in test_points: if test_point.effectiveness != calculate_effectiveness(test_point, hotspot): match = False break if match: possible_hotspots.append(hotspot) return possible_hotspots # Example test points test_points = [ TestPoint(80.00000001, 103, 89), TestPoint(77, 22, 98), TestPoint(78, 17, 97) ] matching_hotspots = find_matching_hotspots(test_points) for hotspot in matching_hotspots: print(f"Matching hotspot: lat={hotspot.lat}&lon={hotspot.lon}") You don't even need to run it locally. You can run it in any online python evaluator like this one: https://www.online-python.com/ In case you're curious what my prompt to chatgpt was, which explains how the moon & mars effectiveness calculation works: AI has gotten so good over the past few years. I wonder how differently the whole process of finding the hotspots would have gone if AI could write code like this back when the moon & mars wonders were first introduced.
  4. April 2024 Moon Hotspot: lat=76&lon=28
  5. Admin changed the formula for picking the moon & mars hotspots, which might as well be an April Fool's joke. The finder spreadsheet isn't working anymore.
  6. April 2024 Mars Hotspot: lat=50&lon=-148
  7. Thanks for testing it! I'm seeing both your base and colony at -55.0000000000000142,-87 looking at your Mars page's source code. Are you sure you used lat=-54.9999999999999929&lon=-87 for the Base? The really far out points like -55.0000011640180162 require the math to be done just right to work out, so they're incredibly machine specific. Like if you test the math on a processor that happens to do the exact same thing the CN server does, you can nail one of those points. It was done with -6.00000088280216559 in a previous month like I mentioned in my last post. The closer in ones like lat=-55.0000000000000142&lon=-87 are more likely to work just cause the processor happen to randomly calculate it in a way to get exactly 0 distance between the wonder and hotspot.
  8. If anyone wants to experiment more with the floating point offsets, here are some coordinates which may give 100% (no guarantees): lat=-54.9999988395099493&lon=-87 lat=-54.9999999999999929&lon=-87 lat=-55.0000000000000142&lon=-87 lat=-55.0000011640180162&lon=-87 These are interesting for being extreme (either extremely close to -55 or extremely far from it). But there should be millions more that give 100%. There may be ones even farther away that give 100%, but it takes a LOT of compute time to test all the values. (If you're just looking for coordinates that have already been tested and confirmed to give 100%, both lat=-54.99999999&lon=-87 and lat=-54.9999999&lon=-87 fit the bill.)
  9. Thanks for testing it! This is useful information. 😊 Not exactly. Here's an example of lat=-6.00000088280216559 giving 100% one month. That same month -5.99999999 and -5.99999996 gave 100% but -6 gave 99%. Floating points actually use binary digits instead of decimal digits, which wouldn't really lend itself to a situation where nothing beyond the 7th decimal digit matters. But it's wilder than that. Here are the 41 numbers closest to -55 (20 on each side of -55 plus -55 itself): -54.9999999999998579 100 -54.9999999999998650 100 -54.9999999999998721 100 -54.9999999999998792 100 -54.9999999999998863 100 -54.9999999999998934 99 -54.9999999999999005 100 -54.9999999999999076 100 -54.9999999999999147 100 -54.9999999999999218 100 -54.9999999999999289 100 -54.9999999999999361 100 -54.9999999999999432 100 -54.9999999999999503 99 -54.9999999999999574 100 -54.9999999999999645 100 -54.9999999999999716 100 -54.9999999999999787 100 -54.9999999999999858 100 -54.9999999999999929 100 -55.0000000000000000 99 -55.0000000000000071 99 -55.0000000000000142 100 -55.0000000000000213 100 -55.0000000000000284 100 -55.0000000000000355 100 -55.0000000000000426 100 -55.0000000000000497 100 -55.0000000000000568 100 -55.0000000000000639 100 -55.0000000000000711 100 -55.0000000000000782 100 -55.0000000000000853 100 -55.0000000000000924 100 -55.0000000000000995 100 -55.0000000000001066 100 -55.0000000000001137 100 -55.0000000000001208 100 -55.0000000000001279 99 -55.0000000000001350 100 -55.0000000000001421 100 As you can see there is seemingly no pattern. And yes, these are the 41 closest numbers to -55. A double precision floating point number can't represent anything between -54.9999999999999929 and -55. The difference between those two is exactly 1 bit as far as the computer knows. But it's even worse than that. You see, if you run the code to generate that on a different computer you get different results. Yes, I tried. Which means the list above isn't the absolute truth regarding the floating point calculation. And even worse, if the server-side CN code starts being run on a different computer the moon & mars calculations may start giving different results. In fact this has already happened. -55 used to work but then stopped working at some point: If anyone wants to play around with this, it's really simple to do so. Here's the C++ code I used to generate the results above. The essential part is the checkLat function which is fortunately only a simple few lines. The rest of the code just exists to loop through a bunch of test values and print the results, so you can change that to test whatever you want to test. You don't need to understand the weird pointer referencing/deferencing trickery to test your own values. Just run checkLat(lat,-55) with whatever lat you want to test. It will return true for lat values that give 100% and false for values that don't. #include <stdio.h> #include <cmath> bool checkLat(double lat1, double lat2) { double testVal = cos(lat1*M_PI/180.0)*cos(lat2*M_PI/180.0) + sin(lat1*M_PI/180.0)*sin(lat2*M_PI/180.0); return testVal == 1; } int main(int argc, char *argv[]) { double neg55 = -55.0; long int neg55bits = *(long int*)&neg55; for (long int i = -20; i<=20; i++) { long int latBits = neg55bits + i; double lat = *(double*)&latBits; printf("%.16f\t%d\n",lat, checkLat(lat,-55)?100:99); } return 0; } Like I said, if you run it on a different computer sadly you'll get different results. I actually had difficulty finding a computer that doesn't think -55 gives 100%. I ran it on this website and it seems to agree with the results @Greatest Mothers posted above: https://www.online-cpp.com/
  10. Thanks for testing it! I do see your base at -48 and your colony and mine at -48.00000001 from your mars page's source code. The source code from Greatest Mothers's page shows all 3 wonders at -48.00000001. So I'm going to assume -48, -72 actually gives 99%. Good to test stuff like this, as there have been some weird surprises with floating point stuff which don't fit the google sheet. They're rare it seems, but it happens.
  11. Wait hold on, did you place them at -48, -72 using a URL with lat=-48 in it? Or did you place them using a URL with lat=-48.00000001 in it and then look at your mars page afterwards and see that they say -48.00000? The mars page should say -48.00000 since that page rounds. I'm seeing that all 3 of your wonders are at -48.00000001,-72 by looking at the source code of your nation's mars page.
  12. Good to know! Thanks for letting us know! The floating point calculations seem to vary slightly between machines, which makes predicting them.. complicated unfortunately.
  13. Try this (not yet confirmed): November 2023 Mars Lat Mars Lon Probability -48.00000001 -72 100.00000% URL Segment: &lat=-48.00000001&lon=-72
  14. Possible Locations for the Moon Hotspot: Moon Lat Moon Lon Probability Observed In -65 78 50.54844% -66.00000001 78 32.58633% -65 79 16.86523%
×
×
  • Create New...