Coffee Shock Posted October 12, 2009 Report Share Posted October 12, 2009 If Zakharov's constant is the right one (and I believe it is), then this cannot be the hotspot I tried and the spot I calculated do give 100% effectiveness. Zakharov is not completely wrong but he missed an important detail. Quote Link to comment Share on other sites More sharing options...
Silvara Posted October 13, 2009 Report Share Posted October 13, 2009 I can vouch for Lat=-70.99999991, Lon=67 giving 100%, though it shows up as -71.00000, 67.00000 in the moon display. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 13, 2009 Report Share Posted October 13, 2009 I tried and the spot I calculated do give 100% effectiveness.Zakharov is not completely wrong but he missed an important detail. OK smart guy, what did I miss? Please enlighten us. Quote Link to comment Share on other sites More sharing options...
jonnygozy Posted October 13, 2009 Report Share Posted October 13, 2009 I can vouch for Lat=-70.99999991, Lon=67 giving 100%, though it shows up as -71.00000, 67.00000 in the moon display. Just moved my moon base and found this as well. Odd. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 13, 2009 Report Share Posted October 13, 2009 well, this is strange... I used (-70.99999991, 67) for the moon base Quote Link to comment Share on other sites More sharing options...
Coffee Shock Posted October 13, 2009 Report Share Posted October 13, 2009 OK smart guy, what did I miss? Please enlighten us. There was nothing wrong in your calculations but it was not a pure math problem. The hotspot is {-71, 67} but instead of making it a special case the game calculates the distance and any distance greater than zero is rounded down to 99%. In this case floating-point accuracy makes the distance non-zero even when the moon facility is exactly on the hotspot. I calculated the error from the correct position so that the distance calculation gives exactly zero. Quote Link to comment Share on other sites More sharing options...
JoshuaR Posted October 13, 2009 Report Share Posted October 13, 2009 LOL. That's hilarious. For future reference, uh, how do we calculate the error? Thanks. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 13, 2009 Report Share Posted October 13, 2009 The hotspot is {-71, 67} but instead of making it a special case the game calculates the distance and any distance greater than zero is rounded down to 99%.In this case floating-point accuracy makes the distance non-zero even when the moon facility is exactly on the hotspot. I calculated the error from the correct position so that the distance calculation gives exactly zero. Cool, I see. Good job! I'm still a little confused though, doesn't the exact error depend on 1) how admin typed in the formula, and 2) what precision the calculations are done in? How could you know either of those things? I tried a couple variations and I wasn't able to replicate this non-zero distance between {-71,67} and itself. Can you show what formula you are using, and how you calculated the error? Quote Link to comment Share on other sites More sharing options...
Slayer1557 Posted October 14, 2009 Report Share Posted October 14, 2009 Yes, teach us O' Master! *bow* *bow* Quote Link to comment Share on other sites More sharing options...
Kozmo101 Posted October 14, 2009 Report Share Posted October 14, 2009 how do I put the coordinates in? Quote Link to comment Share on other sites More sharing options...
thedestro Posted October 15, 2009 Report Share Posted October 15, 2009 how do I put the coordinates in? There is no inputter, I just eyeball it Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 15, 2009 Report Share Posted October 15, 2009 how do I put the coordinates in? See this post: http://forums.cybernations.net/index.php?s...t&p=1806043 There is no inputter, I just eyeball it Fail. Quote Link to comment Share on other sites More sharing options...
Kozmo101 Posted October 15, 2009 Report Share Posted October 15, 2009 thanks man! Got it. Quote Link to comment Share on other sites More sharing options...
thedestro Posted October 15, 2009 Report Share Posted October 15, 2009 Fail. Much better to look at somebody else's 100% map and just zoom in and keep moving your base closer and closer than looking at the horrible eyesore that is the source code. Quote Link to comment Share on other sites More sharing options...
Provost Zakharov Posted October 15, 2009 Report Share Posted October 15, 2009 Much better to look at somebody else's 100% map and just zoom in and keep moving your base closer and closer than looking at the horrible eyesore that is the source code. Sigh. There is no looking at source code involved in setting your coordinates. Go read the link again. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 17, 2009 Report Share Posted October 17, 2009 I am not sure how to handle this floating point error, but the good news is that both coordinates are integers. Quote Link to comment Share on other sites More sharing options...
Sande Posted October 18, 2009 Report Share Posted October 18, 2009 I don't think it's that difficult... You find the integers where the percentage is 100%, then you have to ultimately test 4 numbers: 1) x+0.000000001 y+0.000000000001 2) x+0.000000001 y-0.000000000001 3) x-0.000000001 y+0.000000000001 4) x-0.000000001 y-0.000000000001 From what I understand, some computer programs calculate this way, rounding up/down long numbers like these. Maybe you just have to use x-0.00...1 y-0.00...1 Quote Link to comment Share on other sites More sharing options...
Rich333 Posted October 19, 2009 Report Share Posted October 19, 2009 I don't think it's that difficult... You find the integers where the percentage is 100%, then you have to ultimately test 4 numbers: 1) x+0.000000001 y+0.000000000001 2) x+0.000000001 y-0.000000000001 3) x-0.000000001 y+0.000000000001 4) x-0.000000001 y-0.000000000001 From what I understand, some computer programs calculate this way, rounding up/down long numbers like these. Maybe you just have to use x-0.00...1 y-0.00...1 Floating points use binary fractions, so numbers which are easily expressible in decimal (for example, 0.000000000001), may be impossible to accurately represent in floating point. Using 32-bit floating point, what's actually stored for "0.000000000001" is 0.0000000000009999999960041972002500187954865396022796630859375, and for 64-bit floating point it's actually 0.000000000000999999999999999979886647629255615367252843506129522666014963760972 02301025390625. Small integers, like -71, should be perfectly representable in floating point though; you can store -71 in 32-bit floating point with perfect precision, so I don't know where the floating-point error could be creeping in. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 19, 2009 Report Share Posted October 19, 2009 Both (-71.00000001, 67) and (-70.99999991, 67) give 100% and (-71, 67) gives 99%. I don't know where the problem is exactly, but using Provost Zakharov's efficiency function in excel I get the same results. I guess that it comes from issues with floating point accuracy of the trigonometric calculations. Quote Link to comment Share on other sites More sharing options...
wolfprince Posted October 20, 2009 Report Share Posted October 20, 2009 Is the hotspot the same for the mine? Quote Link to comment Share on other sites More sharing options...
King Irwin Posted October 21, 2009 Report Share Posted October 21, 2009 Is the hotspot the same for the mine? Yes, it's the same for all 3 moon wonders. Quote Link to comment Share on other sites More sharing options...
Rich333 Posted October 22, 2009 Report Share Posted October 22, 2009 There was nothing wrong in your calculations but it was not a pure math problem.The hotspot is {-71, 67} but instead of making it a special case the game calculates the distance and any distance greater than zero is rounded down to 99%. In this case floating-point accuracy makes the distance non-zero even when the moon facility is exactly on the hotspot. I calculated the error from the correct position so that the distance calculation gives exactly zero. Any chance of us ever finding out the details? Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 23, 2009 Report Share Posted October 23, 2009 (edited) Any chance of us ever finding out the details?I cannot explain why, but what happens is this:The hotspot is (-71, 67). There is a formula to calculate distances on a sphere. When you use this formula to find the distance from (-71, 67) to (-71, 67), which is obviously 0, on a computer, you get a result which is very small, but still bigger than 0. Therefore, the efficiency you get if you use these exact coordinates is 99% when mathematically it has to be 100%. The problem is solved if you change the coordinates a little and add or subtract a very small number to one of them. 0.0000001 worked in all my tests. Edited October 23, 2009 by Golan 1st Quote Link to comment Share on other sites More sharing options...
jonnygozy Posted October 23, 2009 Report Share Posted October 23, 2009 I cannot explain why, but what happens is this:The hotspot is (-71, 67). There is a formula to calculate distances on a sphere. When you use this formula to find the distance from (-71, 67) to (-71, 67), which is obviously 0, on a computer, you get a result which is very small, but still bigger than 0. Therefore, the efficiency you get if you use these exact coordinates is 99% when mathematically it has to be 100%. The problem is solved if you change the coordinates a little and add or subtract a very small number to one of them. 0.0000001 worked in all my tests. This is ridiculous. I hope the admin is reading this or is aware of the situation so it can be fixed for next month's hotspot. Quote Link to comment Share on other sites More sharing options...
Golan 1st Posted October 23, 2009 Report Share Posted October 23, 2009 (edited) 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. Edited October 23, 2009 by Golan 1st 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.