Page 1 of 10 12345678910 LastLast
Results 1 to 20 of 184

Thread: Co-operative Campaign AI Project

  1. #1
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Co-operative Campaign AI Project

    There are a lot of submods out there for Stainless Steel. New units, AORs are all good but the essential game mechanics is what keeps us playing a campaign.

    This means
    • ECONOMY
    • TRAITS
    • AI
    ECONOMY
    Economy is currently being worked on in St Naffatun's excellent trade mod.

    TRAITS
    Traits, likewise, by Byg.

    AI
    However all of M2TW's ai virtuosos, Darth, Lusted, xeryx and nickman77 are on hiatus.
    Yet there is a big capability gap in the Stainless Steel campaign ai.

    For instance I have noticed:
    • Mongols do nothing (do not achieve their historical empire or anything even close to that)
    • England gets wiped out and Ireland and Scotland run around beating up France and HRE.
    • Nobody declares war on me. Hurry up and declare war on me.
    • AI doesn't garrison settlements.
    COOPERATIVE CAMPAIGN AI PROJECT
    I propose we all collectively brainstorm about creating an improved campaign AI. I (or any volunteers? anyone?) will attempt to put these ideas into the game.

    Lusted's AI will be used as the base. (is xeryx, others better?)

    For instance we could brainstorm by making posts:
    • describing how our campaign is going.
    • describing what we don't like and do like about ai performance in our campaign.
    • describing what we want the campaign ai to be like.
    This first post will be updated with experimental campaign AIs developed in response to these ideas.

    I am posting this in the main forum so we get max idea posts in this brainstorming thread.
    Last edited by Banzai!; August 05, 2008 at 03:59 AM.

  2. #2
    Indefinitely Banned
    Join Date
    Jul 2008
    Location
    Laptop :)
    Posts
    240

    Default Re: Co-operative Campaign AI Project

    * Mongols do nothing (do not achieve their historical empire or anything even close to that)
    * England gets wiped out and Ireland and Scotland run around beating up France and HRE.
    * Nobody declares war on me. Hurry up and declare war on me.
    * AI doesn't garrison settlements.


    Mongol Improvement Project?
    Common sense? xD
    Stop being goodie two-shoes
    Garrison script

    ________________________

    On a serious note, a main thing that has to do with this is the Victory conditions - I suppose the Mongol's don't have any great ones for them to try and forfil. Also England has to try keep Caen which they shouldn't have too - considering it was given back to the French. This is why they get nerfed -

    Garrison script should help though - although I don't use it personally
    Last edited by Grandmaster Ryu; August 05, 2008 at 04:26 AM.

  3. #3
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Co-operative Campaign AI Project

    Brainstorming is all well and good, but is there anyone here with AI programming experience?

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  4. #4
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    Quote Originally Posted by Caesar Clivus View Post
    Brainstorming is all well and good, but is there anyone here with AI programming experience?
    Look at descr_campaign_ai_db.xml. It's quite simple to write a command,

    if ai in this situation
    react this way

    We need brainstorming to create a cohesive and well rounded ai based on everyone's experiences.

  5. #5
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Co-operative Campaign AI Project

    Quote Originally Posted by Banzai! View Post
    Look at descr_campaign_ai_db.xml. It's quite simple to write a command,

    if ai in this situation
    react this way
    It's not quite as simple as that though. Changing one thing can affect other things which affect even more things.

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  6. #6

    Default Re: Co-operative Campaign AI Project

    True. It will not be an easy task.
    [

  7. #7
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Co-operative Campaign AI Project

    Quote Originally Posted by Banzai! View Post
    There are a lot of submods out there for Stainless Steel. New units, AORs are all good but the essential game mechanics is what keeps us playing a campaign.

    AI
    However all of M2TW's ai virtuosos, Darth, Lusted, xeryx and nickman77 are on hiatus.
    Yet there is a big capability gap in the Stainless Steel campaign ai.

    For instance I have noticed:
    • Mongols do nothing (do not achieve their historical empire or anything even close to that)
    • England gets wiped out and Ireland and Scotland run around beating up France and HRE.
    • Nobody declares war on me. Hurry up and declare war on me.
    • AI doesn't garrison settlements.
    COOPERATIVE CAMPAIGN AI PROJECT
    I propose we all collectively brainstorm about creating an improved campaign AI. I (or any volunteers? anyone?) will attempt to put these ideas into the game.

    Lusted's AI will be used as the base. (is xeryx, others better?)

    For instance we could brainstorm by making posts:
    • describing how our campaign is going.
    • describing what we don't like and do like about ai performance in our campaign.
    • describing what we want the campaign ai to be like.
    This first post will be updated with experimental campaign AIs developed in response to these ideas.

    I am posting this in the main forum so we get max idea posts in this brainstorming thread.
    Bloody hell! I had exactly the same idea at the weekend, to gather all sorts of people together to do a new ai. I already have a list of things I wanted. I need some tough ai enhancement to go with the new bgrIV before I release it. I'll dig the list out later.


    EDIT:

    Here's my list so far, based on my playing or modding total war most days since RTW came out.

    AI Proposal

    1) AI must regard human controlled factions as the most powerful and dangerous.

    Reasoning: because they are, regardless of their size.

    2) AI must be able to act without honor towards the human player if it is in the interests of the AI. It is almost always in the interests of the AI.

    Reasoning: because that is how we can act towards the AI.

    3) AI should only assist the human player when a shared enemy is actually of a greater threat to the AI than to the human.

    Reasoning: a human player is all too capable of exploiting AI help, but need not bother to assist in return.

    4) AI should always demand significant tribute/gifts from a human player in exchange for allying him. The AI attitude towards the human should constantly be drifting towards unfriendliness. It should take a lot of money or significant battle assistance just to maintain a fair relationship with an ally.

    Reasoning: The easiest way for a human to conquer the AI is to ally, wait for it to fight someone else then crush its empty settlements, often many in a single turn. The AI needs to be more savvy in this regard.

    5) The AI should get and give other AI factions automatic permission to cross each others lands, but not allow a human to do it without damaging relations.

    Reasoning: A human player can exploit this AI weakness, but it does not apply to a human. WE can attack across neutral or allied territory with impunity, but the AI can do nothing back.
    Last edited by Byg; August 05, 2008 at 07:18 AM.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  8. #8

    Default Re: Co-operative Campaign AI Project

    Sounds good, there's certain sub-mods that are so good they are practically compulsory now - so everyone else has to make sure their new changes don't conflict other sub-mods, or better yet get included in an harmonious tested release.

    As a gamer there's nothing you hate more than fiddling around copying folders and files all over the place (even though it's free work, agreeing to easy installation and use is implicit in anything that uses the word "release" imo free or not).

    The stuff I'm working on will be split up into neat little packages (I think WRL has already isolated JUST the trade and tax income changes). Right now I'm playing it and including anything that improves the campaign gameplay.
    "If we didn't have cruxifixion, this country'd be in a right bloody mess"

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

    Default Re: Co-operative Campaign AI Project

    I notice that nikolai1962 has had another re-think on campaign AI re maps:

    http://forums.totalwar.org/vb/showpo...4&postcount=56

    very interesting thread:
    http://forums.totalwar.org/vb/showthread.php?t=82397

    also other threads:
    http://forums.totalwar.org/vb/showthread.php?t=83709

    http://forums.totalwar.org/vb/showthread.php?t=95416

    and CavalryCmdr's essay:
    http://rtw.heavengames.com/cgi-bin/f...t&f=9,6718,,10

    sadly most of the threads some time ago.

  10. #10

    Default Re: Co-operative Campaign AI Project

    Interesting AI discussion there.

    On another note might I also recommend a mission overhaul. Some are fine like aquiring trade agreements and assassinating Kings but "blockade a port for 500 florins" ... wow exciting

    We have easy and medium missions, but we're lacking in missions with really juicy rewards, missions that come up and you excitedly open and read them and go "yessss!" *fist pump*

    Looking through the possible commands in docudemon there seems definite scope for a mission overhaul mod.
    "If we didn't have cruxifixion, this country'd be in a right bloody mess"

  11. #11
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    Byg there were some good ideas in Rozanov's threads re traits:

    Create a "MoveFix" trait that gives a move bonus up to 100%. I split mine into five levels with 20% each. Trigger it for AI only on CharacterTurnEnd when they are out of a settlement with 100% movement left. Clear it on CharacterTurnEnd after they've moved. This will fix all the 40-50% of path-finding problems that seem to have no obvious cause and which always take the form of the AI army being stuck more than one but less than two turns away from the target, at least all those where the army is general led, which as I say, now looks like it will be a much larger percentage over the course of a whole game.

    Here is an AI protocol I am planning to test:

    Mongols:
    • If I am down to one settlement I will accept peace.
    • If I am < 30 provinces I will not accept any peace and invade anyone in my way.
    • I will kill Khwarezm or Khwarezm will kill me.
    • If these conditions are met I will revert to standard, possibly slightly more aggressive AI routines.


    Alliance Protocol:
    • I will abide by the alliance for 3 turns.
    • If I do not like you I will backstab you.
    • If you haven't defended your borders well I will backstab you.
    • If you start massing troops on your border I will preempt you.
    • If you start declaring war against lots of people I will backstab you.


    Invade Decide Protocol:
    • All references to statistics comparisons removed (e.g. production capability, military strength - these are not calculated very well and I always end up no. 1 in everything without even trying) when making decisions, except for frontline balance.
    • I will not invade for 3 turns after a cease fire.
    • If I am strong on the border I will invade.
    • If I am a superpower (many provinces) I will invade.
    • If I need to destroy your nation to win I will more likely invade (historical invasion tendencies).
    • If you are at war with lots of people I will invade.
    • If you are excommunicated and I am not a neighbour I will invade.
    • If you are excommunicated and you are at war with lots of people / I have reasonable frontline strength I will invade.
    Last edited by Banzai!; August 05, 2008 at 03:22 PM.

  12. #12
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    OK I have implemented AI based on these heuristics. I will now test the 1220 campaign (playing a Norway handsoff game) with Mongols using the Mongol "kill smash burn" AI and England, Spain, Genoa, Turkey and the Teutonic Order using the new AI. Everyone else is using Lusted.

    Let us see if England gets killed or not.

    Progress report:
    1223: Khiva falls to Mongols
    1225: Spain declares war on Moors. Mongols declare war on Cumans. Jaiksk (Cumans) falls to Mongols.
    Last edited by Banzai!; August 05, 2008 at 07:48 PM.

  13. #13
    aduellist's Avatar Push the button Max!
    Join Date
    Mar 2005
    Location
    Shenandoah Valley
    Posts
    1,822

    Default Re: Co-operative Campaign AI Project

    Just wanted to throw in my two cents, FWIW. I realize this all boils down to personal preference, but this "new and improved" AI seems to focus on thwarting players who prefer high dread campaigns. The AI heuristics above seem to boil down to "I WILL ATTACK YOU!!!!". This will seriously put a dent in those of us who play high chivalry campaigns, who don't backstab, blitz, go to war on a whim, and only make alliances we intend to keep.

    Still, a more effective Mongol invasion will certainly be welcome, along with Scots that don't kill England (and Norway) and Irish that don't try to take over France and Spain. If you can get the Irish and Scots to stay at home and defend vigorously, that will be a major accomplishment.
    Last edited by aduellist; August 05, 2008 at 07:46 PM.
    Under the patronage of TheFirstONeill
    Proud team member of
    THERA, A New Beginning


    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." H. L. Mencken

    "Liberty is meaningless where the right to utter one’s thoughts and opinions has ceased to exist. That, of all rights, is the dread of tyrants. It is the right which they first of all strike down." Frederick Douglass

  14. #14
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    After viewing the results, the simple fact is the Mongols need to be buffed. By the time they reach Gorgan almost all their armies are dead and their money has run out.

  15. #15
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Co-operative Campaign AI Project

    Quote Originally Posted by Banzai! View Post
    After viewing the results, the simple fact is the Mongols need to be buffed. By the time they reach Gorgan almost all their armies are dead and their money has run out.
    Definitely. The mongol invasion should be something to really fear, not just an event message amongst many others to ignore. This is especially true now that they are the only invasion we have (no more Timurids). Perhaps a reinforcement script for when they conquer a settlement, giving them more money and units?

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  16. #16
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    I have a pretty good Mongol AI set up. Their routine is: take out Khwarezm for the first 30 turns. Then run around killing anyone in their way.

    England fails because they run out of money. This can be easily fixed by increasing their kings purse.

    Ireland should probably get their boats and ports taken from them so that they don't steal Wales after the English first siege force fails. Lusted's AI can be improved by reducing the rebel invade priority so the AI doesn't make these huge leaps to take the few rebel cities in the late era campaign (Scotland -> Bruges).

    Also Spain needs to stop attacking Britain!!!!!!

  17. #17
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Co-operative Campaign AI Project

    Banzai how far west do the Mongols get with your AI?

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  18. #18

    Default Re: Co-operative Campaign AI Project

    I made a submod for DLV that boosts the Mongols by creating spawned armies relatively early in the campaign and then forcing them to attack targets. In addition the population of the targets is decreased,taken or not (fled, killed), and the lowest tier mongol religious building is created. This helps them keeping conquered regions with ease and frees up armies, that would be used for garrisoning those new regions first.

    They also get a heap of priests, their generals get traits that adds to piety and mobility. War is forced between mongols and all neighboring factions for the next ten years. They get a huge amount of money when they spawn, but no increase to their kingspurse until the "vanilla" invasion.

    From three armies spawned upon each region only one is forced to attack, the other two might or might not act as reinforcements, with that the results vary from campaign to campaign and give a player a slight chance to survive the first attack. Nevertheless if the player has one of the neighboring factions he will most likely loose some regions, it's the Mongols after all.

    Even if the Mongols do not take all the "scripted" regions at once, they will take enough to make the not taken regions "neighboring" and thus an invasion target.

    From the initial invasion the default AI kicks in, the Mongols will conquer very successfully for about thirty years, run out of money after ten years and will be on the retreat when the "vanilla" invasion happens (there is also the "Dark Ages" so I "made" them run out of money relatively early, or the player would have dozens of mongol fullstacks coming at him exclusively, but that is a DLV feature and can be ignored for your tweaks). Depending on how successful they were in the 40ish years between early invasion and vanilla they will either hold on to the regions taken, or expand westwards into Europe.

    The whole concept is working suprisingly well, so here are my tips for you:

    - let the Mongols invade early in the campaign even if it is not historically accurate (for example 1212 instead of 1240), less resistance and better chance to develop "mongol" structures and settlements

    - let them invade with full force, multiple massive armies are better than small armies coming after another

    - decreasing the population and creating religious structures via script definitly helps the mongols to keep the regions

    - giving the mongol generals piety and mobility traits helps too

    - you can add traits to scripted priests via console_command but then you can't use randomnames (afaik), I was too lazy for that and instead spawned three priests/region with 0 piety, some go awol and the rest gains piety fast due to generals/buildings

    - the whole scripted approach is working quite nicely without having to fine tune the campaign AI, you can check out the mini-script I made in this thread (http://www.twcenter.net/forums/showthread.php?t=181783) and use parts of it if you like. It's not pretty, I am not much of a scripter, but it's working...)

    Under the benevolent guidance of jimkatalanos

  19. #19

    Default Re: Co-operative Campaign AI Project

    Have you ever thought of making something like merge of DLV campaign mode (more challenging better balance of commercial buildings) with SS battle mode - meaning units and mercenaries (maybe with some additional DLV spear abilities?) and maybe with SS wonders?

  20. #20
    Indefinitely Banned
    Join Date
    Dec 2006
    Posts
    1,640

    Default Re: Co-operative Campaign AI Project

    Mongols using Mongol smash, kill AI (Late Era Campaign). Everyone else using Lusted AI.


    Also a nice demonstration of why I started this project: I am playing a hands-off Norway campaign (this means I just click on the end turn button when its my turn). Nobody has invaded me. Denmark declared war on me about 10 turns ago. Their concept of war is to blockade my ports and mob my castle with three diplomats to slow down my turns.

Page 1 of 10 12345678910 LastLast

Posting Permissions

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