Results 1 to 11 of 11

Math Help - Sorting out the maths in some game code.

  1. #1
    Newbie
    Joined
    May 2010
    Posts
    6

    Sorting out the maths in some game code.

    I completely edit my last post in this should be more simple to understand and maybe figure out. I found out that "x" decreases as "a" increase. But the "x" value in both equations should equal each other.

    ax = b

    65x = 134
    77x = 157
    Last edited by JonnyMe; May 26th 2010 at 04:45 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by JonnyMe View Post
    I completely edit my last post in this should be more simple to understand and maybe figure out. I found out that "x" decreases as "a" increase. But the "x" value in both equations should equal each other.

    ax = b

    65x = 134
    77x = 157
    What you have posted is meaningless. If you hope to get help, post the whole question.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2010
    Posts
    6
    Quote Originally Posted by mr fantastic View Post
    What you have posted is meaningless. If you hope to get help, post the whole question.
    Don't call someone else work meaning less, if it is unsolvable then say so.

    I read your rules nothing about post bumping.

    x needs to equal something, this is not homework a problem this is part of a game code that I would like to figure out. I would have figured it out myself but I am not exactly fresh on my freshman algebra or whatever this falls under.

    65 = 134
    77 = 157

    65 x (something) = 134
    77 x (something = 157
    A x (something) = C
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by JonnyMe View Post
    Don't call someone else work meaning less, if it is unsolvable then say so. Mr F says: It is in your own interests, not mine, that you make what you post meaningful. Otherwise, you will simply find that no-one bothers to reply and you will be left wondering why.

    I read your rules nothing about post bumping. Mr F says: Rule #10. Read it.

    x needs to equal something, this is not homework a problem this is part of a game code that I would like to figure out. I would have figured it out myself but I am not exactly fresh on my freshman algebra or whatever this falls under.

    65 = 134
    77 = 157

    65 x (something) = 134 Mr F says: (something) = 134/65.
    77 x (something = 157 Mr F says: (something) = 157/77.
    A x (something) = C Mr F says: (something) = C/A.
    ..
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    May 2010
    Posts
    6
    Quote Originally Posted by mr fantastic View Post
    ..
    " 10) Do not beg for answers. If your question is unanswered do not make a post begging for someone to reply back, it is totally useless. Other members can see the question."
    Very very vague interpretation of bumping.

    No one bothers to reply because no one knows the answer you got is wrong also.

    It has to be solvable its part of the game's code so there must be very complex.

    Here is it is to the simplest level I can put it:

    A x B = C
    D x B = E

    B = B

    A = 65
    B = unknowable
    C = 134
    D = 77
    E = 157
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by JonnyMe View Post
    " 10) Do not beg for answers. If your question is unanswered do not make a post begging for someone to reply back, it is totally useless. Other members can see the question."
    Very very vague interpretation of bumping.

    No one bothers to reply because no one knows the answer you got is wrong also.

    It has to be solvable its part of the game's code so there must be very complex.

    Here is it is to the simplest level I can put it:

    A x B = C
    D x B = E

    B = B

    A = 65
    B = unknowable
    C = 134
    D = 77
    E = 157
    mr fantastic is giving you valid feedback, and your questions really don't make sense.

    If what you say is true, then

    \frac{134}{65} = \frac{157}{77}

    which we know is not true, so you're looking for a B that does not exist.

    There must be something wrong with the way you're coding the game, or the way you are conceptualizing.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    May 2010
    Posts
    6
    Quote Originally Posted by undefined View Post
    mr fantastic is giving you valid feedback, and your questions really don't make sense.

    If what you say is true, then

    \frac{134}{65} = \frac{157}{77}

    which we know is not true, so you're looking for a B that does not exist.

    There must be something wrong with the way you're coding the game, or the way you are conceptualizing.
    mr fantastic's math is correct but does not work with the equation, the game is completed already and been working its not mine, I really got to show you guys what I am trying to get out of this.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by JonnyMe View Post
    mr fantastic's math is correct but does not work with the equation, the game is completed already and been working its not mine, I really got to show you guys what I am trying to get out of this.
    Care to share any lines of code? I can read most languages... I assume it's not assembler.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    May 2010
    Posts
    6
    Quote Originally Posted by undefined View Post
    Care to share any lines of code? I can read most languages... I assume it's not assembler.
    Great I can't find my 77-77 carbine. So I got to do different numbers now.

    Here is where its from and I don't have access to the game's code, but as far as I know this feature in it is working correctly.



    Uploaded with ImageShack.us

    So shooting with a 65-65 carbine (damage will always be the same since the damage range on the carbine is the same number) your spray shot will always do 134 damage no mater what. Same thing with the 153 carbine.

    So now.

    A x B = C
    D x B = E

    B = B

    A = 65
    B = unknowable
    C = 134
    D = 153
    E = 313
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by JonnyMe View Post
    Great I can't find my 77-77 carbine. So I got to do different numbers now.

    Here is where its from and I don't have access to the game's code, but as far as I know this feature in it is working correctly.



    Uploaded with ImageShack.us

    So shooting with a 65-65 carbine (damage will always be the same since the damage range on the carbine is the same number) your spray shot will always do 134 damage no mater what. Same thing with the 153 carbine.

    So now.

    A x B = C
    D x B = E

    B = B

    A = 65
    B = unknowable
    C = 134
    D = 153
    E = 313
    Okay this is what I gather.

    You have a function f(x) that maps the carbine number (whatever it's called) to the damage it does.

    So f(65) = 134
    f(77) = 157
    f(153) = 313

    You are looking for an expression for f(x) that allows you to calculate damage given arbitrary carbine number x.

    This is a problem of curve fitting. The more data points you have, the better.

    As we already discussed, f(x) cannot be of the form f(x) = kx for some constant real k.

    A quick inspection also reveals that f(x) cannot be linear, of the form f(x) = ax + b.

    We can find a quadratic polynomial to fit the data, but it would be better if you could provide more data points. That way, if we fit three points using a quadratic curve and any additional points happen to be on the curve, we will have some confidence we found the right curve.

    So far these are the data points.

    (65, 134)
    (77, 157)
    (153, 313)

    We don't even know if the program uses a polynomial f(x). For all we know, it could based on an arbitrary table of values. But curve fitting seems to be the best solution for what you want, unless you can get access to the game's source code.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    May 2010
    Posts
    6
    Quote Originally Posted by undefined View Post
    Okay this is what I gather.

    You have a function f(x) that maps the carbine number (whatever it's called) to the damage it does.

    So f(65) = 134
    f(77) = 157
    f(153) = 313

    You are looking for an expression for f(x) that allows you to calculate damage given arbitrary carbine number x.

    This is a problem of curve fitting. The more data points you have, the better.

    As we already discussed, f(x) cannot be of the form f(x) = kx for some constant real k.

    A quick inspection also reveals that f(x) cannot be linear, of the form f(x) = ax + b.

    We can find a quadratic polynomial to fit the data, but it would be better if you could provide more data points. That way, if we fit three points using a quadratic curve and any additional points happen to be on the curve, we will have some confidence we found the right curve.

    So far these are the data points.

    (65, 134)
    (77, 157)
    (153, 313)

    We don't even know if the program uses a polynomial f(x). For all we know, it could based on an arbitrary table of values. But curve fitting seems to be the best solution for what you want, unless you can get access to the game's source code.
    Appreciate the help but finding a weapon (carbine) with the min=max damage is very very hard and a rare thing, I was only able to get a hold of 3 if more appear I can add them in to, but you gave me a start to work on this myself, from what I see the higher the damage carbine the less the damage multiplier spray shot is doing, so the multiplier of spray shot is a formula based on how much damage the carbine has.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Game theory: Are there any other equilibria in this game?
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: March 7th 2012, 06:45 PM
  2. Game Theory: Hotelling game with 3 players
    Posted in the Advanced Applied Math Forum
    Replies: 2
    Last Post: March 26th 2011, 02:08 AM
  3. [game theory] Election game
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: April 22nd 2009, 07:32 AM
  4. Sequential-form game (game tree diagram)
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: October 5th 2008, 06:51 PM
  5. Investigating Maths Game
    Posted in the Math Challenge Problems Forum
    Replies: 5
    Last Post: December 22nd 2006, 01:09 PM

Search Tags


/mathhelpforum @mathhelpforum