Page 1 of 6 123456 LastLast
Results 1 to 20 of 106

Thread: Lusteds New Experimental AI

  1. #1
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Lusteds New Experimental AI

    EDIT: 4th version is now uploaded and in the .zip below

    Since the release of LTC 4.0/4.1 and SS 5.1 i've been wanting to go back and redo my campaign AI. if you follow this thread at .org, you will see some of the discussions i've been taking part of, and now i think i've got a good enough of my new AI(basically redone from scratch) to be tested and get feedback on. I'm hoping this AI will defend more, be better in diplomacy, choose invade targets better, and invade better. I do need to work on the naval invasion and crusades/jihads part of it, and it will likely need quite big changes before it's done.

    But it's an improvement over my previous one i think, and with some work could be quite a bit better i think.

    Simply take the files from the .zip and place them in the Stainless Steel data folder. Do not worry that the descr_campaign_ai_db.xml is smaller than the one used in Stainless Steel 5.1 as i've cut out ocde that was a bit redundant.

    I hope you enjoy this AI, and can provide the feedback i need to help refine and improve it.
    Last edited by Lusted; December 13, 2007 at 08:44 AM.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  2. #2
    Trajan's Avatar Capodecina
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10,934

    Default Re: Lusteds New Experimental AI

    I'm just happy you improved the diplomacy. I want the AI to know when they've been beaten. The one included in SS 5.1, the AI just won't except a ceasefire/become a vassal no matter what in hard mode. I have to throw money their way for them to accept it.

  3. #3
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Lusteds New Experimental AI

    The one included in SS 5.1, the AI just won't except a ceasefire/become a vassal no matter what in hard mode. I have to throw money their way for them to accept it.
    Be aware that in my AIs, H means the AI dislikes you more and is more likeoy to alliance agianst you more, and VH means that but more. That's why those difficulties are hard because the Ais out to get you more. Though it should still accept reasonable ceasfires and vassalage.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  4. #4
    aNarion.'s Avatar Centenarius
    Join Date
    Jul 2006
    Location
    Sweden, närke
    Posts
    846

    Default Re: Lusteds New Experimental AI

    great lusted! what difficulties do you recommend?

  5. #5
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Lusteds New Experimental AI

    If you want normality, medium, if you want AI only slightly ganging up on you, hard, if you want the AI to focus on you more, very hard.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  6. #6
    Trajan's Avatar Capodecina
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10,934

    Default Re: Lusteds New Experimental AI

    Quote Originally Posted by Lusted View Post
    Though it should still accept reasonable ceasfires and vassalage.
    Not with Ireland and France in my English campaign. I smashed Ireland to only one province and they just would not accept a offer of peace, vassalage/ceasefire. France, I've defeated them in battle after battle over the course of 20 years or so, killed King Phillip, taken all of northern France, and I'm now making my way to Paris from Rheims. They still do not want peace and they're the ones that started the war. Ireland too.


    So I guess normal difficulty is the way to go. I was fearing that normal would make the AI kind of passive.

  7. #7
    loet66's Avatar Senator
    Join Date
    Apr 2006
    Location
    France
    Posts
    1,016

    Default Re: Lusteds New Experimental AI

    Hi Lusted,

    It's good to see you again in this thread.

    Good update !

    Many thanks !!


    loet66

  8. #8
    y2day's Avatar TWC STORE NOW OPEN!
    Content Emeritus spy of the council

    Join Date
    Oct 2007
    Location
    under your bed
    Posts
    9,248

    Default Re: Lusteds New Experimental AI

    Lusted will this work for SS 4.1
    And thank you I really enjoy your work.





    TWC Graphics Workshop Art Competition!!!
    MEMBER OF THE IMPERIAL HOUSE OF HADER

  9. #9

    Default Re: Lusteds New Experimental AI

    hi lusted, does this version still build many forts?

  10. #10

    Default Re: Lusteds New Experimental AI

    This is great news, but you must help the hotseat players who want play Stainless Steel also needs help. Hunter brought here a major problem, or you know all ppl who are playing with you with great confidence or a single cheater can abuse the pursuing bug and use it to get super advantages and destroy all your armies exploiting the AI.

  11. #11
    Indefinitely Banned
    Join Date
    Nov 2007
    Location
    Odessa...
    Posts
    3,429

    Default Re: Lusteds New Experimental AI

    Quote Originally Posted by Trajan View Post
    Not with Ireland and France in my English campaign. I smashed Ireland to only one province and they just would not accept a offer of peace, vassalage/ceasefire. France, I've defeated them in battle after battle over the course of 20 years or so, killed King Phillip, taken all of northern France, and I'm now making my way to Paris from Rheims. They still do not want peace and they're the ones that started the war. Ireland too.


    So I guess normal difficulty is the way to go. I was fearing that normal would make the AI kind of passive.
    The same thing with me. Ireland fought to the death and those Frenchmen got suicidal tendencies... And I also took Paris, Bordeux and Angers, killing about 5 their kings, leaving them with only Toulouse and Lyon (for some reason Marseille is still Rebel - AI should attack player even if there are rebel settlements nearby?) and marching towards Clermont. And the peace is still "Very Demanding"... I guess the AI can check Financial ranking, as I got it much lower, than any AI faction, except Papal States. (on Hard difficulty AI is supposed to get extra cash per turn). Scotland, reduced to one region is also *****ing. In my case it can also depend on excommunication, as I was for finishing off Ireland.

    And on Easy AI just wants to ally with you no matter what, even if it means giving you few provinces, as was in my previous game as Kievan Rus'. I got along well with everyone, being allied with most of factions... Every alliance cost them from 2000 florins and up. I suggest to make some AI behave more neutral, for example making the current AI behavior Easy, and make a new Medium without such huge "gifts".

    ~These all were notes about the AI, included with SS 5.1~

  12. #12

    Default Re: Lusteds New Experimental AI

    Thanks again Lusted, I'll definitely try this as soon as I have time. Maybe this time I can give you some productive feedback as well. I have one question about the descr_campaign_ai_db.xml:

    Code:
    			<decision_entry>
    				<!--
    					IF TARGET HUMAN, INCREASE INVADE PRIORITY
    				-->
    				<min_entry	is_neighbour="true" target_human="true"/>
    				<max_entry	is_neighbour="true" target_human="true"/>
    				<faction_attitude	invade_priority="50" continue="true"/>
    			</decision_entry>
    
    			<decision_entry>
    				<!--
    					IF TARGET HUMAN AND DIFFICULTY HARD, INCREASE INVADE PRIORITY
    				-->
    				<min_entry	is_neighbour="true" difficulty="hard"/>
    				<max_entry	is_neighbour="true" difficulty="hard"/>
    				<faction_attitude	invade_priority="75" continue="true"/>
    			</decision_entry>
    
    			<decision_entry>
    				<!--
    					IF TARGET HUMAN AND DIFFICULTY VERY HARD HARD, INCREASE INVADE PRIORITY
    				-->
    				<min_entry	is_neighbour="true" difficulty="very_hard"/>
    				<max_entry	is_neighbour="true" difficulty="very_hard"/>
    				<faction_attitude	invade_priority="150" continue="true"/>
    			</decision_entry>
    Does this mean, that the AI in every difficulty is a little more aggressive to the player (invade priority 50, first one on top), and in Hard (75) and very hard (150) even more so?

    My Home is my Castle.

  13. #13
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Lusteds New Experimental AI

    Lusted will this work for SS 4.1
    And thank you I really enjoy your work.
    Yes it should do.

    hi lusted, does this version still build many forts?
    Yes, but less than in previous versions so you see less armies just sitting arnound in them. Unfortunately given the usefulness of the defend_fortified setting apart from the fort porblem i wil always have it in my AI.

    This is great news, but you must help the hotseat players who want play Stainless Steel also needs help. Hunter brought here a major problem, or you know all ppl who are playing with you with great confidence or a single cheater can abuse the pursuing bug and use it to get super advantages and destroy all your armies exploiting the AI.
    I responded in te other thread, short of making the AI never sally at all in battles(which in itself could be hugely exploitable), there is nothign that can be done about it.


    Echad
    Quote:
    Originally Posted by Trajan View Post
    Not with Ireland and France in my English campaign. I smashed Ireland to only one province and they just would not accept a offer of peace, vassalage/ceasefire. France, I've defeated them in battle after battle over the course of 20 years or so, killed King Phillip, taken all of northern France, and I'm now making my way to Paris from Rheims. They still do not want peace and they're the ones that started the war. Ireland too.


    The same thing with me. Ireland fought to the death and those Frenchmen got suicidal tendencies... And I also took Paris, Bordeux and Angers, killing about 5 their kings, leaving them with only Toulouse and Lyon (for some reason Marseille is still Rebel - AI should attack player even if there are rebel settlements nearby?) and marching towards Clermont. And the peace is still "Very Demanding"... I guess the AI can check Financial ranking, as I got it much lower, than any AI faction, except Papal States. (on Hard difficulty AI is supposed to get extra cash per turn). Scotland, reduced to one region is also *****ing. In my case it can also depend on excommunication, as I was for finishing off Ireland.
    Hmm, i'll definitely have a look at the code deciding AI peace, and include more to increase AI survivability a bit.

    And on Easy AI just wants to ally with you no matter what, even if it means giving you few provinces, as was in my previous game as Kievan Rus'. I got along well with everyone, being allied with most of factions... Every alliance cost them from 2000 florins and up. I suggest to make some AI behave more neutral, for example making the current AI behavior Easy, and make a new Medium without such huge "gifts".
    The AI should not be allying with everyone, though i supose given the general lack of rebels in SS in large parts of the map that there is less of a cnteract to early alliances.

    Does this mean, that the AI in every difficulty is a little more aggressive to the player (invade priority 50, first one on top), and in Hard (75) and very hard (150) even more so?
    Yes, it's set up to be slightly(only slightly) more aggressive against you by default due to the extra threat posed by the player. This is then increased on harder difficulties.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  14. #14

    Default Re: Lusteds New Experimental AI

    The overall IA is perfectly in diploma and battle, but i think the emerge faction like Teutonic, and Mongol need to be more aggressive, because most of the time they just keep walking around or stand there which mean they didn't using their superior army wisely when their army can take down multiple enemy settlement at the same time.

    I playing as France in VH/VH.

    In Valina, and SS4.1 the emerge faction will take enemy's settlement or attack opponent like crazy.:sparta:

    Thx a lot!!
    Last edited by newsoulhk; December 09, 2007 at 07:23 AM.

  15. #15

    Default Re: Lusteds New Experimental AI

    Hi Lusted,

    Thanks for another update of a very solid AI!!

    And is the new battle_config an improvement for the battle AI or has this something to do with the campaign AI?

    Winner of 'Favorite M2TW Mod' and 'Favorite M2TW Modder' Award 2007 & 2008

  16. #16

    Default Re: Lusteds New Experimental AI

    Yes, but less than in previous versions so you see less armies just sitting arnound in them. Unfortunately given the usefulness of the defend_fortified setting apart from the fort porblem i wil always have it in my AI.
    about the forts.. i have a feeling its your invade decisions. an entry lke this from the start:<faction_attitude invade="invade_none" continue="true"/>isnt generally a good idea. whatever obstructing entry is preceding your invade decisions is causing the AI to defend more than its suppose to. because naturally when AI is left to invade_none, it hasnt a choice but to defend, thinking to relax for a while so why not setting us a camp.

    also i read somewhere in cmdcavalrys essay about <defend_decisions> and <invade_decisions>. basically his implication is invade_decisions prioritize its attacks first then comes defensive measures. his take on this is quite possibily a fundamental misunderstanding. <defend_decisions> is used when enemy force comes within the province of the defenders. so enemy force crossing another faction's province border will invoke the defend_decisions. just a thought incase you didnt' know..

    another helpful hint, num_enemies is not the actual number of enemies you see visually within the game. it's how many at_war battlefronts there are. if you knew great, if you didn't it oughtta help you align those crazy at_war confrontations
    Last edited by nickman777; December 09, 2007 at 03:35 AM.

  17. #17

    Default Re: Lusteds New Experimental AI

    I agree to this, but this entry perhaps protect ai from stupid attacks.
    I play as Byzantine in VH/H.In 50 turns from the start ai makes excellent naval invasions with good armies. Same relligions nations and nations with alliance between them have solidarity. And for the first time ai goes to the hill to take defence stance from the plain in battle. I hope this was not accidental.
    But the truth is that in hard mode ai does not make peace. It fights to the end.

  18. #18
    aNarion.'s Avatar Centenarius
    Join Date
    Jul 2006
    Location
    Sweden, närke
    Posts
    846

    Default Re: Lusteds New Experimental AI

    15 turns deep with hre, and on the 14th turn the venetians makes this dessison:



    As you can see they sieged with one unit, against my 2 units..

    The turn after(15th) they asked for ceasefire. I testet how badley they wanted peace, by demanding 2 of their cities, and they accepted it as generously!

    This happend in XAI's AI too, but he fixed it.

  19. #19

    Default Re: Lusteds New Experimental AI

    Lusted,

    I notice in your latest campaign AI that you have reduced the number of defend decisions significally. I think this is a good idea as too many defend decisions seemed to be getting in the way of AI invasions before in your last version. Also can you tell us what changes you made in your new config_ai_battle.XML exactly, thanks.

    Trying to get the descr_campaign_ai_db.XML just right and get the right balance between defending and attack is extremely difficult from my own experiments. You can set it so that the AI garrisons its settlements better and defends its lands more. But then you have to worry about if the AI is invading correctly. Its very hard, I will be following your progress closely and providing you with feedback. Good luck with your AI and your future versions.

    Dave

  20. #20
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Lusteds New Experimental AI

    The overall IA is perfectly in diploma and battle, but i think the emerge faction like Teutonic, and Mongol need to be more aggressive, because most of the time they just keep walking around or stand there which mean they didn't using their superior army wisely when their army can take down multiple enemy settlement at the same time.
    Yes i need to increase the aggressiveness of the Mongols, it's on my to do list.

    And is the new battle_config an improvement for the battle AI or has this something to do with the campaign AI?
    It's related to this line:

    <!-- ratio of friendly to enemy strength to be considered more powerful -->
    <friendly-to-enemy-strength-ratio>1.0</friendly-to-enemy-strength-ratio>
    which also influences the campaign AI. But i do need to take another look at my battle AI.

    about the forts.. i have a feeling its your invade decisions. an entry lke this from the start:<faction_attitude invade="invade_none" continue="true"/>isnt generally a good idea. whatever obstructing entry is preceding your invade decisions is causing the AI to defend more than its suppose to. because naturally when AI is left to invade_none, it hasnt a choice but to defend, thinking to relax for a while so why not setting us a camp.
    Well sicne reorganinsing my invade decisions(now only a few with actual invade settings at bottom, a default of invade none at top, things relating to allinaces, protectorates, peace etc and choosing who to invade in middle) has made things better.

    another helpful hint, num_enemies is not the actual number of enemies you see visually within the game. it's how many at_war battlefronts there are. if you knew great, if you didn't it oughtta help you align those crazy at_war confrontations
    Yeah i knew, i've got code in my AI devoted to try and reduce the numbers of wars AI factions start.

    The turn after(15th) they asked for ceasefire. I testet how badley they wanted peace, by demanding 2 of their cities, and they accepted it as generously!
    I need to tweak diplomacy.

    As you can see they sieged with one unit, against my 2 units..
    It'll be a stronger unit so the AI thinks it is superior, it doesn't take fortifications into account unfortunately.

    I notice in your latest campaign AI that you have reduced the number of defend decisions significally. I think this is a good idea as too many defend decisions seemed to be getting in the way of AI invasions before in your last version.
    Thast was the idea, condense the defend decisioon to improve AI defending and not overcomplicate things.

    Also can you tell us what changes you made in your new config_ai_battle.XML exactly, thanks.
    See above.

    Trying to get the descr_campaign_ai_db.XML just right and get the right balance between defending and attack is extremely difficult from my own experiments. You can set it so that the AI garrisons its settlements better and defends its lands more. But then you have to worry about if the AI is invading correctly. Its very hard, I will be following your progress closely and providing you with feedback. Good luck with your AI and your future versions.
    From the investigations of nikolai and CavalryCmdr at .org, it appears that the invade priority is key in this, so i need to make sure that is all working properly.

    I've already made a few changes(added in a new decision to try and improve AI sense of survivability, a few tweaks to other decisions here and there), and once i've amde some changes to diplomacy i'll attatch it to the first post.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

Page 1 of 6 123456 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
  •