Announcement

Collapse
No announcement yet.

What's the formula for HURRY cost?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    Frankie's formula is close and your's might also be, but neither one is the correct formula. Both are approximations. I say that because the are both curves. The true formula is actually a series of connected lines, each one increasing in rate in sequence.

    Anybody else who might be reading this might keep in mind that he already admited that his formula does not give correct results and you have to round off sometimes.

    Comment


    • #47
      Esteedmed Adam_Smith, I'm not a math teacher as Frankie is, but it's amazing to read such statements from a famous Economist like you were!

      We're talking here about the function which determines the cost needed to be paid for all the missing minerals of a unit.

      Can you "buy" a fraction of a mineral when you ask to hurry an item?
      NO.
      Thus, the input values for our formulas are only integer values, and positive ones I might add.
      A function is not only defined by a formula, but also from the domain of the input values.
      The same formula, applied on domains of different kind, may yeld different charts (we're implicitly talking of formulas of the kind y=f(x), generating flat charts on a cartesian plane).

      Frankie's formula, applied on the continuous domain of the real numbers will indeed yield a continuous curve, a parabola indeed.
      BUT we have to limit ourselves here only to INTEGER input values.
      THUS, "The true formula is actually a series of" individual, separated points on the plane.

      Now, Frankie's formula is approximate indeed. The example I reported for the infamous case of the 5 missing minerals to complete, yields 11.25 indeed, which is not exact.
      In general a formula with integer input values does not necesarily yield integer output values.
      In our case tho, as the values we want to obtain with the formula are the costs that the game will ask us, then we are also limited to integer *output* values.

      We should thus elaborate the formula so that it respects the above constraint.
      First I want to have you observe that the distance of the costs calculated with Frankie's formula from the game costs is always < 1. We are lucky because now we need just to determine whether there is a simple rule which tells us how the decimal values from Frankie's formula have to be rounded (to the nearest, up, down, or a special mix).

      From observations, it should be not difficult to see that all the values from Frankie's formula have always to be rounded DOWN. That's what the INT() operator does. It keeps the integer part of a number, discarding the decimal part. That is, INT(1.001) and INT(1.999) both yield 1, and so do all the values in between.

      With that knowledge, I can say that my formula, obtained by simply applying the INT() operator to Frankie's one, always yields integer results, and those results are also always the costs that the game asks to complete M missing minerals.
      Even with my imperfect knowledge of your mother-language, this means that:
      my formula IS exact.
      THUS, "Anybody else who might be reading this might keep in mind that he" can use my formula, and he will always obtain the exact costs that the game wil ask him.

      (This might even lead us to say that this formula is indeed THE way that FurXs programmers determined that costs table, although it's just a supposition)

      Finally, for the sake of precision (!), I'd add that:
      - even if a fourmula yields a curve, as long as the points you need to find do lie all on that curve, then that formula is exact on the domain you apply it to (OK, this is NOT the case of Frankie's formula which is indeed approximate)
      - My formula is NOT a "curve"! Being filtered thru the INT() operator, my formula is a series of horizontal NOT connected lines, whose y values are all integer! Indeed ALL the points we need to find DO lie on those lines (thus, my formula is exact)!
      (BTW, striclty speaking, a line is actually a particular case of a curve, thus a curve too as well! but I know you were telling it in the common sense acception)

      ---

      The most misleading thing I opposed to tho, was the issue of partial payments.
      From many of the posts of this thread, a superficial reader might get the convinction that even if he misses the same 20 minerals to complete a unit, paying for 10 out of those 20 missing will cost him more than double than paying for 5 out of those 20 missing. That's wrong, and I already explained how (and I hope that many of us knew it already!).
      In this second step, we do not need a formula, it's just like grocery maths. And we will almost always obtain a decimal price, which in this case we'll have to round UP.
      Imagine that we know that 15 apples cost 41$ (!). Now, we can calculate that one of THOSE apples costs 41/15 $, that is 2.733...$. Unfortunately the grocer is a bastard: he neither keeps nor accepts coins! So, if we want to buy 7 of THOSE 15 apples, the price will be 19.13$, but we'll have to round it to integer dollar bills. And here the grocer is a double SoB, as he'll take no cent off, so that you'll have to pay 20$. If you pay just 19$, you'll have the bitter surprise to receive only 6 apples.
      These funny details apart, the main thing here is to determine that when the grocer has 15 apples to sell, they cost 41$ overall.
      And my formula is always able to determine that exact cost.

      Sorry Adam_Smith, but you called for one more long post from me!

      I acknowledge all your approximation disclaimers.
      I understand those who thought that finding out the way things really were, looked like much work. But had someone taken the effort before, all this thread discussions could have been cut down to 1/10th (so you spent much time uselessly posting instead of correctly investigating the matter, a tradeoff in work ).

      I'll even say that you're right if you don't like the patronizing tone of my post, and if you say that lectures are not appropriate in these forums. I apologise for that.

      I agree that we mainly post here to make light on obscure gaming issues, for the benefit of the community.

      But then, alas for you, and Frankie already told you something in that line

      "Maths is NOT an opinion"

      and if you come up with "approximate" math statements (if not even incorrect, as the "exponential" matter), expect precisations from us nitpickers... < g >

      MoSe
      - PS: of course, should anyone verify one case where the formula we devised yields an incorrect value, please inform us!



      [This message has been edited by MariOne (edited July 19, 2000).]
      I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

      Comment


      • #48
        That's more rubbish than I've seen in quite sometime. You are very confused.

        Comment


        • #49
          Look,
          I come here occasionally, and I see that you are quite an active poster, and (I got the impression) an estemmed member of the community.

          You don't like the way I write? You might be right.
          You don't like the tone of my posts? I know, I'm trying to improve and be more amiable.
          You are bored by details? Just skip them if you want.

          I'm too opinionated and I come too fast to conclusions? If someone points this out to me, I try to verify where I may have slipped, and I'm ready to recognize it.

          Said that,
          quote:

          That's more rubbish than I've seen in quite sometime. You are very confused


          Do you possess the faculty to elaborate a little further your opinion? After all english should be your main language, not mine.

          What do you think it's rubbish?
          The mathematical facts that I report?
          Their relevance to the issue we're discussing (Units Hurrying costs)?
          My comments about your posts in the thread?
          Hold this for a while, and let's talk about confusion.
          Is that comment from you something circumstantiated and with a meaning? That is, are you referring to somethig specific which I failed to get the structure or the implications of?

          I reread the thread again, to give you the credit that you might have seen something that I missed.

          I counted at least a dozen of posts containig wrong statements, and I'm talking about facts and not opinions.
          Others, kept saying something like "I don't know how the things work, I should be checking it first, but hey, I want to tell you my opinion based on my intuition".
          It's, OK, I often indulge in the same. But then when someone points my mistakes out I immediately recognize it.

          And your "lot of experimenting" was random, hapazardous, it didn't help you getting near to the point. The only one who truly contributed to the issue is Frankie, with some help from HP & Mongoose.

          I know that I am long winded, can't help it, I always fear that I'd fail to make clear what I mean, with my improper use of english.
          But at least here I gave you facts and figures, and they work and are exact.

          So what's rubbish, and why do you think I'm confused?

          I presented you a reasoning, answering to points with counterpoints, and all you can come up with are insults?
          If I was so far from reality (as apparently only you can see how it really is), you could have just ignored me.
          But as you bothered to reply, this means that is so important to you to have the last word.
          Frankly, I don't care. I care to discuss points, and if I have something to add that I'll think USEFUL, I'll do it.

          + I presented you the exact formula.
          - You told that there is no such formula.
          + I replied that my formula yielded the exact values, thus it was exact.
          - You wrote some very superficial statement, and advised the thread readers to not trust what I posted, that it was incorrect.
          + I had then, for the sake of the readers, to show HOW and WHY my contribution to the thread issue was worthy, and your objections were groundless.
          - you recurred to insults finally

          From my exeprience, when someone recurs to insults, he shows that he lacks something significant, pertinent, relevant (...intelligent?) to say about the matter at hand.

          Or you thought that making me see your so wise point was hopeless?
          C'mon, for me it's not a matter to prove that I'm better than someone else, if you'll reply with another insult I won't bother to reply back, you'd just show that you're a loser in such case.

          But if you think that I'm so wrong and that you're better than me (at getting what this thread is about, at least), please show me, and first of all to the readers, HOW and WHY they should be wary to trust what I thought being a useful contribution to the knowledge of game mechanics.
          The thing I long the most for, is learning.
          If you have something meaningful to say, please, teach me, I'll be grateful.
          Otherwise, adding insults, you just prove that you didn't understand what was the point of the discussion, but you needed to have the last word because you felt outwitted (and that never was my aim or concern, I assure you).

          Do you have something to teach me? I believe that here in Apolyton there are MANY who can do that, but I begin to doubt that you're one of those.

          Prove me that I'm wrong. Please.

          I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

          Comment


          • #50
            Dear Adam Smith.
            You replied with the artfully crafted sentence "That's more rubbish than I've seen in quite sometime. You are very confused", questioning Marios fantastic research.
            His formula is for RUSHING UNITS only, of course, and unerringly correct for 1-8000+ minerals. May i humbly suggest you read Marios posts and ask him, or other people who can correctly count to 6 and even higher, about the sources of *your incomprehension*, rather then dismissing the correct formula and its author totally ?


            [This message has been edited by Meister Flo (edited July 22, 2000).]

            Comment


            • #51
              I don't have to do that. Many people have said all there is needed to be said about the hurry cost. I can't help either of you any further. If you are so bad at math that you can't figure it out then don't even worry about it.

              Comment


              • #52
                I am reminded of the old proverb...

                "Never try to teach a pig to sing. It only annoys the pig, and makes you look like a fool."

                Comment


                • #53
                  Thank you Flo and Jam, I was indeed beginning to ask myself whether my insisting with Adam_Smith could have been useless (read: I was beginning to feel like a fool indeed).

                  As I said, I am not interested in having the last word in a useless pride dispute, so I won't further answer to Adam_Smith posts here (unless he will come up with something significant of course).

                  I have nothing personal with him, practically I don't know him, I even liked sometimes what he wrote in other threads, and I truly don't care being declared right or wrong, betters or worse.

                  I reported facts, which I honestly thought were right and could bring a contribution to the topic issue, adding something that the thread lacked.
                  I don't claim to be perfect, I am the first to recognize that I make mistakes and errors. I'm happy if someone points me out my errors, so that I can correct myself and get better. Of course to say that the facts I reported are wrong, this one has to prove it by reporting the "true" facts, and by showing why those are right and where my mistake lied (none of which incidentally Adam_Smith did).

                  ---

                  So, I'm not addressing to Adam_Smith now.
                  I think that Apolyton is a worthy site for discussing about game techniques and details.
                  When it's about playing styles, each one can have his own, and I would not have the presumption to insist that mine is "right" or "better", stating my opinion once would be enough.

                  But as this thread subject speaks about a formula, we're talking about facts, and not opinions.
                  I realize that, while I hoped to bring a positive contribution to the issue at hand, Adam_Smith personal feud against me could have confused the readers further.

                  So I think that it's useful for the occasional reader who came here to get informations about the minor technicality which is the subject of the thread, if someone summarizes the facts, and I humbly put myself to the task as I seem to have "provoked" the mess.


                  ---
                  Units Hurrying Costs
                  SUMMARY


                  Dear reader, interested in the formula for hurrying units in SMAC (facilities are trivial), and who had the patience to read it all the way till here.
                  • First, be advised that the initial posts were a tentative approach to the solution.
                  • So, many people have posted WRONG statements about the hurrying costs, in the initial part of the thread. This is a fact, anyone could be able to verify it on his own (that is, I'm not blaming those posters, they were making an honest attempt to the solution, it's not a shame if you take the wrong way some times before finding it).
                  • FEW of them stated up front that their statement had to be verifyied yet, and that their conlusions were approximate
                  • before Frankie's post with the formula, NOT all there was needed to be said about the hurrying cost had been said, OTOH some things HAD been said which could MISLEAD you from the actual hurrying facts.
                  • Frankie's formula is an approximated formula, but it's anyway the best fit curve (I did find it on my own too, but it's not just me saying that, it has been confirmed by Frankie, a math teacher, using statistical software)
                  • When does the formula apply: when you need to find out the cost for Hurrying a Unit
                  • Which values do you put in: you input an integer value, the number of minerals missing to complete a whole given unit at a given moment, regardless of your current production.
                  • What does Frankie's formula yield: a decimal value, which best approximates the cost for a complete hurry of a unit with the missing minerals you inputed
                  • HOW do you round that decimal result, i.e. how do you then get to the integer hurrying cost: just ignore the decimals, drop them, read only the integer part of the result.
                    Example: when you respectively need 4, 6 and 14 minerals to complete a unit, Frankie's formula will yeld 8.8, 13.8 and 37.8. the actual costs are 8, 13 and 37.
                    This rounding effect is represented in maths by the INT() operator.
                  • thus, simply adding the INT(...) to Frankie's formula will produce a formula which gives the correct, integer, output values for units complete hurrying costs.
                    This exact formula was my main contribution to the "hurrying theory" here
                  • if you have less than 10 minerals already accumulated, that cost is doubled
                  • for the reader's convenience I reported in the first table the values that I OBSERVED from the game. These are exact, as they are observed, and not derived from the formula (I derived the formula from the detected values, and not viceversa).
                  • after all, many will find much more easy and useful to copy and print that table, disregarding the formula. If you want to extend the table tho, you CAN trust the formula.
                  • What if you want/need to make a "partial" payment? How do you have to use the formula?
                  • FIRST, determine anyway the cost for the complete hurry of the unit! That is, if you miss 20 minerals to complete that unit but you want to pay only for 15 of them, you have to input the number 20 (and NOT 15!!!) in the formula (or look up for it in the table)
                  • THEN, once you determined the cost for a complete hurry, the cost for a partial hurry is proportional: divide for the total number of minerals you miss (20) and multiply for the partial number of minerals you want to buy (15).
                  • BEWARE, this time you have to round UP: SMAC will NOT take off ec decimals from the price! (my grocery example was for that)
                  • for the reader's convenience I pasted too in my first post a table with the Costs per Mineral (CpM, for the different total missing minerals), rounded to the second decimal digit. You can tho easily use Win Calculator from the accessories while you play, I do so too.


                  That's it.
                  THESE ARE FACTS. They were verified, anyone can verify them again on his own should he doubt me.
                  I presented them here for all those who think they might want to determine in advance the cost they'll need to pay for the units they plan to rush.
                  I did put good care and attention into them, nevertheless I have not the presumption to be perfect. So I thank in advance all those who will point out any mistake, whether these are typos (and with figures a typo is a BAD mistake!) or wrong assumptions, reasoning or conclusions from my part, EXPLAINING how the things really stand instead.
                  On the contrary, any Mr.Knowitall just going to show off without supporting his objections with facts and meaningful contribution to the topic issue, please abstain (I say this in general, I'm not addressing to anyone specifically, thank you).


                  BTW, I'm not a guru, but I'm not that bad at math, and I even like it.
                  I won't indulge again in the presumption to judge someone else's statements, nevertheless maths speaks for itself, and I warn the reader to not trust many statements he can read in this thread. Please check them by yourself with any textbook, you'll be able to find out on your own which are right and which wrong, before blindly trusting someone else's assumptions.
                  I make reference here to something posted by Frankie:
                  quote:

                  Adam, I am a math teacher, so please stop. I will send an email to explain them to you.
                  (...I wonder if he did)
                  and from what I read in the thread, I would go out to say that he could be trusted on the subject.


                  Thank you all for your attention.
                  Always glad if I can be of any help.

                  MoSe
                  [This message has been edited by MariOne (edited July 24, 2000).]
                  I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

                  Comment


                  • #54
                    MariOne,

                    I apologize if I'm not playing well with others. Honestly, I haven't read most of your posts. The reason is that there is nothing wrong with the formula. Your new (incorrect) formula may confuse people. On top of that you posts are very long and very incorrect. I only wish to tell others that there is nothing wrong with the established formula.

                    Comment


                    • #55
                      Adam, would you please do everyone a favor, and load SMAC, start the Scenario Editor and verify the hurry costs as MoSe and I did ?

                      Thank you in advance. And when you're done, please come back and tell us what you found out...

                      Have a nice day.
                      Aredhran

                      Comment


                      • #56
                        Adam, you usually give a worthy contribution in the other threads you post here, and you have the merit to always keep politeness (in the form at least) even when arguing, and in this you are probably better educated than I am.
                        So, I don't understand why we can't come to explain our incomprehensions in a reasonable way.

                        I gladly reply to your last post despite my previous words, as I think to spur in it a desire to overcome a sterile opposition.
                        Yet, I can't but disagree again with the things you say.

                        You're right my posts are long, you need patience to read thru them, I apologized already. That's also why I decided to summarize the main points.
                        One could argue that you should red them all before objecting, but it's also ok if you focus on just a part of it.

                        I always wrote that Frankie's formula was the best approximate formula you could find.
                        I only used a mathematical operator to transform Frankie's approximate resutls in the exact ones.

                        So, if with the established formula you intend Frankie's one, you did object to it much more than I did, and now you accuse me of telling it was wrong. That's false.

                        Now you state that:[list=1][*] my formula is incorrect[*] my posts are incorrect[*] my formula confuses people[/list=a]

                        As long as you keep a reasoning mood, I have no problems in replying you that:[list=1][*] as far as I can say, my formula always yields the correct, exact values, thus is correct. Even if you would be right in seeing its incorrectness (which in theory I admit possible), your statement is useless and unacceptable if you don't show us where and why. Perhaps you don't accept the validity of the INT() operator in "pure" arithmetichs? Well, do state it, and let's discuss.[*] about the math statements that I made, or about my comments on the other posters? If you don't specify, your comment is of no use to the reader. Anyway, if you object to the maths I reported, I assure you that I'll be able to discuss your factual objections, and recognize your eventual reasons.[*] I wrote an updated formula which anyone could use and see that its results are correct, and not just approximate. You objected to it without bringing any counterproof. In my opinion, and not only mine, it's THIS attitude of yours which indeed is causing very much confusion in the readers about the facts.[/list=a]

                        Rereading my posts, I thought that you didn't like my attack to the other posters and the things thay posted.
                        I hope to make clear things about this with you in two points:
                        • Having settled long before the matter for myself, with little effort and mere observation of the facts, I was amazed not because many posts were wrong, but because I knew that so little would have been required to get to the thruth easier and earlier.
                          I apologize if some poster got offended by my supercilious (?) and patronizing tone. Nevertheless, on the way to the best approximated formula, many wrong things HAVE been written (see footnote), and only few posters disclaimed about the unreliability of their assumptions, like HeliumPond did.
                        • It's not Frankie's formula or mine to confuse people. I can tell you on the contrary that a very experienced player (and scientifically prepared professional too) who also posted on this thread, was brought to assume the wrong method and obtain the wrong results for partial payments, indeed because of the confusing and misleading statements made in this thread before Frankie posted his almost perfect, approximate formula. It's exactly because of the confusion generated BY THIS THREAD in my friend and Pactmate, that I dared to think that I could have brought a useful contribution here.


                        I tried to keep it as short as possible, but these things had to be said in order to seek mutual understanding, methinks.

                        Ball to you, but please next time bring facts too.

                        MoSe (aka MariOne)

                        Footnote: I think that it's not nice to make a list, and it would not be the point here, as after those mistakes the correct formulas were finally found. But should you require proof for my statement, I'd be ready to show you the posts that I'm referring to.
                        I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

                        Comment


                        • #57
                          MariOne: Two, maybe three points:

                          1) About Adam Smith: while the guy seems to play a lot, and sometimes contributes well to discussions, he can brook no disagreement. He is absolutely certain of his abilities and absolutely unwilling to even entertain the notion of his wrongness about anything. I don't mean to insult you, Adam, but it's a fact that this isn't the only thread in which people have begged you to either a) give evidence to support your dismissals or b) at least test out the claims you're refuting. You never do either. You're right and everyone else is wrong, and they're stupid to boot. Everybody trying to argue with Adam, just stop. Don't beg him for evidence: he wont' give it. Don't beg him to test your assertions: he won't do it. Adam, I'm not trying to make an enemy, but this is a factual description of your behavior to date.

                          2) About the formula: I had been long dissatisfied with the formula I posted, noticing that it more often than not resulted in my over-paying. Since taking the time to slug through the huge MariOne posts, and coming to understand them, I have been testing their formula in gameplay, and it works. It works perfectly. But Mari, the big long formula and the big long explanation kind of confuse the issue. Your summary was about as long as your original posts. All one really needs to know to benefit from your research is this: use the two tables you made. Look up the amount of minerals left in production using the Hurry Cost chart, subtract from that the amount of minerals your base currently produces, and then multiply that number by the Cost Per Mineral on the second chart (I've also been using the windows calculator for this). That ugly old formula, however correct, is thankfully unnecessary most of the time.

                          3) I've modified my script.txt file to contain both your lists right on the screen that allows partial payment. When you hit "partial payment", now both lists appear above the line where you enter the amount you want to pay. This was a bit of a chore, as the Alpha Centauri text-displaying-code has weird ideas about justifying text, but it's all done and it makes life easier. Once again, I wonder if anyone with a website wants to put this up for me? Send me an email if you're interested.

                          Comment


                          • #58
                            HP, first of all thxs for the clarity of your post, something I should keep as an example ;^)

                            1. only thing I can add, is that I (almost) always try to leave a door open...

                            2. Indeed, I always look up in the table myself . I too advised to use it directly in my "summary". This thread topic was the formula tho, and I explained how to get there too.
                            In my first post I indulged to comment into may arguments, that made it even longer. Then, I let myself get caught and carried away by the "maths" dispute, I'm sincerely sorry if I ended to confuse things contrary to my intention.
                            A comment on the table purpose:
                            once you're in the hurry box, smac will tell you the whole price, and WinCalc will do for the partials quite well.
                            I think the table is very useful when you want to prepare *in advance* the most effective investment of your ec towards an endeavor, or decide its feasibility in the first place.
                            (oh: if you want to *build* that table in Excel, NOW the formula comes handy ;-))

                            3. GREAT IDEA anyway!
                            BTW "weird ideas about justifying text"? You're very kind with FurXs programmers, who were not even capable to make the text (i.e. base facilities list) shrink or wrap when you change screen resolution (you can forgive them the bugs, but this is failure of basic UI & API skills)

                            MoSe
                            - PS: should you like to use the real name, it's Mario, not Mari (not that I dislike this, sounds spaniard...)

                            ---
                            ADDENDUM:
                            taking from Ned's idea of over-hurrying a facility, accepting the switch penalty, I'm investigating techniques for doing it for UNITS, not projects as he said. This way we can still save few more ec when hurrying BIG units (i.e. prototypes, think about your first PB in the game...).
                            I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

                            Comment


                            • #59
                              I tested the "old formula" countless times HP. It has always given me the correct answer. You say that it has given you incorrect answers. Mose has also gotten incorrect answers so I guess I will have to try out the new formula.

                              I'm sorry for being a jerk, but since I've never recieved an incorrect answer from the old formula I had to disagree that it didn't work. I should have just kept quite I guess.

                              Comment


                              • #60
                                I won't argue with Adam, after all the thread is here to be read for who's interested.

                                It's just that a false statement has been reported with my name, and I'd like to correct it.

                                "MoSe has also gotten incorrect answers" referred to the "old formula" (Franikie's one) is false.
                                I never put it that way.
                                I was unsatisfied by what had been posted BEFORE Frankie's formula.

                                I got to that same formula myself. I know and I said that it's the best "approximate" formula.
                                I just pointed out (thinking that Frankie was still interested in the math details) that you had to be careful to round the decimal values in the corect (and maybe not natural) way, adding the INT() operator.
                                Using that operator means just "knowing how to round the decimals", and with that Frankie's formula has never given me problems.

                                I never said that "it didn't work".
                                I said that Frankie's was approximate, and with my simple variant you got the exact integer values.

                                The "table" of the cost increase presented in the beginning of the thread gives instead incorrect values for all inputs ending with 5. That had to be corrected with my observed table.

                                Just for the sake of precision, to avoid that the whole dispute gets presented in the wrong perspective and makes me say things I never said.
                                I don't exactly know what I mean by that, but I mean it (Holden Caulfield)

                                Comment

                                Working...
                                X