Page 1 of 10 123 ... LastLast
Results 1 to 15 of 139

Thread: TGs vs. Forts

  1. #1
    Post Fiend geln0r's Avatar
    Join Date
    Feb 2009
    Posts
    202

    TGs vs. Forts

    In an effort not to derail the "Undead & Homes?" thread any further, I have decided to make a separate thread to discuss the merits of homes vs. TGs.

    The calculation I posted in the other thread was indeed not entirely correct (I was lazy.) This is an attempt to answer the question a little more in-depth.

    1. Minimizing draft rate for a given OPA + DPA combination:

    The total amount of units you have available to train is given by (draft rate) * (max pop). Max pop does not depend on the ratio of forts to TGs, so we can treat it as a constant as we are only messing with this ratio.
    I have assumed in the below calculation that you want to dedicate 30% of your land total to TGs and forts, and are trying to find the optimal combination - whether to build those structures at all is a different matter.

    x = % of TGs
    a = total acres; o_val = off value of your elite; d_val = def value of your spec; ME = base Mil. Eff.

    Initially:
    (draft rate)*(max pop) = opa*a/(o_val*ME*(1+1.5*x*(1-x)))+dpa*a/(d_val*ME*(1+1.5*(0.3-x)*(1-(0.3-x))))+thieves+wizards+soldiers+(stuff in training)
    Simplifying, we get:
    draft rate = (a*[opa/(o_val*(1+1.5*x*(1-x)))+dpa/(d_val*(1+1.5*(0.3-x)*(1-(0.3-x))))]+K)/(max pop)
    To find the extremum, first differentiate for x:
    DR' = (a/max pop)*[1.333*opa*(x-0.5)/(o_val*(x^2-x-0.6667)^2)+1.3333*dpa*(x+0.2)/(d_val*(x^2+0.4x-0.8767)^2)]
    The next step is set DR' equal to zero and solve for x. This is incredibly complicated (I think unsolvable) with all the unknowns, so I solved the equation for two sets of concrete values: orc (highest off elite) and halfer (lowest off elite, excluding fairy). Both times, I used 100 OPA, 45 DPA.
    Result:
    For orc, the optimal [TG,forts] combination given the assumptions is [17.3%,12.7%]
    For halfer, the optimal [TG,forts] combination is [21.6%,8.4%]

    So looking from a pure "efficiency" perspective, it is indeed best to run a good mix of both forts and TGs. The optimal ratio of course varies by race and by the specific OPA/DPA values you are aiming for.

    2. However, the more realistic scenario for an attacker is to maximize OPA at a given DPA and draft rate.


    I kept messing up on the differentials, so I decided to take a more brute force approach. Note that DPA refers to static DPA, and draft rate means "elites & dspecs" in this context; no thieves, wizzies etc.

    y = pop. per acre that can be trained as elites = (pop per acre)*(draft rate) - dpa/(base_ME*d_val*(1+0.15*(0.3-x)*(1-0.3+x)))

    OPA = y*o_val*(1+0.15*x*(1-x)) = [(pop per acre)*(draft rate) - dpa/(base_ME*d_val*(1+0.15*(0.3-x)*(1-0.3+x)))] * o_val * (1+0.15*x*(1-x))

    I simply iterated through this equation in steps of 0.01 for x. The results for x seemed to depend most heavily on ppa and base_ME, and fluctuated within a few points of [18%,12%]. For example:
    (1) The "ideal" ratio for an orc with 26 PPA, 200% wages, draft rate of 65% and target DPA of 45 would be [18% TG, 12% Forts]
    (2) The same ratio applies to an orc with 28 PPA and 100% wages.
    (3) A halfling with the same numbers as (1) would have ratio of about [16%,14%]
    (4) A human with 30 PPA, 200% wages, DR of 70% and target DPA of 40 maxes out at [25%,5%]

    To be fair, the difference between, say, [13%,16%] and [16%,13%] is pretty small. There are other factors that should influence your decision between TGs and Forts - attacks made:suffered ratio, playing style of KD, cost of retraining,potentially being unbreakable, yadda yadda.

    In conclusion, forts seem more viable than I thought they did, although TGs still have a clear edge.
    Last edited by geln0r; 16-10-2011 at 21:58.

  2. #2
    I like to post Realest's Avatar
    Join Date
    Sep 2008
    Posts
    4,368
    you're making it too complicated

    look at it this way

    say you want to allot 20% land between Forts/TG

    Because of diminishing returns, 15% TG and 5% will confer more multipliers (they are independent of each other) than 20% TG.

    Thus, with this in mind, the highest set of multipliers will occur at 10% TG and 10% Forts.

    The problem is that you dont run 1:1 ratios of Off/Def, therefore you adjust accordingly in that regard, and thats all you have to do. No need to do complex derivations and integrals etc.

  3. #3
    Post Demon
    Join Date
    Sep 2008
    Posts
    1,524
    [Re-posted from a older stables optimization thread.]

    Before one can calculate the correct stables %, one needs to know the TG/Forts optimization. (What good is finding 15% TG 5% Stables is better than 20% TG... if 13% TG 7% Forts is better than both?)
    To do this in the theoretical case is difficult, and I believe results in a irreducible quintic. I believe I've found said quintic, and testing seems to indicate it is at least close, if not perfectly correct. However, I warn that the calculation is quite complex, and I know my first attempts had an error. (Yet still passed the sanity check at the end!? So even if it works, it may still be wrong - odd, to borrow a phrase.) There is therefore no great reason to believe this version is correct either, at least not until someone else independently verifies it.

    Also, note, since this produced a quintic, the full TG/Forts/Stables optimization is probably impossible to solve in the general case. Unlike a quadratic, cubic, or even a quartic, which can be solved algebraically, it is a proven result that there is no algebraic solution to the general quintic. Thus, unless there is a missing "trick" I haven't seen, we can't solve the full question without resorting to approximation.


    So, without further adieu:

    dfixed := total DME from sources outside factors. TW and land def not as a simplifying assumption.
    ostr := Strength of the offensive unit. Use pro rata for mixed armies.
    mpa := Military Per Acre, excludes thieves so lower than DR.
    horses := Horses
    fixed := All "fixed" NW from sources other than military units. Includes science, buildings, land, WPA/TPA, PPA, *and horses*.
    onw := The NW of the offensive unit. Use pro rata for mixed armies.
    TMS% := Total land available to split between TGs and Forts. Named for "Total Minus Stables", since stables were the next step.
    Forts% := The % Forts. This is the "x" variable of the equation that needs to be solved for.
    BE := BE
    dpnw := Target dpnw of the province. Is more correct than holding DPA constant, serves the same purpose.
    dstr := Strength of the defensive unit.
    dnw := The NW of the defensive unit.


    0 = dfixed*(ostr*mpa + horses) / (fixed + onw*mpa)*( - 1 + 2*TMS% - 2*Forts%)*(1/BE + 3*Forts% - 3*Forts%^2 + 2.25*BE*Forts%^2 - 4.5*BE*Forts%^3 + 2.25*BE*Forts%^4) + (dpnw/dstr)*( - ostr*mpa*dnw - ostr*fixed + horses*onw - horses*dnw)/(fixed + onw*mpa)*(1-TMS%)*( - 2/BE - 1.5*TMS% + 3*TMS%*Forts% - 3*Forts%^2)
    it's vs. its is ambiguous - from now on I'm attempting to use the proper possessive it's, and the contraction 'tis. (Its will just be the plural.)

    Think Different

  4. #4
    Regular
    Join Date
    Aug 2011
    Posts
    60
    Oh damn I thought I clicked the link to the utopia forums, somehow I got misdirected to the star trek forums. All I see is techno babble.

  5. #5
    Enthusiast
    Join Date
    Sep 2011
    Posts
    331
    I would play along and do the math myself, except it looks like Ethan did it a while ago for me.

    Point 2. in the OP is where we should focus, that we can all agree with. I think you can turn the mathematical result into sentences and sound reasoning, so macil22 would be happy. :)
    Like you do in Physics when you don't talk about a derivative, but rather argue about velocity. Which potentially makes it all more intuitive.

    You can easily argue away use of Stables for a Heavy Attacker with serious investment in offensive units. Stables would be overpowered imo if they could hold sufficiently many horses/acre to be better than TGs for the case when you have many offensive units. As it is, they don't offer enough horses/acre to compete with the TGs at high numbers of troops.
    You can make the above argument mathematically rigorous. But you would only have to do it to figure out exactly the number of troops when Stables are no longer better.

    I'll try to make my argument later on, when I'll be fresh. :)

  6. #6
    Post Fiend geln0r's Avatar
    Join Date
    Feb 2009
    Posts
    202
    Quote Originally Posted by Danrelle View Post
    Point 2. in the OP is where we should focus, that we can all agree with.
    Just finished it. Forts are indeed more viable than I thought (in terms of efficiency).

    Quote Originally Posted by Danrelle View Post
    I think you can turn the mathematical result into sentences and sound reasoning, so macil22 would be happy. :)
    Like you do in Physics when you don't talk about a derivative, but rather argue about velocity. Which potentially makes it all more intuitive.
    Good point. I'll add a tl;dr when I have the time.

  7. #7
    Veteran
    Join Date
    Jul 2011
    Posts
    588
    Forts are practically worthless, because you are going to be hit anyway, even though you get DR on extra GS, its still less land for the opponent. Also consider gains science.

  8. #8
    Post Demon
    Join Date
    Sep 2008
    Posts
    1,524
    Danrelle - "I would play along and do the math myself, except it looks like Ethan did it a while ago for me."

    Despite the massive wall of definitions, and a 2 (or more) full line "solution" - I'd actually rather you try to solve it independently (if you are so inclined). Ideally you'd reuses most, if not all, of my defined terms, so we'd be able to talk about the same objects easily... but we could translate if the names I picked for things don't make sense to you.

    The reason is, despite my being a math major - there is nothing stopping me from having made an error in calcing that final form. In fact, I know I made one originally, and didn't even detect it for a while. It even gave answers that were close, despite a blatantly wrong formula (something like OME being TGs instead of 1+TGs). I honestly don't even know how I found it at all, since it was so well hidden. So... independent verification is needed before we trust that formula. Also, if we did get different answers, we'd have a place to start looking for errors - right now I've got 3-5 pages of algebra in a spreadsheet, and no way to guess where any possible error might be lurking in it.


    Also - 2 clarifications:

    1. Target "dpwn" - this variable should be a "Raw Target DPNW" - all "fixed" DME mods, like GP, are used to reduce this value. (I think - since there is no external DME mod).
    2. I assumed Forts and TGs were multiplicative on ME. There is a report in the bugs forum suggesting this might not be correct. Assuming it is multiplicative as we've all been assuming, "outside" DME is needed to reduce dpwn (see above), but "outside" OME is *not* needed, since it has an equal, multiplicative, effect. Optimizing "raw after TGs opnw" => optimized mod OPNW. (This breaks if TG OME adds instead of multiplies.)
    it's vs. its is ambiguous - from now on I'm attempting to use the proper possessive it's, and the contraction 'tis. (Its will just be the plural.)

    Think Different

  9. #9
    Post Fiend geln0r's Avatar
    Join Date
    Feb 2009
    Posts
    202
    Quote Originally Posted by bombdigie View Post
    Forts are practically worthless, because you are going to be hit anyway, even though you get DR on extra GS, its still less land for the opponent. Also consider gains science.
    Thank you for your valuable input, and thank you for not reading a word of my ****ing OP.

  10. #10
    Post Demon
    Join Date
    Feb 2009
    Posts
    1,407
    2v1 ratio for me more or less for heavily off oriented province, I am usually 2-3v1 mod op/dp depending where I am in kd nw spread and how pumped I am. I know sweet spot is a bit more towards forts but I prefer having few % extra in the tg department to reduce mod op drop when land start coming in. No fancy math but its rule of the tumb I use and it serves me very well.

    30% total seems an awfully lot to me tho, I rely more on endurance buildings like gs/hosp/wt but I guess thats personal preference.

  11. #11
    Post Demon
    Join Date
    Sep 2008
    Posts
    1,524
    30% seems *low*... if you are skipping the stables and homes and gs. GS debatable (just built some actually, but that's a weird situation), but I got used to human sage under the 8/6 army, where my land was already tiny anyway. Pulling 200 NW/A at 55% DR makes gs pretty pointless - my main problem was hitting the 20% gains cap to easily. The low density 4/7 army definitely plays a bit different.

    Especially if you look at, say, avian/cleric, what else do you do with your land? If you are 2xing it, you don't need rax unles you annon, you don't need hospitals, you don't need that many banks or gs... you build TGs and Forts. I think avian/cleric in particular could be perfectly reasonable with 50% land in those two. Well... 10% at least would end up in homes because 20%TG 10% homes is almost sure to be better than 30% TG. But the point stands - 50% for your offenseive buildings is a good goal for some builds. Remember, it is all NW free military... kinda like free gs in a different way. (See above.)

    In fact, that was the other effect of my old human sages was the high MPNW with high NWPA - sure, I could have overdrafted for better OPA, but it bloated up the NW. High NW/A means land NW is a low % of total, gives better MPNW, which is the real measure of a province's power.
    it's vs. its is ambiguous - from now on I'm attempting to use the proper possessive it's, and the contraction 'tis. (Its will just be the plural.)

    Think Different

  12. #12
    Game Support Bishop's Avatar
    Join Date
    Jul 2008
    Posts
    21,332
    Funny how you mention overdrafting, but not overbuilding.
    Support email: utopiasupport@utopia-game.com <- please use this and don't just PM me| Account Deleted/Inactive | Utopia Facebook Page | #tactics <-- click to join IRC|
    PM DavidC for test server access

  13. #13
    Post Demon
    Join Date
    Sep 2008
    Posts
    1,524
    Quote Originally Posted by Bishop View Post
    Funny how you mention overdrafting, but not overbuilding.
    Not sure what you mean. Built land gives 25 ppa base, unbuilt gives only 15. True, the most effective buildings NW wise is one still in progress... but that consumes money pointlessly, and some buildings are better than TGs even. (Say, rax to get 12 hour when on a schedule... +100% attacks => better than everything else.) But... you can't overbuild. Every acre ought to be built if you have the time/resources to do so.

    If you are saying I ran too many TG/Fort - I've never hit 50%, but I've always needed rax (before switching to Faery), and hospitals, and always tried A/T (though it came out more A/t most of the time), and so needed dens. Libs eat a lot of space too, I always hope to be pushing 20% by EOA. True, having 100-110% BE while in war build means my TGs worked harder than most... but that was still a 75-80% base BE, just with silly high science. And BE does *not* suffer DBE, so it just makes TGs cooler until cap is hit.

    So... not trying to totally derail everything - but what "overbuilding" are we talking about?
    it's vs. its is ambiguous - from now on I'm attempting to use the proper possessive it's, and the contraction 'tis. (Its will just be the plural.)

    Think Different

  14. #14
    Enthusiast
    Join Date
    Sep 2011
    Posts
    331
    Hey Ethan,

    Bishop's criptic overbuilding might be hinting towards an inconsistency in your final statement.

    "In fact, that was the other effect of my old human sages was the high MPNW with high NWPA - sure, I could have overdrafted for better OPA, but it bloated up the NW. High NW/A means land NW is a low % of total, gives better MPNW, which is the real measure of a province's power."

    M/NW = (M/A)*(A/NW). That is M/NW=(M/A)/(NW/A). So if you keep M/A constant and increase NW/A, your M/NW decreases! Or in a sentence, if you add networth via sci that does not increase your Military, you Military/NW obviously decreases.
    You are right that the land NW becomes less significant, however that was the only (mathematically) correct statement. At least that's how I read it.^^

    Other than that, I will solve the equations over the weekend and can share notes. But the note would come as .pdf - I don't know how you programmers can read math in .txt format. Let me know what would be the best way to share a .pdf over these forums.



    @ Citadela01: Ethan's example of Cleric does nothing to diminish your point. You don't really sit down to explain much, but I believe you're honest about what you say you do. I agree (and have posted this myself in the other thread) that TGs/Forts are not going to take a big chunk of a good attacker build. It's not only a question of preference. Resilience/Rax wins wars. (perhaps if you can't play Avian/Cleric with Rax, you'd do better as Orc/Cleric with Rax)

    One thing I don't agree with:
    "I know sweet spot is a bit more towards forts but I prefer having few % extra in the tg department to reduce mod op drop when land start coming in. No fancy math but its rule of the tumb I use and it serves me very well."

    I like the "no fancy math" approach, obviously. But I don't get your logics. Instead of letting your mod opa drop when your land comes in, you let your mod dpa drop? Therefore inviting easier/deeper chaining? Right when your land comes in... why?
    You can tell me over on irc (Cor) if it is too deep.
    Last edited by Danrelle; 18-10-2011 at 07:40.

  15. #15
    Banned
    Join Date
    Aug 2008
    Posts
    1,377
    as my raw army size grows the number of tgs and forts lessens. For example when I'm running a 40% army my forts and tgs are around 20% or more when I'm running +80% army my forts and tgs are around 6% or less most likely less.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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