Announcement

Collapse
No announcement yet.

Unit Hurry Cost Revisited!

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

  • #46
    Originally posted by Santiago_Clause
    .....I've played countless games that required extensive notes, Star Control II coming immediately to mind.....

    Ahh, I loved that game. I moved back in Jan, and I kept finding little scraps of paper with the coordinates to rainbow planets
    Last edited by Livid_Imp; May 19, 2004, 12:30.
    "Without music, life would be a mistake." - Friedrich Nietzsche

    Comment


    • #47
      If a unit costs 80 minerals, upgrading to it costs at least 80 energy. Buying a single mineral when 12 out of 80 have been produced costs

      M = 68
      Total hurry = M*M/20 + 2M = 367
      Total/M = 5.397...
      So pay 6 energy and buy a single mineral, or pay 60 to buy 11, if the 10 minerals on the next turn are worth 54 energy.

      If you want 11 minerals, however, the cheaper way is to switch to a facility (losing a mineral), buy 25 minerals for 50 energy, and switch back to a unit, losing 13 minerals.

      Simple, with a 4-function calculator. Possible without, but slower.
      "Cutlery confused Stalin"
      -BBC news

      Comment


      • #48
        Thanks CT, very illustrative.
        Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

        Grapefruit Garden

        Comment


        • #49
          Thanks for having fun with my example. It was a bit uncommon but it highlights why unit costs annoys the heck out of me.
          Promoter of Public Morale
          Alpha Centauri Democracy Game

          Comment


          • #50
            Maths is far from my strong point so perhaps someone can tell me if I have wastage or not. I do the following (as an example):

            Cost to hurry a unit: 107EC's. Turns left to complete: 5.
            107/5= 21.4. 107-21= 86. Pay 86EC's and the unit is finished next turn. I can generally do this in my head which is why I like it. It works, but am I losing a lot?

            Hobbes
            If you want to kiss the sky/Better learn how to kneel/On your knees boy - U2, Mysterious Ways

            http://zanature.wordpress.com

            Comment


            • #51
              Assume you have 21 minerals remaining.
              Then the hurry cost is 64.
              First, say you are producing 7 minerals/turn. Then you will finish in 3 turns.
              64 / 3 = 21.33
              64 - 21 = 43, which is in fact the correct price to pay

              Now, say you are producing 10 minerals/turn. You will still finish in 3 turns, and you will still pay 43 and buy 14 minerals. However, the optimal rush would have only bought 11 at a price of (64 / 21) * 11 = 33.52 -> 34

              So what you are doing guarantees that you will complete the unit next turn, but is not optimally efficient. The most inefficiency occurs when, given that production will complete in N turns, increasing production by 1 would decrease the number of turns left.
              "Cutlery confused Stalin"
              -BBC news

              Comment


              • #52
                Hobbes, your formula works great at 4 or more turns, at 3 it usually works, but at 2 turns you'll wind up overpaying. At least it's fail-safe: you'll never underpay using your formula.

                HongHu, your C - 2P formula starts getting sloppy as base production passes 20 or purchase qty 10. The spreadsheet shows the first "waste", of 2 ec, buying 7 minerals at a base with 24 production. ("Waste" I've defined as any ec's spent beyond what will buy a surplus of 10.)

                Enigma_Nova, your formula is exact but requires 3 inputs (minerals remaining, hurry cost, and base production). Another downside is the pocket calculator, which you'll need if you'd rather not divide such lovely specimens as 110 / 31 in your head. One cannot argue with an exact answer, though.

                Vev, your answer is 60. Unit cost is 5.4, incidentally, so to buy just 1 unit you'd pay 6.

                The spreadsheet I used to test HongHu's formula is a matrix, of mineral quantities purchased on the x axis ranging from 1-39 and base production on y ranging from 10-100. Each intersection has 2 values, the min and max optimum purchase values. This forms the "reference sheet".

                Against it are compared the corresponding cells of the "test sheet". If the test value falls within the reference values at a given production & purchase qty, the formula "works" for that situation.

                Here's the funny part: I wanted to use "real" numbers, unprejudiced by knowledge of how the formulas worked, and wound up with a matrix where the cost is affected by the base production! As you move up the x axis to higher purchase quantities along a fixed y-axis value for base production, the only degree of freedom left is minerals remaining, which increases as you move up the chart. To get useful numbers it looks like I had to compare apples to oranges!

                We're not really comparing apples to oranges, though, because we don't really care what we're building, or even how much it lacks being done, we care how much it costs to buy an extra 3 minerals to finish building it. (If it really bothers you, you can always move diagonally! :P Pbbbt!)

                Comment


                • #53
                  Enigma_Nova, thanks for the great formula! Now why didn't I think of that?

                  Comment

                  Working...
                  X