Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: I'm Stumped!

  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry I'm Stumped!

    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!!!!

    Kim
    Attached Files Attached Files

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •