Page 1 of 2 12 LastLast
Results 1 to 30 of 36

Thread: New CAI/PiterAI1.0

  1. #1

    Default New CAI/PiterAI1.2 (artificial Intelligence)

    PiterAI- artificial intelligence

    Works with 2.01.

    Download link:

    Ver 1.3 (First install version 1.2 (improved system ceasefires and alliances))

    http://ge.tt/8jMiae72/v/0

    Ver 1.2 (fixed system of alliances)

    http://ge.tt/2kZ8jSv1/v/0

    alternative link

    http://www.speedyshare.com/Y8yRj/CAI-PiterAIEB21.2.rar

    Ver. 1.1

    http://ge.tt/13Ah2ku1/v/0




    Ver. 1.0

    http://ge.tt/7ldXszt1/v/0

    Reduced income from cities. AI will work much better. (Very difficult economy. Keep the original file if you do not like it)

    http://ge.tt/6IiYUv02/v/0
    Installation instructions:
    unzip in your mods\EBII folder
    delete the map.rwm file within the mods\EBII\data\world\maps\base directory

    Information

    Diplomacy is based on many factors but in short it works as follows:

    From the point of view of campaign difficulty level:

    VH level – AI considers player as its biggest threat so it tries to form alliances against the player and tends to go to war against the player. The AI factions easily form alliances if they consider the player their biggest threat.

    H level – AI considers the player as a threat and tries to form alliances against the player and tends to go to war against the player, but to a more limited extent than on VH level. If an AI faction neighbors a faction that is significantly stronger, it will try to find an alliance against such faction. In such situation AI may propose alliance to the player and be a loyal ally.

    N level – AI tries to form alliances against the strong empires (factions that are significantly stronger than AI) and tends to weaken them. If there are no such strong factions, AI will try to go to war against the player. If AI does not border the player, it tries to attack its weakest neighbor (if it tried to attack the weakest neighbor first, the campaign would be rather boring :)).

    In general:

    If the AI’s invasion priorities (i.e. code command driving AI to invade a given target) do not exceed a minimum threshold, the AI will not attack other factions (except for rebel / neutral provinces).


    By using the „opportunistic invasion” command in the options of war and rebel provinces conquer, AI will sometimes ignore its diplomatic priorities. Besides, M2TW AI is bugged anyway.

    Alliances – if an alliance is not aimed against an enemy which is the AI priority target, it works as a „non-aggression pact”. The alliance code includes commands which drive AI to attack a common enemy but if it is not the AI perceived “priority enemy”, the chance that such attack will be executed is rather small (especially on VH difficulty).

    Preparations for war



    The tactics responsible for invasion is rather a slow and “lazy” procedure so the AI will usually gather its armies along the borders before it finally decides to invade. Also AI will train its best available units and agents – do not be surprised when an AI assassin kills your favourite general. For the human player this knowledge is not a big facilitation though, since the fact that AI is gathering its forces along the border does not mean that it is going to invade the player’s faction in the nearest future.


    In some circumstances (for instance when the player does not wage a war with its neighbors), a neutral AI faction will also keep its garrisons on the border, just as it waged a war against the (neutral) player. This AI behavior may change when the it is in war with other factions – in such case it may send all its forces to the endangered front.

    War


    The highest priority of AI is besieging settlements – AI uses almost all its military potential on a given front to besiege settlements. It is probably not the best solution but taking into account the limitations of the M2TW engine it seems to be pragmatic and sufficient – otherwise AI would wander its armies aimlessly over the map.
    Then, as a second priority, AI tries to attack the available targets in range, so sometimes when besieging a settlement, another AI army may come to support the siege or even attack a defending player’s army which stands near the besieged settlement (to help defend it in case of assault), while the first AI army still keeps the siege.
    Finally, AI tries to do an “opportunistic attack”, which in some circumstances may ignore other AI settings and priorities. But thanks to this “opportunistic” possibility, AI is more “intelligent” and able to use some unexpected situations to its benefit. Since AI tries to besiege settlements, sometimes it may happen that it will spare player’s army standing on the bridge / ford and will walk around to lay a siege to a settlement or spare the closest strongly garrisoned settlement to lay a siege to the weaker one.


    - AI trains the troops of good quality, generally better than in the majority of mods I’ve seen and I think even better than in the original EB2 (no offence to the original EB CAI coder) since the troops quality depends mainly on the tactics settings in file descr_campaign_ai_db – I don’t know whether the twc modders know that.


    - The additional advantage of such tactics is the AI ability of starving the besieged settlements – AI will not attack until it is certain that it will win (taking into account the result of the autocalc battle).


    - AI is able to hire the mercenaries, which I did not observe frequently using other M2TW CAIs,


    - Of course AI can spam agents in some circumstances (especially the pesky merchants but these are no longer in EB2),


    - When AI declares a war, it can – especially when the border is long – attack simultaneously with several armies in different places along the border, which can demolish a careless player (I hope you don’t use the unhistorical “reload”).


    - AI uses its agents better,


    - AI can successfully strike with a really good sea invasion. This part of the code is perhaps not perfect but in my view it is quite good in comparison to other M2TW CAIs - I would like to see a CAI code which does it better.


    Defence:


    - Here I coded the AI in such a way that it is not so easy to conquer the settlements by attacking an army standing near the settlement and wiping out the settlement garrison that joins the battle as reinforcements (AI tries to place its armies a bit farther from settlements).

    If the total strength ratio on a given front is unfavorable to AI, it will not attack openly but will rather sit in garrisons or try to defend based on bridges / fords and prepare ambushes in forests. On some occasions AI fooled me with the following scheme: I see a weak army near the forest, attack, the AI withdraws to the forest, I attack… and then I am ambushed by significantly stronger AI army. This is not very frequent but the AI in the old M2TW can show some tricks – it’s a pity that the original authors made so weak use of the AI potential in the vanilla game.

    Even on N difficulty if an AI faction concludes that it no longer have common interests with the player and at the same time the AI faction is not in war against any of its neighbours, it may break the alliance with the player. In such case only relations 10/10 or 9/10 can protect the player from breaking the alliance by the AI. If AI is in war with a non-neighbouring faction, it does not count as a war and AI may break the alliance as soon as its common interests with the player end.
    Thank you for the translation Polehammer.

    Thanks for Araven for help in testing.
    Last edited by Piter; 01-09-2015 at 16:33.

    Members thankful for this post (4):



  2. #2

    Default Re: New CAI/PiterAI1.0

    This isn't really informative. What does this CAI do that makes it better?
    Nihil tam munitum quod non expugnari pecunia possit.
    Nothing is so strongly fortified that it cannot be taken by money.
    Marcus Tullius Cicero

  3. #3

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by mmiki View Post
    This isn't really informative. What does this CAI do that makes it better?
    everything :) It's hard to explain by google translator :) Play and Review :)

  4. #4
    Sassem Member Sassem's Avatar
    Join Date
    May 2007
    Location
    in the land of FIGHTING WINDMILLS
    Posts
    521

    Default Re: New CAI/PiterAI1.0

    haha ...you so funny

  5. #5

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Sassem View Post
    haha ...you so funny


    Why this spam?

    - A new way of moving AI armies on strategic map, more efficient AI attacks,
    - AI factions can do efficient sea invasions,
    - AI trains more agents and uses them more efficiently,
    - AI uses terrain features for placing its armies to defend better (such as bridges, fords etc.),
    - Diplomacy tends to balance the AI factions, AI factions try to make alliances against stronger enemies,
    - Sometimes AI faction may propose peace,
    - AI factions build strong armies alongside the borders before they decide to attack,
    - Innovative diplomacy based on several dozen factors,
    - New vassallage system
    Last edited by Piter; 09-08-2014 at 23:44.

    Members thankful for this post (3):



  6. #6

    Default Re: New CAI/PiterAI1.0

    I think people are suspicious when they do not have enough information. You said in the other thread that you do not speak English very well. Maybe if you try nontheless (no Oxford English required ;)). Or if not possible, which languages do you speak? Maybe someone can help translating.

  7. #7
    Minister of Useless Tidbits Member joshmahurin's Avatar
    Join Date
    Oct 2012
    Posts
    862

    Default Re: New CAI/PiterAI1.0

    Yeah people are just suspicious of random download links without an explanation. But thanks for putting this out there! @GRANTO might want to look at it



  8. #8

    Default Re: New CAI/PiterAI1.0

    im playing with it now.

    Member thankful for this post:



  9. #9

    Default Re: New CAI/PiterAI1.0

    I'll give it a try as well.
    Last edited by Nightshift; 09-07-2014 at 00:29.

  10. #10

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Piter View Post
    Download link:


    http://ge.tt/7ldXszt1/v/0



    Installation instructions:
    unzip in your mods\EBII folder
    delete the map.rwm file within the mods\EBII\data\world\maps\base directory


    Need new campaign
    i liked it @Piter , its good..i learn a lot from it. thank you.

  11. #11
    EBII Hod Carrier Member QuintusSertorius's Avatar
    Join Date
    Apr 2008
    Location
    UK
    Posts
    23,140

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Piter View Post
    Need new campaign
    You don't need a new campaign, but you need to generate a new game in order for the changes to take effect (and generate a new map.rwm).
    It began on seven hills - an EB 1.1 Romani AAR with historical house-rules (now ceased)
    Heirs to Lysimachos - an EB 1.1 Epeiros-as-Pergamon AAR with semi-historical houserules (now ceased)
    Philetairos' Gift - a second EB 1.1 Epeiros-as-Pergamon AAR

    Member thankful for this post:

    Piter 


  12. #12

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by QuintusSertorius View Post
    You don't need a new campaign, but you need to generate a new game in order for the changes to take effect (and generate a new map.rwm).
    True, but not for all modes so it works.

  13. #13
    Member Member Rovert's Avatar
    Join Date
    Apr 2008
    Location
    Calgary , Alberta [Canada]
    Posts
    78

    Default Re: New CAI/PiterAI1.0

    Trying This Now , hope its better than the other 1.

    Ok so they AI dosent seem dumb aggressive , the agents are a little over kill , there is spys and diplomats everywhere LOL , The AI seems to focus on whats important then to just attack you savagely just cause there bordered with you. I also have 2 alliances that are holding over 40 turns , best so far usally they will siege your port like tards and give up the trade revenue.

    Just so any1 knows if you become a vassel it costs tribute and a lot , really hard on the small factions


    I am 75 turns in so far , I will update when I am further along , so far its great , I also tired moving the AI to save policy , all the little factions aren't sweeping across taking everything now , I have 4 allies and they are holding , this mod is really good .
    150 turns nobody is dead , allies are holding for everybody , AI expansion is much slower , Rome is still trying to become Germany , guess that will never change , they wanted to be Germany so bad in EB1 also.

    https://i61.tinypic.com/vf88qe.jpg

    im trying as the brit faction its most out of the way , I hope I get better troops cause these guys suck , naked spear guys just don't seem like a reliable line troop.

    https://i57.tinypic.com/8xla1t.jpg

    https://i58.tinypic.com/28v6g41.jpg

    https://i62.tinypic.com/2q03fa9.jpg
    Last edited by Rovert; 09-09-2014 at 16:44.

    Member thankful for this post:

    Piter 


  14. #14

    Default Re: New CAI/PiterAI1.0

    I tried this but can't say that I liked it too much. As soon as I got it one of my allies declared war on me. After that my other ally declared war on me. The diplomacy was bugged because I would sue for peace with one of the allies (and then remake them into an ally) and the very next turn they would declare war on me, I could do this over and over. I went back to the CAI v.2 and one of the allies came back to my side and didn't declare war on me. They just seemed way too aggressive to me. Rome (one of the allies) had five or so other enemies and they decided to attack me. They seemed to be more competent with there armies and knew where to attack.

  15. #15

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Majasprat View Post
    I tried this but can't say that I liked it too much. As soon as I got it one of my allies declared war on me. After that my other ally declared war on me. The diplomacy was bugged because I would sue for peace with one of the allies (and then remake them into an ally) and the very next turn they would declare war on me, I could do this over and over. I went back to the CAI v.2 and one of the allies came back to my side and didn't declare war on me. They just seemed way too aggressive to me. Rome (one of the allies) had five or so other enemies and they decided to attack me. They seemed to be more competent with there armies and knew where to attack.
    You played a very hard? :)

    AI avoids fighting on several fronts. If AI do not bordered by an enemy that does not work.


    On VH difficulty level AI considers the player its biggest threat. AI tries to destroy the player's faction and forms alliances against the player.

    On the H level the AI behaviour is similar but to a more limited extent.

    On the N level, AI considers a strong neighbouring faction its biggest threat. AI makes alliances against it and tries to weaken it. When there is no significantly stronger neighbouring faction, AI tries to destroy its weakest neighbour.

    On the N level AI frequently sends its armies to support the allied human player (sometimes it can even send a relief army to attack the besieging army and end the siege). On the H level this may also happen but less frequently.

    On the VH level the AI is just rude.

    The VH level is designed to be "Very Hard" and not to play alliances.
    Last edited by Piter; 09-08-2014 at 23:46.

  16. #16
    EBII Hod Carrier Member QuintusSertorius's Avatar
    Join Date
    Apr 2008
    Location
    UK
    Posts
    23,140

    Default Re: New CAI/PiterAI1.0

    What's the difference between 1.0 and 1.1?
    It began on seven hills - an EB 1.1 Romani AAR with historical house-rules (now ceased)
    Heirs to Lysimachos - an EB 1.1 Epeiros-as-Pergamon AAR with semi-historical houserules (now ceased)
    Philetairos' Gift - a second EB 1.1 Epeiros-as-Pergamon AAR


  17. #17

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by QuintusSertorius View Post
    What's the difference between 1.0 and 1.1?
    The difference is small. AI is a little better fight.

  18. #18

    Default Re: New CAI/PiterAI1.0

    Thank you for the explanation. I'll give it a try on M/M then as soon as I have the time!

  19. #19
    Member Member Jikot's Avatar
    Join Date
    Jan 2010
    Location
    Flanders
    Posts
    49

    Default Re: New CAI/PiterAI1.0

    I'd like to try this, but is there a way to go back to "vanilla" easily?

  20. #20
    Member Member Jikot's Avatar
    Join Date
    Jan 2010
    Location
    Flanders
    Posts
    49

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by QuintusSertorius View Post
    You don't need a new campaign, but you need to generate a new game in order for the changes to take effect.
    Meaning what exactly?

  21. #21

    Default Re: New CAI/PiterAI1.0

    Sam alliance reduces the chance of an attack. The Alliance also improves our relationship. With each higher level relationships reduce the chances of invasion. When relations 9/10 and 10/10 AI almost never reveals. You also need to skillfully manage garrisons on the border so that the AI ​​does not feel that he can start a war, easily winning several provinces.

  22. #22

    Default Re: New CAI/PiterAI1.0

    150 turns with sweboz now and I really like it so far. difficulty is on hard. I am allied with Lugones and they even went through my sparsely defended territory to help me against Gauls and Brits. They are allies as well and have only attacked after I raided Britain for some money. Brits landed troops reasonably on mainland europe shores.. Boii became vassal to Rome and Aedui to Averni or what they are called now.
    Very interesting campaign but I cant compare it to the other CAI because when I tried them (on different PC, different Windows, etc.) game crashed every 5 turns. I took some pics but have to convert them first. If you want I can post them here.

    ->Piter: Danke!/ Dziękuję!

    Really have to wach out for assassins and getting full stack armys bribed away.
    Last edited by Nightshift; 09-09-2014 at 19:20.

  23. #23

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Nightshift View Post
    I took some pics but have to convert them first. If you want I can post them here.
    Yes :)

    Quote Originally Posted by Nightshift View Post
    ->Piter: Danke!/ Dziękuję!
    Proszę :)

  24. #24

    Default Re: New CAI/PiterAI1.0

    Ok first pic you can see how my Lugoni allies go through my provinces, while honouring our alliance to conquer scandinavia. You can see how they wait for reinforcements because Hleifpoz was defended by a full stack.
    Click image for larger version. 

Name:	hleifpoz.jpg 
Views:	279 
Size:	1.15 MB 
ID:	14339

    What I did was to rush there and initiate the attack before they would. I kept the savegame and will try as to when and how they will attck on their own but they usually only wait if the need more troops to attack.

    And may Wodan/odin forgive me when the battle started I just broke up the gate on my front and took a nap when I woke up settlement was in my hands with no casualties.

    Click image for larger version. 

Name:	battle.jpg 
Views:	354 
Size:	1.02 MB 
ID:	14340

    Next one shows roman army after start of first punic war. I have no comparison to other CAIs but if you have maybe you can compare army stack sizes and decide..

    Click image for larger version. 

Name:	punic war.jpg 
Views:	265 
Size:	1.10 MB 
ID:	14341

    And lastly my returning raiding party gets their way home cut off by an angry Pritanoi faction leader - I'm sure it's just coincidence but it felt so good for roleplaying!! (couldn't land them directly at home because of pirate threat wich allready killed my first fleet after landing them on british coast - and hunted my second one, the one that brought my party back all the way to Ireland/ Hibernia).

    Just before the battle started they assasinated my general. I took their faction leader as prisoner in return, his ransom would have doubled the income of my raiding adventure (+17000 mnai), unfortunatly they were broke :(

    Click image for larger version. 

Name:	british revenge.jpg 
Views:	245 
Size:	1.19 MB 
ID:	14342

    maybe it was just the remains of this party:
    Click image for larger version. 

Name:	brits landing.jpg 
Views:	233 
Size:	1.03 MB 
ID:	14343
    Don't know if these pics are making judgement about CAI possibly but I had a blast so far.

    PS. posted the minmap pics in the faction progression thread
    Last edited by Nightshift; 09-10-2014 at 12:17.

    Member thankful for this post:

    Piter 


  25. #25
    Member Member Rovert's Avatar
    Join Date
    Apr 2008
    Location
    Calgary , Alberta [Canada]
    Posts
    78

    Default Re: New CAI/PiterAI1.0



    well not sure how this is gonna turn out , so far expansion seems weird and the allies are hilarious

    still trying to figure how to do this pic crap

    https://i60.tinypic.com/w7fxxw.jpg

    https://i60.tinypic.com/59ympe.jpg

    https://i62.tinypic.com/m7uxqa.jpg
    Last edited by Rovert; 09-10-2014 at 15:50.

    Member thankful for this post:

    Piter 


  26. #26

    Default Re: New CAI/PiterAI1.0

    I only accepted one alliance when I thought I really need that help and have one flank secure. Never allied with factions on the opposite site of the map. Maybe thats one consession you have to make. And I didn't ally with my factions I expected to raid/ attack in foreseeable future.

    Anyway pleas tell us what happens once you start war and allies have to decide for one side or another! Would be interesting to see how they choose..

  27. #27

    Default Re: New CAI/PiterAI1.0

    https://forums.totalwar.org/vb/attac...0&d=1410346879

    hahahha, you bastard :P

    3 armies attacked? I am proud of him :D


    "well not sure how this is gonna turn out , so far expansion seems weird and the allies are hilarious

    still trying to figure how to do this pic crap"

    Balance at the beginning of the economic potentials strongly interferes with diplomacy. In addition, only fractions bordering the rebels may disrupt the operation of alliances. On the mod for which I did the rebellion was not in 30 turns.


    Do not worry. How it will be exotic alliances, it would attack you :* I set a desire to conclude an alliance against the rebels "-99999", can the righteous :) Or completely breaks down :D

    Please assessed after 200 rounds, not 20 :)
    Last edited by Piter; 09-10-2014 at 18:52.

  28. #28

    Default Re: New CAI/PiterAI1.0

    I fixed diplomacy. None of you will not be he liked. ;)


    Only the enemy of my enemy offered me an alliance. (I play Rome 25 turns)
    Last edited by Piter; 09-10-2014 at 19:54.

    Member thankful for this post:



  29. #29
    Member Member Rovert's Avatar
    Join Date
    Apr 2008
    Location
    Calgary , Alberta [Canada]
    Posts
    78

    Default Re: New CAI/PiterAI1.0

    getting the new version now , ill put up some updates after

  30. #30

    Default Re: New CAI/PiterAI1.0

    Quote Originally Posted by Rovert View Post
    getting the new version now , ill put up some updates after

    Works on saves. So this is not a problem.

Page 1 of 2 12 LastLast

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