jonnygozy Posted October 24, 2009 Report Share Posted October 24, 2009 I don't know if this is a problem at all as far as admin is concerned.There is a simple solution to the problem which requires a tiny modification of the code. Even if it is simple, it doesn't mean they'll do it. We don't even know if they're aware of it, as far as I know anyway. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 24, 2009 Report Share Posted October 24, 2009 I am quite sure he is aware of this by now. I just don't think he considers this a problem. Quote Link to comment Share on other sites More sharing options...
jonnygozy Posted October 24, 2009 Report Share Posted October 24, 2009 So instead of guessing integers next month, we guess a point 0.0000001 off of all integer points? Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 25, 2009 Report Share Posted October 25, 2009 Assuming that the coordinates are both integers and admin does not change the code, then yes, this should work. Quote Link to comment Share on other sites More sharing options...
Rich333 Posted October 25, 2009 Report Share Posted October 25, 2009 (edited) So instead of guessing integers next month, we guess a point 0.0000001 off of all integer points? -70.99999991 is not 0.0000001 off, it's 0.00000009 off. Not all integer coordinates produce the error we've seen this month; assuming an error for all coordinates is a bad idea. I wrote a C++ program to test for the error using different combinations of floating point types (32-bit, 64-bit, and 96-bit floating points) for the wonder position, hotspot position, delta position (hotspot coordinates minus wonder coordinates), and distance result, with each of the 3 different great circle distance equations; 243 combinations in all (3 types, 4 variables = 3^4=81; 3 equations = 81*3=243). I plugged in all the 100% efficiency coordinates found thus far, as well as the theoretical lunar hotspot for this month (-71,67), and found that using the simplest distance equation (the acos one), and 64-bit floating points for all the variables, produced the expected results. At first I made the mistake of using -70.99999991 for both the wonder and hotspot latitude for this month, but after switching the hotspot latitude to -71 (while keeping the wonder latitude at -70.99999991) I got the exact same behavior as the game (0 distance for last month's lunar hotspot and this month's martian hotspot, 0 distance for this month's error-corrected lunar hotspot, and non-zero distance for this month's uncorrected lunar hotspot). Now that I've figured out how to recreate the error, I should be able to test all possible hotspot coordinates to locate the ones which will need to be error-corrected; after that, I'll just have to figure out how to compensate for the errors for those hotspots. Once I'm finished, I should be able to produce a complete table of all the possible hotspots which need to be error-corrected, along with their error-corrected coordinates; the map's a 360x180 grid, so there's 64,800 possible hotspots in all, but hopefully most of them won't need to be error-corrrected. Edited October 25, 2009 by Rich333 Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 25, 2009 Report Share Posted October 25, 2009 Nice work man. Looking forward to your result. I'm curious what fraction of the integer spots need error correction, and if there is a pattern if you plot those spots in 2D. It may be the case that there are too many spots to fit in a table, in that case it would be nice to have a function that computes the necessary correction. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 25, 2009 Report Share Posted October 25, 2009 -70.99999991 is not 0.0000001 off, it's 0.00000009 off.Who said otherwise?Not all integer coordinates produce the error we've seen this month; assuming an error for all coordinates is a bad idea.I wrote a C++ program to test for the error using different combinations of floating point types (32-bit, 64-bit, and 96-bit floating points) for the wonder position, hotspot position, delta position (hotspot coordinates minus wonder coordinates), and distance result, with each of the 3 different great circle distance equations; 243 combinations in all (3 types, 4 variables = 3^4=81; 3 equations = 81*3=243). I plugged in all the 100% efficiency coordinates found thus far, as well as the theoretical lunar hotspot for this month (-71,67), and found that using the simplest distance equation (the acos one), and 64-bit floating points for all the variables, produced the expected results. At first I made the mistake of using -70.99999991 for both the wonder and hotspot latitude for this month, but after switching the hotspot latitude to -71 (while keeping the wonder latitude at -70.99999991) I got the exact same behavior as the game (0 distance for last month's lunar hotspot and this month's martian hotspot, 0 distance for this month's error-corrected lunar hotspot, and non-zero distance for this month's uncorrected lunar hotspot). Now that I've figured out how to recreate the error, I should be able to test all possible hotspot coordinates to locate the ones which will need to be error-corrected; after that, I'll just have to figure out how to compensate for the errors for those hotspots. Once I'm finished, I should be able to produce a complete table of all the possible hotspots which need to be error-corrected, along with their error-corrected coordinates; the map's a 360x180 grid, so there's 64,800 possible hotspots in all, but hopefully most of them won't need to be error-corrrected. Rich, all this is correct, but unnecessary.If admin does not fix the code, then for any hotspot (n1, n2), where n1 and n2 are integers, (n1 + 0.0000001, n2) will give 100% efficiency. Hence, it's unnecessary to check which points cause the error and which don't. Quote Link to comment Share on other sites More sharing options...
Rich333 Posted October 25, 2009 Report Share Posted October 25, 2009 (edited) If admin does not fix the code, then for any hotspot (n1, n2), where n1 and n2 are integers, (n1 + 0.0000001, n2) will give 100% efficiency. And that assertion is based on what, exactly? I just ran a search for all the errors. The errors only affect certain latitudes. All longitudes are affected for those latitudes. Here are the latitudes with errors... -87 -86 -84 -82 -80 -72 -71 -70 -66 -63 -48 -47 -46 -40 -35 -29 -24 -18 -12 -10 -8 -7 -6 -4 -3 3 4 6 7 8 10 12 18 24 29 35 40 46 47 48 63 66 70 71 72 80 82 84 86 87 I have other things to do now, so I'll figure out the corrections later today or tomorrow. Edited October 25, 2009 by Rich333 Quote Link to comment Share on other sites More sharing options...
jonnygozy Posted October 25, 2009 Report Share Posted October 25, 2009 -70.99999991 is not 0.0000001 off, it's 0.00000009 off. -71.0000001 gives 100% and it is 0.0000001 off. That's what I was referring to. Golan also mentioned that adding or subtracting 0.0000001 worked in all his tests. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 25, 2009 Report Share Posted October 25, 2009 So, what is the exact form of the distance formula that you are using to produce errors that match the data? As I said before, I tried several variations on it (32 bit, 64bit, etc) and for all of them, d({-71,67},{-71,67}) was exactly 0. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 25, 2009 Report Share Posted October 25, 2009 So, what is the exact form of the distance formula that you are using to produce errors that match the data? As I said before, I tried several variations on it (32 bit, 64bit, etc) and for all of them, d({-71,67},{-71,67}) was exactly 0.I run the tests on excel which produces the same error. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 25, 2009 Report Share Posted October 25, 2009 I run the tests on excel which produces the same error. Umm.. thanks but that doesn't really answer my question . I'm looking for someone to post some code which I can type in that produces the error. For example, if I use this (in C++): real surfaceDistance(real hs_lat, real hs_lon, real lat, real lon) { const real degree = (real)(M_PI/180); hs_lat*=degree; hs_lon*=degree; lat*=degree; lon*=degree; return acos(cos(hs_lat)*cos(lat)*cos(hs_lon-lon) + sin(hs_lat)*sin(lat)); } (where real is either float or double) then surfaceDistance(-71,67,-71,67) is exactly zero. obviously there are millions of possible variations on the above code which do the same thing, so I'm just asking which is the one you guys found that produces a nonzero error between (-71,67) and itself Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 25, 2009 Report Share Posted October 25, 2009 (edited) I calculate the (x,y,z) values of each point in space, assuming that the radius is 1, to simplify the calculations. for any point (lat, lon) x = |cos(lat)| * sin(lon) y = sin(lat) z = sqrt(1 - x ^ 2 - y ^2) if lon < -90 or lon > 90, I take the negative value Now, for two points, P1 = (x1, y1, z1) and P2 = (x2, y2, z2), the distance between them is acos(x1 * x2 + y1 * y2 + z1 * z2) Edited October 25, 2009 by Golan 1st Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 25, 2009 Report Share Posted October 25, 2009 I see. You get the two vectors and find the angle between them. But why do it that way? Most likely, admin just copied the great circle distance formula from wikipedia or some textbook, so if we are trying to find a formula that is "floating point equivalent" to admin's formula, that would seem to be a better starting point. This actually proves my point though, there are a bazillion ways to write this function, so I don't know what makes people so confident that they already found one equivalent to admin's. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 25, 2009 Report Share Posted October 25, 2009 I am not confident about it. I just get the same error you get in the game Quote Link to comment Share on other sites More sharing options...
Rich333 Posted October 27, 2009 Report Share Posted October 27, 2009 So, what is the exact form of the distance formula that you are using to produce errors that match the data? As I said before, I tried several variations on it (32 bit, 64bit, etc) and for all of them, d({-71,67},{-71,67}) was exactly 0. To reproduce the error, you need to use the simplest distance equation (the one with the acos) and do/store everything in 64-bit floating point. I modified my program to find all the corrections using +/- 0.00000001 through +/- 0.0000009 for all the latitudes with errors. Here are the results... -87 { -86.99999992 -86.99999993 -86.99999994 -86.99999995 -86.99999996 -86.99999997 -86.99999998 -87.00000001 -87.00000002 -87.00000003 -87.00000005 -87.00000006 -87.00000007 -87.00000009 } -86 { -85.99999991 -85.99999994 -85.99999995 -85.99999998 -85.99999999 -86.00000001 -86.00000002 -86.00000003 -86.00000005 -86.00000006 -86.00000009 } -84 { -83.99999991 -83.99999993 -83.99999994 -83.99999995 -83.99999996 -84.00000001 -84.00000002 -84.00000004 -84.00000005 -84.00000006 -84.00000007 -84.00000009 } -82 { -81.99999991 -81.99999992 -81.99999993 -81.99999994 -81.99999995 -81.99999997 -81.99999998 -81.99999999 -82.00000001 -82.00000002 -82.00000003 -82.00000006 -82.00000007 -82.00000008 -82.00000009 } -80 { -79.99999992 -79.99999993 -79.99999994 -79.99999995 -79.99999996 -79.99999997 -79.99999998 -80.00000001 -80.00000002 -80.00000004 -80.00000005 -80.00000006 -80.00000009 } -72 { -71.99999991 -71.99999992 -71.99999993 -71.99999994 -71.99999995 -71.99999998 -72.00000001 -72.00000002 -72.00000004 -72.00000005 -72.00000006 -72.00000007 -72.00000008 -72.00000009 } -71 { -70.99999991 -70.99999992 -70.99999993 -70.99999995 -70.99999996 -70.99999997 -70.99999998 -70.99999999 -71.00000001 -71.00000004 -71.00000005 -71.00000008 -71.00000009 } -70 { -69.99999991 -69.99999992 -69.99999994 -69.99999995 -69.99999997 -69.99999998 -69.99999999 -70.00000001 -70.00000002 -70.00000004 -70.00000005 -70.00000007 -70.00000008 } -66 { -65.99999991 -65.99999992 -65.99999993 -65.99999994 -65.99999995 -65.99999996 -66.00000001 -66.00000003 -66.00000004 -66.00000005 -66.00000006 -66.00000007 -66.00000008 } -63 { -62.99999991 -62.99999994 -62.99999997 -62.99999999 -63.00000002 -63.00000005 -63.00000008 -63.00000009 } -48 { -47.99999991 -47.99999992 -47.99999993 -47.99999995 -47.99999998 -48.00000002 -48.00000003 -48.00000004 -48.00000005 -48.00000007 -48.00000008 -48.00000009 } -47 { -46.99999991 -46.99999992 -46.99999993 -46.99999994 -46.99999995 -46.99999997 -46.99999998 -46.99999999 -47.00000001 -47.00000002 -47.00000004 -47.00000005 -47.00000006 -47.00000007 -47.00000009 } -46 { -45.99999992 -45.99999993 -45.99999994 -45.99999995 -45.99999997 -45.99999998 -45.99999999 -46.00000002 -46.00000003 -46.00000004 -46.00000006 -46.00000007 -46.00000009 } -40 { -39.99999991 -39.99999993 -39.99999994 -39.99999995 -39.99999996 -39.99999999 -40.00000001 -40.00000003 -40.00000004 -40.00000005 -40.00000006 -40.00000007 -40.00000008 -40.00000009 } -35 { -34.99999991 -34.99999992 -34.99999993 -34.99999994 -34.99999995 -34.99999997 -34.99999998 -34.99999999 -35.00000001 -35.00000002 -35.00000004 -35.00000005 -35.00000006 -35.00000007 -35.00000008 -35.00000009 } -29 { -28.99999991 -28.99999993 -28.99999994 -28.99999995 -28.99999996 -28.99999997 -28.99999998 -28.99999999 -29.00000003 -29.00000004 -29.00000005 -29.00000009 } -24 { -23.99999991 -23.99999993 -23.99999995 -23.99999997 -23.99999998 -24.00000004 -24.00000005 -24.00000006 -24.00000007 -24.00000008 -24.00000009 } -18 { -17.99999991 -17.99999992 -17.99999993 -17.99999994 -17.99999995 -17.99999996 -17.99999997 -17.99999998 -18.00000002 -18.00000005 -18.00000008 -18.00000009 } -12 { -11.99999991 -11.99999992 -11.99999994 -11.99999995 -11.99999996 -11.99999997 -11.99999998 -11.99999999 -12.00000001 -12.00000002 -12.00000003 -12.00000004 -12.00000006 -12.00000007 -12.00000008 -12.00000009 } -10 { -9.99999994 -9.99999995 -9.99999996 -9.99999997 -9.99999998 -9.99999999 -10.00000002 -10.00000003 -10.00000004 -10.00000005 -10.00000006 -10.00000007 -10.00000008 } -8 { -7.99999991 -7.99999992 -7.99999993 -7.99999994 -7.99999995 -7.99999996 -7.99999997 -7.99999998 -7.99999999 -8.00000001 -8.00000002 -8.00000003 -8.00000005 -8.00000006 -8.00000007 -8.00000008 -8.00000009 } -7 { -6.99999993 -6.99999994 -6.99999995 -6.99999997 -6.99999999 -7.00000001 -7.00000002 -7.00000005 -7.00000009 } -6 { -5.99999992 -5.99999993 -5.99999994 -5.99999995 -5.99999998 -5.99999999 -6.00000004 -6.00000005 -6.00000006 -6.00000007 -6.00000009 } -4 { -3.99999991 -3.99999994 -3.99999995 -3.99999997 -3.99999998 -4.00000001 -4.00000002 -4.00000005 -4.00000006 -4.00000008 -4.00000009 } -3 { -2.99999991 -2.99999993 -2.99999994 -2.99999995 -2.99999998 -2.99999999 -3.00000002 -3.00000003 -3.00000004 -3.00000006 -3.00000007 -3.00000008 } 3 { +2.99999991 +2.99999993 +2.99999994 +2.99999995 +2.99999998 +2.99999999 +3.00000002 +3.00000003 +3.00000004 +3.00000006 +3.00000007 +3.00000008 } 4 { +3.99999991 +3.99999994 +3.99999995 +3.99999997 +3.99999998 +4.00000001 +4.00000002 +4.00000005 +4.00000006 +4.00000008 +4.00000009 } 6 { +5.99999992 +5.99999993 +5.99999994 +5.99999995 +5.99999998 +5.99999999 +6.00000004 +6.00000005 +6.00000006 +6.00000007 +6.00000009 } 7 { +6.99999993 +6.99999994 +6.99999995 +6.99999997 +6.99999999 +7.00000001 +7.00000002 +7.00000005 +7.00000009 } 8 { +7.99999991 +7.99999992 +7.99999993 +7.99999994 +7.99999995 +7.99999996 +7.99999997 +7.99999998 +7.99999999 +8.00000001 +8.00000002 +8.00000003 +8.00000005 +8.00000006 +8.00000007 +8.00000008 +8.00000009 } 10 { +9.99999994 +9.99999995 +9.99999996 +9.99999997 +9.99999998 +9.99999999 +10.00000002 +10.00000003 +10.00000004 +10.00000005 +10.00000006 +10.00000007 +10.00000008 } 12 { +11.99999991 +11.99999992 +11.99999994 +11.99999995 +11.99999996 +11.99999997 +11.99999998 +11.99999999 +12.00000001 +12.00000002 +12.00000003 +12.00000004 +12.00000006 +12.00000007 +12.00000008 +12.00000009 } 18 { +17.99999991 +17.99999992 +17.99999993 +17.99999994 +17.99999995 +17.99999996 +17.99999997 +17.99999998 +18.00000002 +18.00000005 +18.00000008 +18.00000009 } 24 { +23.99999991 +23.99999993 +23.99999995 +23.99999997 +23.99999998 +24.00000004 +24.00000005 +24.00000006 +24.00000007 +24.00000008 +24.00000009 } 29 { +28.99999991 +28.99999993 +28.99999994 +28.99999995 +28.99999996 +28.99999997 +28.99999998 +28.99999999 +29.00000003 +29.00000004 +29.00000005 +29.00000009 } 35 { +34.99999991 +34.99999992 +34.99999993 +34.99999994 +34.99999995 +34.99999997 +34.99999998 +34.99999999 +35.00000001 +35.00000002 +35.00000004 +35.00000005 +35.00000006 +35.00000007 +35.00000008 +35.00000009 } 40 { +39.99999991 +39.99999993 +39.99999994 +39.99999995 +39.99999996 +39.99999999 +40.00000001 +40.00000003 +40.00000004 +40.00000005 +40.00000006 +40.00000007 +40.00000008 +40.00000009 } 46 { +45.99999992 +45.99999993 +45.99999994 +45.99999995 +45.99999997 +45.99999998 +45.99999999 +46.00000002 +46.00000003 +46.00000004 +46.00000006 +46.00000007 +46.00000009 } 47 { +46.99999991 +46.99999992 +46.99999993 +46.99999994 +46.99999995 +46.99999997 +46.99999998 +46.99999999 +47.00000001 +47.00000002 +47.00000004 +47.00000005 +47.00000006 +47.00000007 +47.00000009 } 48 { +47.99999991 +47.99999992 +47.99999993 +47.99999995 +47.99999998 +48.00000002 +48.00000003 +48.00000004 +48.00000005 +48.00000007 +48.00000008 +48.00000009 } 63 { +62.99999991 +62.99999994 +62.99999997 +62.99999999 +63.00000002 +63.00000005 +63.00000008 +63.00000009 } 66 { +65.99999991 +65.99999992 +65.99999993 +65.99999994 +65.99999995 +65.99999996 +66.00000001 +66.00000003 +66.00000004 +66.00000005 +66.00000006 +66.00000007 +66.00000008 } 70 { +69.99999991 +69.99999992 +69.99999994 +69.99999995 +69.99999997 +69.99999998 +69.99999999 +70.00000001 +70.00000002 +70.00000004 +70.00000005 +70.00000007 +70.00000008 } 71 { +70.99999991 +70.99999992 +70.99999993 +70.99999995 +70.99999996 +70.99999997 +70.99999998 +70.99999999 +71.00000001 +71.00000004 +71.00000005 +71.00000008 +71.00000009 } 72 { +71.99999991 +71.99999992 +71.99999993 +71.99999994 +71.99999995 +71.99999998 +72.00000001 +72.00000002 +72.00000004 +72.00000005 +72.00000006 +72.00000007 +72.00000008 +72.00000009 } 80 { +79.99999992 +79.99999993 +79.99999994 +79.99999995 +79.99999996 +79.99999997 +79.99999998 +80.00000001 +80.00000002 +80.00000004 +80.00000005 +80.00000006 +80.00000009 } 82 { +81.99999991 +81.99999992 +81.99999993 +81.99999994 +81.99999995 +81.99999997 +81.99999998 +81.99999999 +82.00000001 +82.00000002 +82.00000003 +82.00000006 +82.00000007 +82.00000008 +82.00000009 } 84 { +83.99999991 +83.99999993 +83.99999994 +83.99999995 +83.99999996 +84.00000001 +84.00000002 +84.00000004 +84.00000005 +84.00000006 +84.00000007 +84.00000009 } 86 { +85.99999991 +85.99999994 +85.99999995 +85.99999998 +85.99999999 +86.00000001 +86.00000002 +86.00000003 +86.00000005 +86.00000006 +86.00000009 } 87 { +86.99999992 +86.99999993 +86.99999994 +86.99999995 +86.99999996 +86.99999997 +86.99999998 +87.00000001 +87.00000002 +87.00000003 +87.00000005 +87.00000006 +87.00000007 +87.00000009 } As you can see, just adding or subtracting 0.00000001 doesn't work for all of them. You can use any of those corrected coordinates in place of the broken latitudes, so whenever your calcs find a hotspot candidate at one of the broken latitudes, just enter one of the corrections for that latitude into the game instead. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 27, 2009 Report Share Posted October 27, 2009 I also reproduced the error, but there was no latitude for which it appeared for all longitudes. Also, 0.00000001 fixed the error in all my tests without exception. Quote Link to comment Share on other sites More sharing options...
AirMe Posted October 27, 2009 Author Report Share Posted October 27, 2009 Get ready for the reset. I hope someone who speaks something other than Math will find it. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted November 1, 2009 Report Share Posted November 1, 2009 Assuming the formula hasn't changed since last month, I should be able to calculate a 99% region with just 3 datapoints. Quote Link to comment Share on other sites More sharing options...
Ron Paul Posted November 1, 2009 Report Share Posted November 1, 2009 Assuming the formula hasn't changed since last month, I should be able to calculate a 99% region with just 3 datapoints. If you don't get the needed data soon, I'll move one or more at random to assist. Quote Link to comment Share on other sites More sharing options...
Tushar Dhoot Posted November 1, 2009 Report Share Posted November 1, 2009 -12.00000, -19.00000 Giving me 54%. Quote Link to comment Share on other sites More sharing options...
Slayer1557 Posted November 1, 2009 Report Share Posted November 1, 2009 10.00000, -30.00000 70% Luckily that was where my brand new moon mine started. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted November 1, 2009 Report Share Posted November 1, 2009 That's two, so I just need one more now. If someone wants to try a spot, (34,-68) or (52,-33) are good candidates given the current information. Quote Link to comment Share on other sites More sharing options...
BeggarKing Posted November 1, 2009 Report Share Posted November 1, 2009 Location: 67.33986, -70.31250 Base Effectiveness: 77% Hope that helps you, Provost! Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted November 1, 2009 Report Share Posted November 1, 2009 Location: 67.33986, -70.31250Base Effectiveness: 77% Hope that helps you, Provost! Indeed it does, thank you! 35.00000001, -68 100% Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.