Results 1 to 22 of 22

Thread: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    To start it: some things I´ve noticed

    - When a faction starts to get pushed in one front but is still strong in the other, they´ll make an attempt at hacking at their other neighbour´s borders, if they think they´re weak, to get adittional breathing space. If you´re strong and already at war, and they are getting pummeled, they´ll immediatedly sue for peace

    - Low influence and risks of civil war induce warlords to sue for peace.

    - Bankrupcy and large armies induce warlords to hack at neighbours' provinces (tested by seeing how the computer attacked and then refused to ransom a crown prince and other 200 high rate units)

    - Royal marriages are easier to get if the target princess is getting moldy.
    Likewise, wars handicap your diplomatic attempts at RMs and alliances.

    - As always, an undefended province is always a tempting target for enemies. Don´t forget to protect your soft underbelly and cover coasts with fleets.

    - The enemy seldom uses spies, but it will often use assasins.

    - Low loyalty means cheap bribe prices. The computer does not bribe too often, not enemies, at least, but it does hit on cheap unit stacks from time to time. Specially rebels (as everyone does).

    - Peculiar Egyptian-Turkish-Byzantine relations:
    -Turkey and Byzantium will almost always get to war. Particular detonating points are bankrupcy(as stated above) and apparently getting close to GH emergence. This war can be prevented if you marry off a Byz princess to a turkish prince
    - Egypt is Byzantium´s staunch ally. Unless you hold lesser armenia or other common frontier, in which case it will strike again and again, even if they´re the losers for influence loss. So, if you want to trade, it´s a good idea to keep the turks alive, even if you kick them out of Anatolia and Rumelia.

    -Peculiar Golden Horde behavior:
    They always let crusades through

    - My theory on the "War Pope": it is triggered by papal bankrupcy and/or utter vulnerability of lands. Once playing Byz the pope attacked and suffered a horrible defeat in my newly conçuered Naples. They sued for peace the following year
    Iä Cthulhu!

  2. #2

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    In my Turk campaigns I always ally with the Egyptians straight away. I go to war with Byzantium and before to long the yellow peasant brigades invading Syria. I will never understand why they don't attempt to go after the Almos?

    I'm going to try to concede Syria via tax induced rebellion maybe that might promote a few more years of peace.

  3. #3
    Sir Loin of Lamb Member General Dazza's Avatar
    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    101

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Quote Originally Posted by guelphling
    In my Turk campaigns I always ally with the Egyptians straight away. I go to war with Byzantium and before to long the yellow peasant brigades invading Syria. I will never understand why they don't attempt to go after the Almos?

    I'm going to try to concede Syria via tax induced rebellion maybe that might promote a few more years of peace.
    Welcome to the Org guelphling

    If you pull all your troops out and raise taxes you should manage to create rebellion.

    Quote Originally Posted by The Unknown Guy
    - Low influence and risks of civil war induce warlords to sue for peace.
    I don't think I've had a country sue for peace with me while I'm pushing them to civil war Unkown.

    Quote Originally Posted by The Unknown Guy
    - My theory on the "War Pope": it is triggered by papal bankrupcy and/or utter vulnerability of lands. Once playing Byz the pope attacked and suffered a horrible defeat in my newly conçuered Naples. They sued for peace the following year.
    This is true. I think if the Pope has strength he'll attack where an opportunity/need arises, but if he suffers a significant defeat he'll quickly sue for peace (and even form an alliance from what I've seen).

  4. #4

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Quote Originally Posted by The Unknown Guy
    To start it: some things I´ve noticed

    - When a faction starts to get pushed in one front but is still strong in the other, they´ll make an attempt at hacking at their other neighbour´s borders, if they think they´re weak, to get adittional breathing space. If you´re strong and already at war, and they are getting pummeled, they´ll immediatedly sue for peace
    The AI is a simple beast but it appears to work like you say which is good enough and adds to the immersion factor. What usually occurs is, that the AI get's beaten and loses provinces, this produces larger stacks coming together in the backwater provinces. The AI then simply checks it's neighbours forces against it's own bloated stacks and invades them. This is why a reappearing faction has a tendency to spread out quickly. Large stacks mean that it can divide them up and use them for multiple invasions. I have often turned my faction over to AI control to see what it does with my forces. In most cases it will quickly spread out and conquer half of the map, then due to being spread to thinly it's empire will fall apart and be absorbed by a reappearing faction, and so the cycle begins anew.
    Quote Originally Posted by The Unknown Guy
    - Low influence and risks of civil war induce warlords to sue for peace.
    I've never noticed this in MTW much, in STW yes, but you could very well be right, possibly it occurs though to a lesser degree.
    Quote Originally Posted by The Unknown Guy
    - Bankrupcy and large armies induce warlords to hack at neighbours' provinces (tested by seeing how the computer attacked and then refused to ransom a crown prince and other 200 high rate units)
    I think this applies to your first point. Bankruptcy is just a result of high support costs in provinces incapable of supporting those units. The AI will eventually break out and attempt an invasion if it perceives it's neighbour to be weaker. The Aragonese will pretty much always try on an invasion of Tolouse eventually, if the garrison there is too weak. The same goes for the Danes with regard to Saxony. This is because they will eventually stock up with a lot of Royal Knights (causing bankruptcy) and when checking the overall power of their army and their neighbours they will find theirs to be superior. The AI doesn't go on numbers alone, but on the general and class and valour of the units defending the province. The AI must work out it's invasion probability from these factors. I have often found that the AI attacks my provinces the following year that I've moved a high command general or an elite unit out.
    Quote Originally Posted by The Unknown Guy
    - Royal marriages are easier to get if the target princess is getting moldy.
    Likewise, wars handicap your diplomatic attempts at RMs and alliances.
    Another one I've never noticed, though I don't see why it couldn't work like that.
    Quote Originally Posted by The Unknown Guy
    - As always, an undefended province is always a tempting target for enemies. Don´t forget to protect your soft underbelly and cover coasts with fleets.
    An undefended province is always a target but there is an overriding factor and that is whether the AI wants the province or not. I have tested abandoning provinces to my enemies and allies alike, and and found that the AI often ignores them for years. In fact on many occasions they only attacked after the province had rebelled. I have yet to understand why this occurs, but it appears that the A goes for certain provinces and ignores others, it doesn't simply try to take everything indiscriminately.
    Quote Originally Posted by The Unknown Guy
    - The enemy seldom uses spies, but it will often use assasins.
    True, though this is mainly due to the higher building requirements for spies. Also, the AI is not effective in their use in that it cannot carry out any of the subterfuge missions. The AI can only move spies around and leave them in provinces. I have often seen the AI train about 5 spies and then simply leave them in that province for the duration of the campaign. In another case the AI trained the spies in Greece and then moved them to Serbia, and no further. They remained there for the duration.
    Quote Originally Posted by The Unknown Guy
    - Low loyalty means cheap bribe prices. The computer does not bribe too often, not enemies, at least, but it does hit on cheap unit stacks from time to time. Specially rebels (as everyone does).
    It seems to be the case. The lower the loyalty the cheaper the bribe. Rebel stacks appear to be cheap simply because most rebel generals have 0 loyalty.
    Quote Originally Posted by The Unknown Guy
    - Peculiar Egyptian-Turkish-Byzantine relations:
    -Turkey and Byzantium will almost always get to war. Particular detonating points are bankrupcy(as stated above) and apparently getting close to GH emergence. This war can be prevented if you marry off a Byz princess to a turkish prince
    Quote Originally Posted by The Unknown Guy
    - Egypt is Byzantium´s staunch ally. Unless you hold lesser armenia or other common frontier, in which case it will strike again and again, even if they´re the losers for influence loss. So, if you want to trade, it´s a good idea to keep the turks alive, even if you kick them out of Anatolia and Rumelia.
    AI Turks and Byzantines will almost always go to war yes. Again bankruptcy is a symptom of the AI having used all of it's resources to spam large stacks. It will then "vent" those stacks into surrounding provinces. As the player playing as the Turkish/early you can avert War with the Byzantine fairly easily, by simply not attacking them. They will usualy not ally with you however. The Egyptians on the other hand will ally with you, but will always invade Syria at some point early on. It is only when the Turks are out of the picture that the Byzantine and Egyptians will start on each other. I believe this occurs due to the AI "choosing" it's allies and enemies from among it's neighbours. It would be interesting to edit the startpos file and switch the Egyptians and Turks to each other's provinces and see if that changes the Byzantine attitude to them, I feel it would and that the Byzabntine and Turks are hostile simply due of the number of shared borders (Lesser Armenia/Rum, Anatolia/Rum, Trebizond/Rum, Georgia/Armenia, Trebizond/Armenia), many more than the Egyptians share with the Byzantine (Lesser Armenia/Antioch) and more than the Egyptians share with the Turks (Syria/Arabia, Syria/Antioch, Syria/Tripoli, Syria/Palestine). So (IIRC) the Egyptians share 4 borders with the Turks, the Turks share 5 borders with the Byzantines whom only share 1 border with the Egyptians.

    We can apply this to other factions that share many borders such as the English and French, the French and HRE and the HRE and Hungarians. All of these factions seem to end up at war with each other.
    Quote Originally Posted by The Unknown Guy
    -Peculiar Golden Horde behavior:
    They always let crusades through
    Not always, it depends on allied/neutral/war status. The AI will check the crusade against it's army stack in the province to see if it can win. I've ha similar problems with the Byzantine blocking my crusades for no apparent reason. It seems that if your crusade is perceived to be weak and your faction is not allied then it increases the chances of this occurring, when passing through pagan or orthodox lands.
    Quote Originally Posted by The Unknown Guy
    - My theory on the "War Pope": it is triggered by papal bankrupcy and/or utter vulnerability of lands. Once playing Byz the pope attacked and suffered a horrible defeat in my newly conçuered Naples. They sued for peace the following year
    I've never understood the papacy, but they do use use a different AI script I believe so it may be that they're programmed to try and provoke the player into wiping them out. It seems that way sometimes.

    “The majestic equality of the laws prohibits the rich and the poor alike from sleeping under bridges, begging in the streets and stealing bread.” - Anatole France

    "The law is like a spider’s web. The small are caught, and the great tear it up.” - Anacharsis

  5. #5

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Interesting topic - just to post my comments on certain factors affecting AI behaviour.

    It should be mentioned that the starting Ai "personality" also influences choices and strategies for a faction up to a point (that point usually is when they are too powerful to stop). A catholic-defensive-crusader will develop/respond different than the catholic-expansonist-crusader.

    Also, the building flow/construction requirements are crippling the AI in the vanilla game as he will go on to complete castles and military buildings before even considering making financial buildings. Valor bonus provinces are further crippling, as Cambyses II has pointed out in an older thread (and as i and prolly others have found independently or not) the AI will stop developing the province once he reaches the buildings required for the unit that gets the bonus.

    Since he cannot disband armies/fleets, he can only get rid of armies through war attrition, and this is why there has to be a constant level of warmaking throughout a campaign but with slow conquering advances, to keep the AI economy constantly healthy and the game interesting.

    In my home mod of Medmod IV, i have allowed all military buildings of all levels to be built at the third level castle, have standardised their cost to 400 and their building times at 4 turns - and it works wonders as the AI gets through with building them in the first 25 turns or so... It wont make him any better militarily wise as the new units won't come in until the next era and when it comes everyone has access to them immediately. Also the logistical strength of each faction in numbers is regulated by home provinces: for example the Italian factions (Venice-Genoa) have 4, that's two each - while the HRE, France and the Byzantines have about a dozen each. So, it doesn't matter how many provinces the AI develops militarily but how many of his homelands he has bdeveloped and has available.

    The two larger fort levels have only cultural/advanced tech buildings associated with them that in the MedMod IV are unique; this makes for less Citadels and fortresses that in most cases in the vanilla game are a huge waste of funds and most importantly time for the AI factions (since they build 3 to 5 of them whithin 100 to 130 turns).

    With all valour provinces removed (that's actually with the removal of the upgrades and the nerfing of command stars a plus/plus for tactical battles) and without taking ages and millions to develop military infrastructure, the AI is actually a decent strategic player, developing the economy with a lag of about 5 to 12 turns slower than the human player, i found out.

    The true problem is what happens once the AI gets good money; he usually spams troops/fleets/agents until with the first stumble he is in the red by a lot. This is why the emphasis in agricultural income in XL works so well - these stumbles (read loss of trade routes) are less frequent.

    Once the AI gets really rich, no matter what his personality background he goes megalomaniac and spreads in the way Cambyses II described till he gets fragmeneted and devoured by others and so on.

    The two best ways to make sure this is happening at a reasonable pace/quantity are strict homelands and high rebellion (about 2 in the startpos file) provinces.

    The first, ensures that the AI faction that largely deviates from its homelands is doomed, sooner or later (as they cannot replenish their armies fast enough) and the second that the advancing rate of a conqueror is about 1/8 of that in the vanilla game. Both these are good as the game is not "over" in 45 turns or so, neither do you see the all familiar territory exchange of vanilla (Egyptians in place of Turks - English in place of Turks and vice versa after a war between them).

    Overall, the AI can do well, and could do really well if there was a disband fleets/units script built into it and a function of selectivity for building choices once he has a lot of cash.

  6. #6

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Quote Originally Posted by Noir
    Also, the building flow/construction requirements are crippling the AI in the vanilla game as he will go on to complete castles and military buildings before even considering making financial buildings. Valor bonus provinces are further crippling, as Cambyses II has pointed out in an older thread (and as i and prolly others have found independently or not) the AI will stop developing the province once he reaches the buildings required for the unit that gets the bonus.
    The AI definitely develops a province in order to train the valour bonus unit before it does anything else. I have not seen much evidence of the AI continuing to develop the province after it has teched up to the valour bonus unit either. This is really a grey area that needs considerably more testing. I have seriously considered removing all valour bonus regions from the mod, but that would be very unpopular with many players, and understandably so.
    Quote Originally Posted by Noir
    Since he cannot disband armies/fleets, he can only get rid of armies through war attrition, and this is why there has to be a constant level of warmaking throughout a campaign but with slow conquering advances, to keep the AI economy constantly healthy and the game interesting.
    This is the big problem. The AI cannot disband any units, so the more money you give it the more it spams, and the worse it gets. So throwing money at the problem is never a solution. Controlling and regulating it is the key.
    Quote Originally Posted by Noir
    In my home mod of Medmod IV, i have allowed all military buildings of all levels to be built at the third level castle, have standardised their cost to 400 and their building times at 4 turns - and it works wonders as the AI gets through with building them in the first 25 turns or so... It wont make him any better militarily wise as the new units won't come in until the next era and when it comes everyone has access to them immediately. Also the logistical strength of each faction in numbers is regulated by home provinces: for example the Italian factions (Venice-Genoa) have 4, that's two each - while the HRE, France and the Byzantines have about a dozen each. So, it doesn't matter how many provinces the AI develops militarily but how many of his homelands he has bdeveloped and has available.
    That is a good approach, I have been working on something similar for quite some time. I have looked into removing the fort level altogether and reducing the build time and cost of the upper castle levels. The fort I would have as a simple garrison building, costing 100 and taking 1 year to build, as a temporary outpost to hold down a province - not a town/settlement. The only buildings that could be constructed at fort level would be the farmland, port and mines. The horse breeders I would change to depend on the later castle levels instead of being fully upgradeable, and the swordsmith and armourer would be levelled off to correspond with the spearmaker and bowyer, none of these would depend on each other, but would be individuals. The startpos would be edited so that every province starts with a fort.
    “The majestic equality of the laws prohibits the rich and the poor alike from sleeping under bridges, begging in the streets and stealing bread.” - Anatole France

    "The law is like a spider’s web. The small are caught, and the great tear it up.” - Anacharsis

  7. #7
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,481

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    As always, an undefended province is always a tempting target for enemies
    I have on occasion had the exact opposite experience. Can't recall the factions/provinces involved but I got to a point in one game where an overwhelming invasion occured. I reloaded, increased my garrison, and the AI invasion was larger. Same again, even bigger. In the end I decided the province was undefendable, so reduced the garrison to just enough to maintain loyalty. Guess what? The AI didn't invade, and indeed that entire war never happened! So in some circumstances it seems that a more heavily defended province can be MORE of a temptation to the AI that an effectively undefended one. It might be down to the fact that the AI couldn't "see" what armies I might have had in a potential "counterattack province", or maybe my border garrison was a "provocation" to it.
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

  8. #8

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Originally posted by Cambyses II
    I have seriously considered removing all valour bonus regions from the mod, but that would be very unpopular with many players, and understandably so.
    Well, perhaps, however i have kept at a minimum campaign related factors that can influence the stats of units. I removed the armour and weapon upgrades, valour bonuses, morale uprades and nerfed significantly the default command stars (ranging from 0 to 4 now as a start) as mentioned earlier. These in my opinion only provide a distortion of the battles as rich factions can afford to make their units better, something which i dislike. Upgrades and jedai units being campaign winners are a huge spoiler for me. There's nothing worse than winning battles simply because your swords will beat the enemy swords and your spears will beat the enemy spears and so on. Tactics are not needed anymore passed that point.

    In addition, i have regulated the maintencance costs/rebbeliousness of provinces in order to give no more than a stack+ a couple of units max per province for the AI factions and make it popssible to invade a neighbouring province at the cost though of having the newly conquered and the owned province rebelled if not careful/not having happy buildings etc etc.

    This implies that apart from the horde and crusades/jihads, there are few battles to be fought with more than a full stack vs a full stack, which i find is perfect - more than that and battles become multihour chores that you know you'll win versus usually a fragmented and leaderless (after the initial melee) mob, but still you have to sit out in the pc.

    As for the popularity of all this, well, i personally enjoy the game in this way. I understand very well that the rules change if you are making a released mod though.

    Relative to the AI developing provinces until he reaches the requirements for the valor bonus, there is no doubt about it. I have played several Byzzantine campaigns in the MedoMod IV with the AI controlling building/training. He never did once built anything in Constantinople (Tharce in the mod) despite the fact that its the most ludicrous province commercially (together with Egypt, Sicily, Algeria, Provence, Venice, Aragon, and Khazar). That's because the katafracts that were getting the bonus there were already available. Once i've removed the bonus... surprise, surprise: the AI was making 1600 to 2300 in Constantinople in 20 turns in the majority of the cases, not so much different than what i was able to achieve.
    Last edited by Noir; 04-18-2007 at 15:14.

  9. #9
    Member Member Caerfanan's Avatar
    Join Date
    Feb 2007
    Location
    Lyon, France
    Posts
    780

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    Quote Originally Posted by macsen rufus
    I have on occasion had the exact opposite experience. Can't recall the factions/provinces involved but I got to a point in one game where an overwhelming invasion occured. I reloaded, increased my garrison, and the AI invasion was larger. Same again, even bigger. In the end I decided the province was undefendable, so reduced the garrison to just enough to maintain loyalty. Guess what? The AI didn't invade, and indeed that entire war never happened! So in some circumstances it seems that a more heavily defended province can be MORE of a temptation to the AI that an effectively undefended one. It might be down to the fact that the AI couldn't "see" what armies I might have had in a potential "counterattack province", or maybe my border garrison was a "provocation" to it.
    I've figured that having a heavily garrisoned border makes your neighbours nervous, and might give them the want to strike the first blow.

  10. #10

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    On naval invasions: is it just me, or the AI tends NOT to perform them? I´ve only seen a proper attempt at a naval invasion, (AKA: moving a decent fleet to protect the invasion route, beating off enemy attacks) at Egyptian hands, to take French or Rebel Cyprus.
    Iä Cthulhu!

  11. #11

    Default Re: AI psychology: a thread attempting to analyze it´s behavior (contribs. welcome)

    The way Ai does naval invasions is to decrease the support costs of his fleets. Say you are trading from Venice to Khazar. For every sea reagion that you occupy from your home port the meintenacnce cost is +the base maint. amount for that fleet. That is the fleet in the third sea region away from the pot will cost 3x its base maint. cost.

    The AI will get a province in the middle decreasing the costs of his trade vessels.

    Unfortunately trade vessels cost ridiculusly little to maintain and so one or the AI can get millions of income if holding the right provinces. This can be addressed effectively by getting the base maint. cost for castal vessels to about 55 florins.

    I am sure that trade goods and agr income comes into the equation for the AI to choose the province he wishes to colonise. For example the Spanish will often target Flanders for their naval invasions.
    Last edited by Noir; 04-19-2007 at 11:49.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO