Results 1 to 13 of 13

Thread: AI Personality preferences

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Nefarious's Avatar Tiro
    Join Date
    Sep 2010
    Location
    New Orleans
    Posts
    293

    Default AI Personality preferences

    Having gone through various threads and posts on the subject of AI personalities, I thought I'd post this listing for feedback. The factions are grouped by region and/or religion for comparison, with the goal being no twins: ONE trader napoleon, ONE religious henry, etc. To keep the no twins goal, I know some factions may seem...odd. But this list has played quite well for numerous campaigns. Rebel provinces are taken at a respectable rate, factions mostly play to their military strengths, and regional neighbors present a variety of military/economic challenges for the player.


    faction england, balanced henry
    faction france, trader napoleon
    faction hre, craftsman caesar
    faction scotland, craftsman mao
    faction denmark, sailor smith


    faction spain, sailor stalin
    faction portugal, religious napoleon

    faction venice, balanced stalin
    faction sicily, sailor napoleon
    faction milan, religious henry
    faction papal_states, fortified smith


    faction byzantium, religious caesar
    faction russia, trader stalin
    faction poland, bureaucrat napoleon
    faction hungary, craftsman genghis


    faction moors, trader mao
    faction turks, bureaucrat caesar
    faction egypt, trader henry


    faction aztecs, fortified mao
    faction mongols, religious genghis
    faction timurids, bureaucrat henry
    faction slave, balanced smith


    I'm sure we all quickly grew tired of the Militia/LightCav/Ballista armies of
    faction vanilla, balanced smith. So I thought I'd mix it up. Does anyone see any glaring problems or weaknesses? Or, perhaps, are their any combinations that you usually use to great effect? I don't want any faction handicapped, but I also don't want one juggernaut to quickly control their neighbors. I've tweaked some other files (config_ai_battle, descr_campaign_ai_db, etc.) to good effect. But I'd like to get your suggestions on descr_strat.txt AI personalities.

    What do you like? What do you avoid? Any constants for certain factions?

    This is one area that has no definitive answer, meaning no combination for a particular faction can truly be considered wrong. A combination may be seen as odd, strange, different, antithetical, or historically inaccurate. But never wrong. Remember that AI personalities are preferences, not rules.
    Every time I venture from New Orleans,
    I get the sensation of leaving Oz and landing on Kansas.

    -------
    You want to know what? Really?? My political profile? Are you sure? Alright, then...

  2. #2
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    Quote Originally Posted by Nefarious View Post
    I'm sure we all quickly grew tired of the Militia/LightCav/Ballista armies...
    You're right I did too, along with rest of the personality baggage, but then I fixed it.

    My method is to include extra recruit options for the AI at the settlement walls.

    I give them whatever I want them to produce in these options, and they produce it.

    And for AI labels - I made them all 'balanced smith'. The point being that now I am not stuck using presets that make no sense in light of the roster of the faction. Everyone gets the same and then their actual output can be designed in detail by making what I want them to produce available to them.

    It's a way to have detailed control, rather than relying on the presets and wishful thinking about the AI building the right buildings.

    For another example of increased control; if you want a faction to produce one group of unit types early in the campaign, and then another later on, this solves that. The designer can choose exactly what is available when by using events, or more roughly by just using the tier of wall.

    I haven't done it yet myself but it should also be possible to track the AI's mil/finance/territory/etc. strength, and so also design it's responses to different situations. Making smaller richer factions produce only the more powerful troops, for example.

    The downside is that the AI will not be so susceptible to sabotage (dirty play), and perhaps will not have to produce barracks before being able to recruit, and of course the modder has to do a load of work. But the upside is a playable game IMO, and so well worth the effort
    Last edited by Taiji; December 05, 2010 at 08:57 AM.

  3. #3
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: AI Personality preferences

    In addition to both posts above and not disagreeing with them:

    a lot also depends on the strategic situation - facing a lot of cavalry the AI will produce spearmen etc.
    also check the recruit_priority_offset in the EDU for units - minus numbers mean don't produce so many of these, big plus numbers mean produce as many of theses as you can.
    and the costs, also cost of buildings - you need to price buildings (especially at the higher levels, at a price the AI can afford to build when they become available (another can of worms)!
    And the replenishment rate, number in recruitment pool etc can also affect composition of armies.

    (I believe the AI also creates different attack armies and defensive ones - but don't quote me on that!)

    lots of factors interact to produce the final AI troop mix - it needs to be dynamic to face different situations.

    so the AI labels may make a difference in some campaigns for some factions some of the time

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    Quote Originally Posted by Rozanov View Post
    a lot also depends on the strategic situation - facing a lot of cavalry the AI will produce spearmen etc....

    .....And the replenishment rate, number in recruitment pool etc can also affect composition of armies

    (I believe the AI also creates different attack armies and defensive ones - but don't quote me on that!)

    lots of factors interact to produce the final AI troop mix - it needs to be dynamic to face different situations.
    Good point, my method requires that the AI cannot overproduce anything. But it seems to me that the alternative is 'endless stacks of boredom', or a financially broke AI, so it's a 'get multiple birds stoned at once' scenario

    Quote Originally Posted by Rozanov View Post
    and the costs, also cost of buildings - you need to price buildings (especially at the higher levels, at a price the AI can afford to build when they become available (another can of worms)!
    What works very well is to limit the AI's ability to build walls, so it's the same as with my approach to recruitment. If you prevent the settlement from progressing then everything gets built. DLV uses Repman's point system to help facilitate this. The player must earn points to unlock new levels of development. And so as long as the player doesn't progress too quickly, the AI benefits a great deal by being forced to build everything.

    Quote Originally Posted by Rozanov View Post
    so the AI labels may make a difference in some campaigns for some factions some of the time
    Hard to be wrong there because we're so vague but yes I agree, it can still have an effect - But then I try to reduce that effect so that I can design what happens as much as that allows. To me what a faction has to do to be competitive in recruitment and building options is not covered adequately by the AI labels. And I'm not suggesting you think otherwise, I'm just taking responsibility for my goals.

    My method is what satisfies me and the fans of my work. No doubt there are other tastes and preferences about - I'm not arrogantly claiming to be objectively right. It just solved a huge gamebreaking-mess-for-me and the process I've outlined was how

    I suppose we could have script our way out of it, designing armies precisely, but that looks like a hell of a lot of work to me; if it's going to serve the function of providing varying and effective armies... Ouch, my head hurts just thinking about it ...
    Last edited by Taiji; December 05, 2010 at 10:15 AM.

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: AI Personality preferences

    Anybody ever thought to work this into a money or recruit script:

    Code:
    Identifier:        SupportCostsPercentage
    Trigger requirements:    faction
    Parameters:        logic token, percentage
    Sample use:        SupportCostsPercentage > 35.8
    Description:        Does the percentage of expenditure devoted to support costs exceed the threshold?
    Battle or Strat:    Strat
    Class:            SUPPORT_COSTS_PERCENTAGE










  6. #6
    Nefarious's Avatar Tiro
    Join Date
    Sep 2010
    Location
    New Orleans
    Posts
    293

    Default Re: AI Personality preferences

    Quote Originally Posted by Nefarious View Post
    Having gone through various threads and posts on the subject of AI personalities, I thought I'd post this listing for feedback. The factions are grouped by region and/or religion for comparison, with the goal being no twins: ONE trader napoleon, ONE religious henry, etc.

    <snip>
    I've tweaked some other files (config_ai_battle, descr_campaign_ai_db, etc.) to good effect. But I'd like to get your suggestions on descr_strat.txt AI personalities.

    What do you like? What do you avoid? Any constants for certain factions?

    This is one area that has no definitive answer, meaning no combination for a particular faction can truly be considered wrong. A combination may be seen as odd, strange, different, antithetical, or historically inaccurate. But never wrong. Remember that AI personalities are preferences, not rules.
    Interesting points made about walls, recruit_priority_offset, pools, etc. And I've already tweaked those things in my game. Other files and settings do, indeed, make larger impacts on the AI's performance. Agreed. I was just curious as to others' ai personality preferences in descr_strat.txt. The goal of mine was for no twins...just an exercise.
    Last edited by Nefarious; December 05, 2010 at 10:23 AM. Reason: typo
    Every time I venture from New Orleans,
    I get the sensation of leaving Oz and landing on Kansas.

    -------
    You want to know what? Really?? My political profile? Are you sure? Alright, then...

  7. #7
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    Quote Originally Posted by Gigantus View Post
    Anybody ever thought to work this into a money or recruit script:

    Code:
    Identifier:        SupportCostsPercentage
    Trigger requirements:    faction
    Parameters:        logic token, percentage
    Sample use:        SupportCostsPercentage > 35.8
    Description:        Does the percentage of expenditure devoted to support costs exceed the threshold?
    Battle or Strat:    Strat
    Class:            SUPPORT_COSTS_PERCENTAGE
    Yes, here's one I just thought of:

    We could label units that we want removed from the game when money gets tight. Then using this condition and financial situation to help determine which units to destroy. Check treasury, check losingmoney(no=exit), check supportcostpercentage, command destroy this unit, check losingmoney(no=exit), check supportcostpercentage, command destroy next unit, etc. Might be nice if the roster facilitates it.

    But what were you thinking? Do you have something in mind?

    Quote Originally Posted by Nefarious View Post
    I was just curious as to others' ai personality preferences in descr_strat.txt. The goal of mine was for no twins...just an exercise.
    I couldn't explain why I have them all balanced smith without explaining the theory behind my recruitment system and Repman's system for preventing growth.

    The reason I chose balanced smith as the basis was that in my experience it was least likely to be stupid and prioritise something badly. Faction rosters in my mod, and construction options, have basically made these labels redundant, none of the labels really suit anyone.

    I don't know where you are going with this 'twins or no twins' thing, but good luck with your testing
    Last edited by Taiji; December 05, 2010 at 11:39 AM.

  8. #8
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: AI Personality preferences

    Quote Originally Posted by Taiji View Post
    Yes, here's one I just thought of:

    We could label units that we want removed from the game when money gets tight. Then using this condition and financial situation to help determine which units to destroy. Check treasury, check losingmoney(no=exit), check supportcostpercentage, command destroy this unit, check losingmoney(no=exit), check supportcostpercentage, command destroy next unit, etc. Might be nice if the roster facilitates it.
    as in http://www.twcenter.net/forums/showt...72#post7012672

  9. #9
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    Yes certainly, you could add some useful detail to that script using the condition Gigantus mentioned.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: AI Personality preferences

    That was pretty much the idea behind it - money script and action on army size. With the percentage check you can force the AI to have an army according to his expenses. That would of course need extensive testing.
    You could also create counters according to the percentage and add them to the EDB recruitment conditions (haven't checked the proper syntax).

    monitor_event FactionTurnStart not FactionIsLocal
    and SupportCostsPercentage < 15
    set_counter recruit_all 1

    percentage > 35
    set_counter no_knights 1

    percentage > 20
    set_counter no_ elite 1

    recruit_pool "Jerusalem Sergeants" 1 0.05 1 0 requires factions { england, } and not event_counter no_elite 1

    Hope that made sense.










  11. #11
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    The thing I'd be concerned about with that would be how the percentage is worked out. If lots of construction happens in a turn then it will appear as if the faction is spending less on upkeep.

    Oh and I was wrong to suggest using losing money along with it, since if a faction is losing money then the upkeep costs are likely to be ~100% of the outgoings.
    Last edited by Taiji; December 05, 2010 at 09:40 PM.

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: AI Personality preferences

    I think you have to look at it the other way round:

    by curtailing the recruit expenses you are actually forcing the AI to spend money on buildings.










  13. #13
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: AI Personality preferences

    I find the AI spends money on buildings as a high priority anyway. Perhaps partly because my recruitment system does not make it easy for the AI to over recruit anything. If they can progress through settlement tiers one after the other then that's pretty much what they'll do. But prevent them from building the next tier of wall for a period and they get a hell of a lot more done. Which means they don't max out walls, then max out barracks (or whatever), and instead are apparently forced to build everything, level by level. Repman's gov/mil point system in DLV showed this to me. The player has to earn points to unlock the next tier of wall for both the player and the AI. And then it becomes a matter of balancing the system so that sufficient turns pass between tiers to allow the AI to develop fully.

    BTW it occurs to me that one side effect of using support costs vs everything else to manage availability of units could be AI armies which lack better units. So they might not be as fun to fight.
    Last edited by Taiji; December 06, 2010 at 08:38 PM.

Posting Permissions

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