View Full Version : I'm Stumped!

06-30-2005, 08:08 PM
Hey Everyone! :)

I'm hoping I can get some help from the java community! I've got a java code that I wrote with a friend of mine in order to get some help in determining some numbers for an online computer game. When you go to the optimization page (http://www.cs.wpi.edu/~roxton/optimizer.htm), and you click on "Do Optimization" it automatically begins to generage a geld number for you. When the optimization is complete and you scroll to the top, you get a Geld Number. If you run the optimization again, it comes up with a different number. What I don't understand is why does it come up with different numbers all the time and why doesn't it keep re-improving itself? I'm not talking about re-coding but improving everytime becasue it knows it can get 18 million one try and 19 million the next. It's the different results that makes no sense. I don't want to have to put 100,000 failures to test 100,000 different scenarios for every turn (and you can only get up to 120 turns), it should know the best way to get money. I've attached a copy of the code in hopes that someone can help me out. I realized last night that when you do it against 19 turns, it comes up with the same result due to the fact that it's geld for 19 turns, at 20 and 21 it builds things (not sure if that helps any!). I appreciate all and any help I can get! Thank you!!!!


06-30-2005, 08:12 PM
Umm not to sure what the problem is but Javascript is NOT Java. PM a moderator to move this for you do not cross post! This can fit in the computer programming forum.