Results 1 to 15 of 15

Thread: AI madness

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default AI madness

    As some of you might know, the horrid seleucid stacks of sparabara and thureophoroi are completely annoying and thus really handicapping AI, when it could recruit better troops, it probably recruits the crappier unit.
    Something has to be done with this obviously, so I have come up with a new system for training cost/upkeep. I noticed that the AI will always prefer lower upkeep to better stats, though there are hardcoded variations.
    To balance the units, upkeep will always be 30x total defense value of an unit, the cost values are a bit more complicated though.
    For light infantry, the cost will be 100 times the attack value, while for heavy infantry it will be 50x. This will hopefully balance the recruitment of units. (remember that AI gets a -50% discount anyways)
    Let's take 2 examples:
    Sparabara -> Defense 11, Attack 3
    Ekdromoi -> Defense 10, Attack 8

    Sparabara upkeep will be 330 and recruitment cost 375, (Edited cost with penalty)
    Ekdromoi on the other hand will have an upkeep of 300 and recruitment cost of 400. Note: Ekdromoi classifies as heavy because it's a hoplite spear unit which in my calculation goes under heavy inf.

    A few more calculations:
    Spartan RG -> Attack 13, Defense 23
    Cost: 650 (with 10x because a special elite unit-> 6500), Upkeep: 690
    --------------------------------------------------------------------
    Levy Pike -> Attack 8, Defense 8
    Cost: 400, Upkeep: 240 (+3 secondary) - syntagma penalty
    -> Cost: 400 + 150 = 550
    --------------------------------------------------------------------
    Pezhetairoi -> Attack 13, Defense 16
    Cost: 650, Upkeep: 480 (+6 secondary training) - syntagma penalty
    -> Cost: 650 + 300 = 950
    --------------------------------------------------------------------
    Asthetairoi -> Attack 14, Defense 21
    Cost: 700, Upkeep: 630 (+7 secondary) - syntagma penalty
    -> Cost: 700 + 350 = 1050
    --------------------------------------------------------------------
    Argyraspidai -> Attack 14, Defense 21
    Cost: 750, Upkeep: 650 (+7 secondary) - syntagma penalty (Best phalangites in the game, so a little cost/upkeep boost is required,- they have a lethality bonus.)
    -> Cost 750 + 350 = 1100
    --------------------------------------------------------------------
    Hastati -> Attack 7 (but missile 11), Defense 16
    Cost: 350, Upkeep 480 / + missile attack cost (applies to all prec units)
    -> Cost 350 + 550 = 900
    --------------------------------------------------------------------
    Principes -> Attack 7, Defense 18
    Cost 350, Upkeep 540 / + missile 11
    -> Cost 900*2 -> 1350, lvl 2 roman infantry, 1.5x cost penalty
    --------------------------------------------------------------------
    Triarii -> Attack 7, Defense 26
    Cost 350, upkeep 780
    -> Cost 350x3+200-> 1250, lvl 3 roman infantry, 3x cost penalty + 200 elite handicap, takes 2 turns
    --------------------------------------------------------------------
    Legionary 1st Cohort -> Attack 10, Defense 23
    Cost 500, Upkeep 690 / + missile 13 (650)
    -> Cost 1150 takes 2 turns to recruit, no lvl penalty for marian
    --------------------------------------------------------------------
    Praetorian Cohorot -> Attack 12, Defense 25
    Cost 600, Upkeep 750 / + missile 16 (800)
    -> Cost 1400, takes 2 turns to recruit, no lvl penalty for marian
    --------------------------------------------------------------------
    Picked Cretan Archers -> Attack 4 (7), Defense 11
    Cost 400 + 700 (goes under light infantry, so 100x), Upkeep 330 + 210 (archer penalty, missile attack*missile amount added to upkeep)
    --------------------------------------------------------------------

    EDIT: For all non-syntagma units with 60 troops per unit, will also have a unit amount penalty of 1.25x
    EDIT: Cavalry fix:
    --------------------------------------------------------------------
    Hetairoi Cavalry: Attack 9 + 10 secondary, Defense 20, Charge 22
    Cost: (cav is heavy) 950 + (charge is only for cav, has heavy calc) 1100 = 2050. Upkeep 1000 + (per hore tax of 5 denarii) 100 = 1100
    Not to mention that it's elite cavalry, so +50 penalty
    Cost: 2100, Upkeep 1150 (which is acctually 300 denarii cheaper than in xgm 4)
    --------------------------------------------------------------------
    Elephants: Attack 3, Defense 5 + 12 sec armour, + 14 charge, 6 eles
    Cost: 150 (3*50x) + 1200 (200 per elephant) + 700 (50x charge penalty) = 2050. Upkeep: 850 + 300 (50d per elephant) = 1150
    --------------------------------------------------------------------
    Yes, I know, horrible stats...
    --------------------------------------------------------------------
    Armoured Elephants: Attack 6, Defense 5 + 13 sec armour, + 18 charge, 6 eles
    Cost: 300 + 1800 (300 per BIG elephant) + 900 = 3000. Upkeep: 900 + 450 (75d per elephant)= 1350
    --------------------------------------------------------------------
    But quite realistic...
    --------------------------------------------------------------------
    Median Cavalry: Attack 10 (missile 7), defense 14, charge 8
    Cost: 500(melee) + 350(missile) + 400(charge)=1250 Upkeep: 700 + 315 (45 missile each 7) + 100(horse tax) = 1115
    --------------------------------------------------------------------
    Horse archers will be hard to keep up from now on...
    --------------------------------------------------------------------


    Please give feedback if changes like this would sit well with all of you, because I know it really really helps the AI to recruit more kickass stacks.

    I'm also thinking of making a difficulty based building, where a script places a building depending on the campaign map difficulty, increasing the unit costs, easy will be 75%, normal 100% cost, hard 150% cost and very hard 200%

    Cheers!
    Last edited by RedFox; February 23, 2007 at 07:54 AM.

  2. #2
    Cymera's Avatar Roma Invictus
    Join Date
    Sep 2006
    Location
    Toronto, Ontario, Canada.
    Posts
    1,380

    Default

    This sounds great! have you tested this? if it makes the AI recruit better units, then that would be great! But are not some units too expensive? no more huge armies in XGM

    Wait, shouldn't armored elephants cost more then Praetorian Cohorts? Are they not more deadly? or is this a clever ruse your pulling?!?
    Last edited by Perikles; February 24, 2007 at 10:43 AM. Reason: dp


    Under the Patronage of the Wise Kara Kolyo in the Hallowed House of Wilpuri
    Proud Patron of the Charming
    Balikedes, an Insightful and Tactful Warrior.

    Extended Greek Mod (XGM) Lover ..... A mod by DimeBagHo

    "
    The wise are instructed by reason, average minds by
    experience, the stupid by necessity and the brute by instinct
    "


    - Marcus Tullius Cicero






  3. #3
    DimeBagHo's Avatar Praeses
    Moderator Emeritus

    Join Date
    Mar 2005
    Location
    Auckland
    Posts
    7,943

    Default Re: AI madness

    The Seleucid tendency to recruit large stacks of low level units is mostly the result of demographics - they have lots of low level settlements. In my own tests the seem to be happy to recruit better quality units from higher level settlements.

    The only oddity I have noticed is that they are show a strong preference for Thureophoroi (Heavy Peltasts) over Levy Phalangites.

  4. #4

    Default Re: AI madness

    Quote Originally Posted by DimeBagHo View Post
    The Seleucid tendency to recruit large stacks of low level units is mostly the result of demographics - they have lots of low level settlements. In my own tests the seem to be happy to recruit better quality units from higher level settlements.

    The only oddity I have noticed is that they are show a strong preference for Thureophoroi (Heavy Peltasts) over Levy Phalangites.
    Indeed, it's odd fighting Seleucids and not seeing more phalangites.

    Maybe the vanilla rosters were kept intentionally sparse to encourage more orthodox recruitment?
    Under the patronage of Simetrical. I am but a pawn in his evil schemes.

  5. #5
    DimeBagHo's Avatar Praeses
    Moderator Emeritus

    Join Date
    Mar 2005
    Location
    Auckland
    Posts
    7,943

    Default Re: AI madness

    Quote Originally Posted by Dulce_et_Decorum_Est View Post
    Indeed, it's odd fighting Seleucids and not seeing more phalangites.

    Maybe the vanilla rosters were kept intentionally sparse to encourage more orthodox recruitment?
    I think that was part of the reason. In earier versions of RTW it was very hard to get the AI to recruit balanced armies even with the vanilla roster. That problem was mostly fixed in version 1.5/1.6 and although it can be tricky to get the AI to recruit sensibly, it's not impossible.

    BTW, the Seleucids will happily recruit regular Phalangites, they just don't have them available in many settlements.
    Last edited by DimeBagHo; February 23, 2007 at 01:57 PM.

  6. #6

    Default Re: AI madness

    double post
    Under the patronage of Simetrical. I am but a pawn in his evil schemes.

  7. #7
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: AI madness

    I have fixed some of the AI behaviours, it seems that with near to no money, AI will recruit the 0 turn peasants (bad!), with medium amount of money(3000-7000), it will recruit a huge variety of units, mostly hoplites, though the Seleucids recruit stacks of sparabara, even though there are Ekdromoi available to recruit.
    This is something that these changes will fix as the AI will preffer Ekdromoi over Sparabara now if available.
    If you ask "why?" then here's your answer:

    Sparabara: Cost 375, Upkeep 330
    Ekdromoi: Cost 400, Upkeep 300
    Sparabara is 25d cheaper, but the upkeep is 30d higher, so naturally AI will preffer Ekdromoi, which also has more pleasant stats and more optimal choiche for the upcoming turns (even though it has 39 troops less).


    And Cymera, Armoured Elephants cost 3000, you should look closer at the calculations to understand them more, I made them as simple and logical as possible...
    I will use this thread to look at the different unit cost/upkeep types later on...
    The problem with Phalangites was that they were too expensive compared to other units, with lower upkeep and cost compared to other units, they will recruit phalangites more often.
    Last edited by RedFox; February 23, 2007 at 10:11 AM.

  8. #8
    Cymera's Avatar Roma Invictus
    Join Date
    Sep 2006
    Location
    Toronto, Ontario, Canada.
    Posts
    1,380

    Default Re: AI madness

    Oops, i understand now, seems like a good idea.


    Under the Patronage of the Wise Kara Kolyo in the Hallowed House of Wilpuri
    Proud Patron of the Charming
    Balikedes, an Insightful and Tactful Warrior.

    Extended Greek Mod (XGM) Lover ..... A mod by DimeBagHo

    "
    The wise are instructed by reason, average minds by
    experience, the stupid by necessity and the brute by instinct
    "


    - Marcus Tullius Cicero






  9. #9
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: AI madness

    Yes, but I would like to see more Argyraspidai and Legionary action... fighting Sparabara with your silver stacks seems a bit pointless.
    Even later into the game they used a lot of Thureophoroi / Sparabara as support units..

  10. #10

    Default Re: AI madness

    I agree with DBH about the recruiting tendencies of the Seleucids. As an AI faction they start out with the most settlements and enjoy access to huge starting revenues (compared to the Macedonians ,Greeks and Romans at least). But the vast majority of those settlements begin only at the town or large town level (including Sardis) which limits the options for units to spend those revenues on. Since only a few settlements start at city level, phalangites, levy or greater, will only come from places at the heart of the empire like Antioch or Seleucia. Soon Susa and Ecbatana may come on line as cities with the right structures, but waiting on other sites in that constellation of settlements like Charax, Hatra, Tarsus and Damascus to come up to city level could take decades.

    Again, to be more precise, the "constellation" of settlements at the heart of the Seleucid realm roughly corresponds to the real-life fertile crescent of Mesoopotamia and the Syrian Corridor or Levant. Geographic terminology notwithstanding, if you're the Greek Cities or the Macedonians you won't necessarily need to reach that core of settlements in the first couple decades of play (let's say, by about 260 BC), although the Seleucid elephants and phalangites that come from there could quickly reach you in Nicomedia, Pergamum or Halicarnassus in the first season of play that the Seleucids go to war against you, (and that could be as early as 275). If you're the Ptolemies, the fertile crescent becomes a problem almost from 280 BC, since you're occupying parts of the Levant (Sidon and Hierolsolyma) that the Seleucids can build up to city level faster than neighbouring Damascus. The Seleucids also seem to approach Ptolemaic Side as an easy coastal connection to Sardis and Ipsus, so they tend to go at Egypt usually no later than 277. It's part of what makes Ptolemaic Egypt fun and frustrating to play usually at the same time.

    Otherwise, this equation of incredible cosmic income coupled with itty-bitty-bitty settlement "townships" for the Seleucid empire results in endless stacks of sparabara and other light infantry and some fragments of peltasts and greek javalin cavalry. As a solution, I've been trying to edit Descr-Strat to start the Seleucids with large cities at Susa and Antioch and minor cities at Ectbatana, Charax, Seleucia, Tarsus and Sardis. It gives their core army-detachments more weight, and I believe it may reflect the actual demographic strength of the empire, as all of those areas already had been rather well developed and settled before the 4th Century BC, by the Medes, Babylonians, Assyrians and Lydians.
    Last edited by Agathon; March 06, 2007 at 02:30 AM.

  11. #11
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: AI madness

    Although the Seleucid elephants and phalangites that come from there could quickly reach you in Nicomedia, Pergamum or Halicarnassus in the first season of play that the Seleucids go to war against you.
    Acctually, that is because the startup script spawns a semi-elite army at Antioch, which usually likes to march on Kydonia and then on Halicarnassus.

  12. #12
    DimeBagHo's Avatar Praeses
    Moderator Emeritus

    Join Date
    Mar 2005
    Location
    Auckland
    Posts
    7,943

    Default Re: AI madness

    Agathon: Make sure you take a look at the startup script as well. If you're upgrading the starting cities you need to make sure that the script is not spawning buildings that the cities already have.

    One benefit of adding Thureophoroi to the Seleucids is that they seem to prefer them over Dorophoroi or Sparabara. Apart from being harder to kill, the smaller unit size also gives their cities more of a chance to grow.

    If you want to see stacks of higher level units though, I think Agathon's approach is the way to go. They need more higher level cities.

  13. #13
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: AI madness

    Well, I might update your startup script with the cities having higher level barracks, though less population to prevent overcrowding stacks..

    I have also added a population growth penalty for governor buildings, it should decrease growth to a more reasonable level, because those growth factions were quite insane (4% per turn? no way.) That would mean +320 men if your pop is 8000, which is a little bit unrealistic. Even though RTW sizes everything down 20 times, 6400 new children every 6 months is an insane growth rate for such a city, while they have 160000 residents.
    In 5 years, there would be 64000 new children and in 20 years, the population would be more than triple than it was. (not to mention that the rate speeds up with more population!) Now honestly, it would make more sense if there were a little bit lower population growth rates.
    To finish this, we could have buildings that speed up growth, to avoid problems such as not being able to recruit any men from the settlement.
    I believe rates such as 1% - 2% would be quite realistic, as Pergamum, for example has rates as big as 4% - 5% right from the start, mostly due to farming buildings. I'll also add penalty for mines, -0.5% and -1% which would also help balance things, more money, less human resource to waste it on.

  14. #14

    Default Re: AI madness

    Exactly, DBH.

    The first time I began liberating "artificially enlarged" settlements as the GCS or Macedon without checking the startup script I usually found [Uggghhh] duplicate markets at different levels of development. After some fits and starts I figured out the problem, how it was happening and finally how to correct it.

    Anytime I get a little too crazy when I edit scripts, I good CTD is usually pushes me in the right direction. It's all fun.

    And, Redfox, I like your appreciation of and approach to settlement demographic problems. The tendency to miniaturize everything in the RTW world is linguistic too. Does anybody out there think it's odd that the roman denarius was a silver and nickle coin with (I should believe) the purchasing strength of the modern 5p coin, shilling coin, 20pf. or American dime?

    Silver talents were what the ancients used for state budgeting. [1 talanton = 6000 drachmai; and I think an Athenian drachma in the classical period was the average daily wage of a common free labourer. One needed 30 talents to maintain a trireme fully manned and at sea for a month].
    Last edited by Agathon; March 14, 2007 at 12:31 AM.

  15. #15
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: AI madness

    I believe by editing a few files in data/texts/ you can change denarii to talents.
    Not certain which file though.

Posting Permissions

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