Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 46

Thread: PiterAI Kingdoms (new Artificial intelligence)

  1. #21

    Default Re: PiterAI Kingdoms (new CAI)

    Quote Originally Posted by Razor View Post
    I'm sorry, but I'm reading your posts and my brain at times really hurts trying to understand what you're actually saying.

    So:

    What is exactly the difference between is_neighbour = "false" and is_neighbour ="true" according to your findings?
    What is SI?

    It's so frustrating, because potentially you are onto something, but you not knowing English that well renders that knowledge almost moot. That includes actually using your AI, because the descriptions of AI decision entries in your file are all in Polish.
    In my opinion, the attack on the settlement with the wall is is_neighbour = "false" but only during the war. I only study English for 2 years. Google translator works here

  2. #22
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,075

    Default Re: PiterAI Kingdoms (new CAI)

    Quote Originally Posted by Piterx93 View Post
    In my opinion, the attack on the settlement with the wall is is_neighbour = "false" but only during the war. I only study English for 2 years. Google translator works here


    Maybe it's a translation issue, but this makes no sense to me. Especially considering the fact that the description of is_neighbour is wether or not a faction is bordering the target faction (false/true)...

  3. #23

    Default Re: PiterAI Kingdoms (new CAI)

    Quote Originally Posted by Razor View Post


    Maybe it's a translation issue, but this makes no sense to me. Especially considering the fact that the description of is_neighbour is wether or not a faction is bordering the target faction (false/true)...
    I don't know if that makes sense but it's true.

  4. #24
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    I'd like to see your opinion (at least in short) about invade/defend parameters - raids, buildup, fortified, ect. What AI's algorithm in every parameter.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  5. #25

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Could you be more specific on how to make this mod work? I do not have a file named "medieval2.americas", usually start new campaign via shortcut to kingdoms.exe and additional command like this "--features.mod=mods\americas".

  6. #26

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by JoeyTM View Post
    Could you be more specific on how to make this mod work? I do not have a file named "medieval2.americas", usually start new campaign via shortcut to kingdoms.exe and additional command like this "--features.mod=mods\americas".
    You do not have to do it.




    D:\Program Files (x86)\SEGA\Medieval II Total War\mods\americas\medieval2.americas (For other campaigns the same way)

    Another start will not run the mod !
    Screen:

    https://drive.google.com/open?id=10v...L9h9MvH0P08zzn


    C: \ Program Files (x86) \ Steam \ steamapps \ common \ Medieval II Total War

    Additional for the steam version:

    Copy "medieval2" and change the name to "kingdoms".

    Quote Originally Posted by bitterhowl View Post
    I'd like to see your opinion (at least in short) about invade/defend parameters - raids, buildup, fortified, ect. What AI's algorithm in every parameter.


    Each is better with "is neighbor = false".

    I don't know English enough. In addition, no one will appreciate it so why bother. It was used for the first time in Bellum.
    Last edited by Piterx93; May 19, 2020 at 03:57 PM.

  7. #27
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    You can PM me in your native language. Translation then my task. I'm very interested in those knowledge. Credits anyway will be yours.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  8. #28

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Thanks, found these .bat files in expansion folders and all works as intended. Unfortunately, i guess no amount of CAI and BAI improvement could help Kingdoms as it has too old textures and overall imbalance (units rout too quickly so battles are basically over in 5 minutes).

    If you need anonymous internet opinion, I would not waste your time on supporting unpopular mods like this and maybe switch to mods that still have life in them. Like Divide and Conquer. I don't know their real player base but it's the most elaborate mod from what I've seen on twcenter (and SS 6.4 with BGR, but it has not been developing since a very long time ago).

  9. #29

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by JoeyTM View Post
    Thanks, found these .bat files in expansion folders and all works as intended. Unfortunately, i guess no amount of CAI and BAI improvement could help Kingdoms as it has too old textures and overall imbalance (units rout too quickly so battles are basically over in 5 minutes).

    If you need anonymous internet opinion, I would not waste your time on supporting unpopular mods like this and maybe switch to mods that still have life in them. Like Divide and Conquer. I don't know their real player base but it's the most elaborate mod from what I've seen on twcenter (and SS 6.4 with BGR, but it has not been developing since a very long time ago).
    Divide and Conquer:

    https://drive.google.com/file/d/1sTx...k5uJc93I2/view

  10. #30
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Fellow moders I advise you to combine this AI with pathfinding file from Skynet and descr_character tweaks from Beermugcarl 3.0 thread.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  11. #31

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by bitterhowl View Post
    You can PM me in your native language. Translation then my task. I'm very interested in those knowledge. Credits anyway will be yours.

    I don't remember everything anymore because I did it a long time ago. That is not the most important.

    The main thing is to know that not everything works as it is described and some things do not work at all.

    It is important to remember that AI treats rebels as a real threat that can gather an army and attack at any time. That's why with rebels, AI goes crazy. AI behaves differently to rebels than to normal factions, regardless of AI entries. AI goes crazy with the rebels.

    defend_minimal - I didn't notice that it worked.
    defend_normal - Very good defense tactics but he can't build forts and use natural fortifications.
    defend_raid - I don't remember how it worked.
    defend_frontline - Best tactics for invade_buildup
    defend_fortified - It defends bridges and other similar things very well. AI builds forts. Sometimes it defends forts more than cities. You will also be more likely to position yourself on hills etc. during the battle. Each of these commands used in AI affects the battlefield.
    defend_deep - Retreats armies to cities. It attacks more slowly.

    The best solution:



    <decision_entry>
    <min_entry num_enemies="1" stance="AtWar" frontline_balance="0.7"/>
    <faction_attitude defense="defend_fortified" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry num_enemies="1" stance="AtWar"/>
    <max_entry frontline_balance="0.7"/>
    <faction_attitude defense="defend_deep" at_war="true" continue="true"/>
    </decision_entry>

    invade_buildup - AI trains the best quality army, builds commercial buildings, trains a lot of traders. Attacks the slowest.
    invade_immediate - AI trains the cheapest army in the largest possible number, it does not train agents. Attacks the fastest.
    invade_raids - AI trains better quality army than invade_immediate. AI trains a lower quality army than invade_buildup. I don't remember training agents. Attacks faster than invade_buildup but slower than invade_immediate.
    invade_opportunistic - IMPORTANT: AI disregards all of your diplomacy records. You can add that it only works during the war. It doesn't matter, because of this record, AI betrays alliances, stupidly blocks ports. But it also has a lot of advantages, so it's better to use it. For example: without this entry, AI doesn't stop city sieges.
    invade_start - Similar to: invade_buildup
    invade_none - I don't know how it works.
    is_neighbour="true" - AI only considers targets that can be attacked during 1 turn. To start the assault on the city needs 2 turns. The biggest in attacking is the siege of cities, not racing over and over and becoming a madman by AI. If AI is about to attack, let it besiege the city. Therefore: <min_entry stance = "AtWar" is_neighbour = "false" target_human = "true" /> If you use is_neighbour="true" AI will only besiege thanks to invade_opportunistic, which ignores all your records and does whatever it wants. AI will be very passive.

    The best solution:


    <!--
    ////////////////////////////////////
    // Wojna //
    ////////////////////////////////////
    -->


    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="false" target_human="true"/>
    <max_entry stance="AtWar"/>
    <faction_attitude invade="invade_raids" invade_priority="10000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="true" target_human="true"/>
    <max_entry stance="AtWar"/>
    <faction_attitude invade="invade_raids" invade_priority="8000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar" target_human="true"/>
    <max_entry stance="AtWar"/>
    <faction_attitude invade="invade_opportunistic" at_war="true" continue="true"/>
    </decision_entry>

    <!--
    ////////////////////////////////////
    // Wojna //
    ////////////////////////////////////
    -->

    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="false" target_faction="slave"/>
    <max_entry stance="AtWar" target_faction="slave" num_enemies="1"/>
    <faction_attitude invade="invade_raids" invade_priority="10000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="true" target_faction="slave"/>
    <max_entry stance="AtWar" target_faction="slave" num_enemies="1"/>
    <faction_attitude invade="invade_raids" invade_priority="10000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar" target_faction="slave"/>
    <max_entry stance="AtWar" target_faction="slave" num_enemies="1"/>
    <faction_attitude invade="invade_opportunistic" at_war="true" continue="true"/>
    </decision_entry>

    <!--
    ////////////////////////////////////
    // Wojna //
    ////////////////////////////////////
    -->


    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="false"/>
    <max_entry stance="AtWar" target_human="false"/>
    <faction_attitude invade="invade_buildup" invade_priority="8000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar" is_neighbour="true"/>
    <max_entry stance="AtWar" target_human="false"/>
    <faction_attitude invade="invade_buildup" invade_priority="6000" at_war="true" continue="true"/>
    </decision_entry>

    <decision_entry>
    <min_entry stance="AtWar"/>
    <max_entry stance="AtWar" target_human="false"/>
    <faction_attitude invade="invade_opportunistic" at_war="true" continue="true"/>
    </decision_entry>

    It is very important to separate these commands with these arrows, because when you remove them AI stops working:

    <!--
    2
    -->


    <decision_entry>
    <min_entry stance="AtWar"/>
    <max_entry target_num_enemies="2" military_balance="0.6"/>
    <faction_attitude alliance_against="40" continue="true"/>
    </decision_entry>

    <!--
    2
    -->


    <decision_entry>
    <min_entry stance="AtWar"/>
    <max_entry military_balance_plus_enemies="1.1"/>
    <faction_attitude alliance_against="30" continue="true"/>
    </decision_entry>
    For alliance_against to work well, you need to add the following entry:


    <!--
    Przeciwko rebeliom
    -->

    <decision_entry>
    <min_entry target_faction="slave"/>
    <max_entry target_faction="slave"/>
    <faction_attitude alliance_against="-99999" continue="true"/>
    </decision_entry>

    How do you make AI not attack under certain circumstances?

    <decision_entry>
    <!--
    x2
    -->
    <min_entry stance="Allied" target_faction="papal_states"/>
    <max_entry stance="Neutral" target_faction="papal_states"/>
    <faction_attitude invade="invade_none" can_force_invade="false" continue="false"/>
    </decision_entry>


    Each AI works best when there are no rebels on the map. You can't fix it.


    descr_campaign_db:

    <ai>
    <!-- PRIEST CONTROLLER -->
    <priest_religion_min float="0.8"/> <!-- if religion < religion_min then region needs a priest -->
    <priest_religion_max float="0.95"/> <!-- if religion >= religion_max then a priest can be taken from this region for other missions -->
    <priest_heresey_min float="0.01"/> <!-- if heresey >= heresey_min then region needs a priest -->
    <priest_heresey_max float="0.05"/> <!-- if heresey >= heresey_max then region needs a priest with highest priority -->
    <priest_religion_export float="0.10"/> <!-- if my religion in foreign region < religion_export then then we will export our religion in this region -->
    <priest_max_prod_turns float="20.0"/> <!-- max distance from a production center to a target region in turns -->
    <att_str_modifier float="0.8"/> <!-- modifies the effective attackers strength when determining the priority of making attack decision (i.e. att_def_strength_ratio = ((att_str*att_str_modifier)/def_str) -->
    <siege_att_str_modifier float="0.8"/> <!-- modifies the effective sieging attackers strength when determining the priority of making attack decision -->
    <crusade_att_str_modifier float="1.0"/> <!-- modifies the effective crusading sieging attackers strength when determining the priority of making attack decision -->
    <sally_att_str_modifier float="1.3"/> <!-- modifies the effective sallying attackers strength when determining the priority of making attack decision -->
    <ambush_att_str_modifier float="1.0"/> <!-- modifies the effective ambushing attackers strength when determining the priority of making attack decision -->
    <str_limit_weak float="0.5"/> <!-- min ideal strength ratio modifier for determining when an army is far too weak for an attack ( att_def_strength_ratio < (ideal_str_ratio*str_limit_weak) ) -->
    <str_limit_strong float="0.01"/> <!-- max ideal strength ratio modifier for determining when an army is far too strong for a fair attack ( att_def_strength_ratio > (ideal_str_ratio*str_limit_strong) ) -->
    <merchant_min_survival_acquire int="55"/> <!-- the minimum survival chance for a merchant to consider attempting an acquisition -->
    </ai>
    This is the most important:


    <sally_att_str_modifier float="1.3"/>

    In many modes it is set to low so that AI is not passive. But for me you can set higher because I use is_neighbour="false".

    This makes AI more effective than any other AI. You can set it for example to 1.7. Thanks to this, AI will attack very sensibly with a large advantage. But there is a problem. AI also counts rebel forces. So if the AI ​​is bordering on the rebels, he'll go crazy and won't be able to attack.


    Other factors should not be too big for AI not to be passive. This does not help stop AI from stupidly sending small forces, and makes AI slow.



    <battle-analyser>
    <!-- ratio of friendly to enemy strength to be considered more powerful -->
    <friendly-to-enemy-strength-ratio>0.1</friendly-to-enemy-strength-ratio>
    <!-- ratio of friendly to enemy melee strength to be considered overwhelmingly powerful -->
    <enemy-melee-strength-multiplier>0.5</enemy-melee-strength-multiplier>
    <!-- ratio of enemy to friendly ranged strength to be considered overwhelmingly powerful -->
    <friendly-ranged-strength-multiplier>0.5</friendly-ranged-strength-multiplier>
    <!-- ratio of friendly strength to enemy ranged strength to force attack -->
    <friendly-ranged-strength-divisor>0.5</friendly-ranged-strength-divisor>
    <!-- distance behind the defensive line the enemy must reach to be considered to have broken through -->
    <enemy-position-buffer-distance>540</enemy-position-buffer-distance>
    </battle-analyser>

    It also won't help you stop AI sending small groups of soldiers and it should be low because it blocks and stupid AI. In addition, when the AI ​​is low on the battlefield, it responds better to situations. Rarely are situations when the enemy's cavalry stands still and cannot charge.
    Last edited by Piterx93; May 24, 2020 at 12:51 PM.

  12. #32
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Many thanks!

    I started to read old links that I added to favourites for future reading. Find that frontline_balance is bugged when army is aboard and in the sea. And similar to yours words about slave faction. Find it here
    http://rtw.heavengames.com/cgi-bin/f...718&st=5#post6

    I'd like you to try my TrueGeneral mini-mod. Not by reading code but by playing custom field battle. I have greater number of friendly-to-enemy ratio for the sake of keeping field formation, which I can make differ for attack/defend and maybe even faction specific.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  13. #33

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by bitterhowl View Post
    Many thanks!

    I started to read old links that I added to favourites for future reading. Find that frontline_balance is bugged when army is aboard and in the sea. And similar to yours words about slave faction. Find it here
    http://rtw.heavengames.com/cgi-bin/f...718&st=5#post6

    I'd like you to try my TrueGeneral mini-mod. Not by reading code but by playing custom field battle. I have greater number of friendly-to-enemy ratio for the sake of keeping field formation, which I can make differ for attack/defend and maybe even faction specific.

    I came up with something like this:


    <decision_entry>
    <!--
    x2
    -->
    <min_entry stance="Allied"/>
    <max_entry stance="Neutral" is_neighbour="false"/>
    <faction_attitude can_force_invade="false" continue="false"/>
    </decision_entry>


    Or removing "invade_opportunistic" from the code.

  14. #34

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by Piterx93 View Post
    I briefly tested it with an Angmar by skipping around 60 turns and well... it works. The AI is much more aggressive. In vanilla you can comfortably sit on your 3 starting regions and basically have no pressure for 60-70 turns. And now my two border regions got attacked by turn 20 with a good auto-resolve chance for AI. And I finally saw AI besieging me for more than 1 turn! Good job overall!

    There are two things I would also like to point out - declaring wars through naval blockades and constantly switching between war and piece. First one - I saw a nation with no land borders with the other which still blockaded a port and started new war (Beermugcarl's AI tackled this particular issue very well).

    And another one - east elves attacked snow orcs one turn. Snow orcs had their diplomat near east elves capital, so they negotiated peace the next turn. After that, east elves attacked again and again peace was negotiated next turn. That pattern happened quite often. I think there should be a locked war period of about 10-15 turns (or other mechanics, I don't know) so AI could not easily get out of war.

  15. #35

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by JoeyTM View Post
    I briefly tested it with an Angmar by skipping around 60 turns and well... it works. The AI is much more aggressive. In vanilla you can comfortably sit on your 3 starting regions and basically have no pressure for 60-70 turns. And now my two border regions got attacked by turn 20 with a good auto-resolve chance for AI. And I finally saw AI besieging me for more than 1 turn! Good job overall!

    There are two things I would also like to point out - declaring wars through naval blockades and constantly switching between war and piece. First one - I saw a nation with no land borders with the other which still blockaded a port and started new war (Beermugcarl's AI tackled this particular issue very well).

    And another one - east elves attacked snow orcs one turn. Snow orcs had their diplomat near east elves capital, so they negotiated peace the next turn. After that, east elves attacked again and again peace was negotiated next turn. That pattern happened quite often. I think there should be a locked war period of about 10-15 turns (or other mechanics, I don't know) so AI could not easily get out of war.
    Thanks for the attention. Try to download again. I think I fixed it.

    Where is the forum where I can share this AI?

  16. #36
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Hey, so many mods use your AI. You deserve own sub-forum to keep all links and versions in one place.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  17. #37

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by Piterx93 View Post
    Thanks for the attention. Try to download again. I think I fixed it.

    Where is the forum where I can share this AI?
    In case you still need it, their discord, in dac_user_submods category. Just visited there and saw your mod posted already.

  18. #38

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    hallo could you make an campaign ai to for the mongols,make them more aggressive against others?
    getting older

  19. #39
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Find a possibility to tweak AI for custom faction anticipate with pts_desire. You don't use them, why?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  20. #40

    Default Re: PiterAI Kingdoms (new Artificial intelligence)

    Quote Originally Posted by bitterhowl View Post
    Find a possibility to tweak AI for custom faction anticipate with pts_desire. You don't use them, why?
    How is this supposed to help?

    You would have to set the faction to attack more enemies at the same time. You will have to change the descr_strat file for each modification. It's too tiring.

Page 2 of 3 FirstFirst 123 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
  •