Jump to content

Moon Hotspot


AirMe

Recommended Posts

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

  • 5 weeks later...
  • 4 weeks later...
  • 5 weeks later...
On 4/2/2024 at 2:52 AM, Colin Myrhh said:

Thanks Luna.

 

[edit:] how did you figure that one out?

The copy of the spreadsheet that I have does not even have that as tracked possibility.

 

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:

i3nOVgs.png

 

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Edited by Luna
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...