Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 86

Thread: Campaign AI Project

  1. #61
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: Campaign AI Project

    How I approached that problem was by checking the number of enemies the faction had at the time. If the faction had 1 enemy or more then rebels would be focused on less or not at all.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

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

    Default Re: Campaign AI Project

    Well, for myself I decided to make different AI for different religions (in my Westeros mod they have different gameplay) + 1 AI if faction is crusading/on jihad.

    For historical projects with much greater map than my I see a decision to make AI profile for first 50-100 turns for expanding and less care with diplomacy, and then second AI profile for mid/late campaining with diplomacy and win_conditions orientation. Maybe even 2 variants - "chivalrous", which will keep trusted allies and no betrayals; another variant - "machiavellous", who will act only according it's own purposes. I even thought to set it according FL's Chivalry/Dread attributes.

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

  3. #63

    Default Re: Campaign AI Project

    This is very interesting, because manual with CA has a loose connection with reality.

    You have to remember not to test on the slave. AI behaves completely different to other factions.

    "invade_priority = 1199 Cumulative number, compare with invade_priority of other factions and invade faction with highest number"

    In my opinion, this is the percentage of forces that AI is supposed to use in an attack. It may not exceed the maximum ceiling.

    Perhaps he lists it differently before and after the declaration of war.

    Maybe I'm wrong, I thought so recently and haven't tested it.
    Last edited by Piterx93; July 19, 2020 at 02:05 PM.

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

    Default Re: Campaign AI Project

    I think this thread should be replaced into AI Workshop section for gathering modding knowledge.

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

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

    Default Re: Campaign AI Project

    Thanks for removing it here!

    This thread deserves same fate I think -

    https://www.twcenter.net/forums/show...e-Optimisation

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

  6. #66

    Default Re: Campaign AI Project

    @bitterhowl
    Did you ever follow up with pts_desire from this thread?

    Invasion_priority vs pts_desire in descr_campaign_ai_db (twcenter.net)

    I've only done minimal work with pts_desire, I initially wanted to try using it to target specific factions with most_desireable, however in my experiments I couldn't reliably predict what faction was most_desireable no matter how much I put into pts_desire. I never thought about pts_desire doing anything in it's self, and it doesn't show up in the LTGD log, so it's hard to quantify with my particular AI format.

    I was wondering if you had any additional insight into this.

  7. #67
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: Campaign AI Project

    First of all thanks for bringing this up again as a topic, I definitely need to test out @bitterhowls idea. I took a more contrarian approach to that one, I didnt get the impression (untested) that most_desirable relates to pts_desire despite the name. I always thought that was based on whether the target faction was human and according to other variables like number of viable invasion targets according to the ltgd.


    Maybe I'm mistaken and they are connected but I'm pretty sure it's some odd ltgd related calculation that nobody but the original AI dev could explain. Perhaps it was meant for hordes? Since it didnt ever matter whether they're a neighbouring faction or not.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  8. #68

    Default Re: Campaign AI Project

    Quote Originally Posted by z3n View Post
    I took a more contrarian approach to that one, I didnt get the impression (untested) that most_desirable relates to pts_desire despite the name.
    Like I said, I have only done limited testing with this, but that certainly lines up with what findings I did get. I never did get any indication of how most_desirable was determined, though I did figure out some things that DIDN'T determine it. This is what I remember it's not, though I've lost my notes on it, so this is not a complete list:
    pts_desire
    resources in regions
    invade priority, or really any value you can set in ai_db
    faction to outlive
    faction standings
    strongest/weakest
    ally/at war

    The only consistent thing I could honestly find was it's almost always is_neighbour, but seeing how there are usually multiple neighbour factions, that doesn't really help narrow it down, and again only ALMOST always.
    I came to the conclusion that it's a variety of factors that was too much work to try and unravel, since you couldn't control/influence it and using it doesn't seem to be a good idea because sometimes it's a faction they would not be wise to attack. Although, with the testing I'm doing now with a minimal AI came out with an interesting result, it is possible for a faction to attack their most_desirable even with invade_none and invade priority -1.

    edit: I didn't disable forced invasion, so that explains them attacking with invade_none.
    Last edited by CavalryCmdr; June 06, 2021 at 04:48 AM.

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

    Default Re: Campaign AI Project

    Well, thanks for attention! I'm using pts_desire and see that those factions whom I increased them in descr_campaign_ai_db became most_desirable in LTGD.

    Since I'm testing in hotseat mode I can't see AI actions each turn. I hope I'll release my code on local forum and will get more detailed feedback from players.

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

  10. #70

    Default Re: Campaign AI Project

    Quote Originally Posted by bitterhowl View Post
    Well, thanks for attention! I'm using pts_desire and see that those factions whom I increased them in descr_campaign_ai_db became most_desirable in LTGD.
    What values are you using?

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

    Default Re: Campaign AI Project

    From 50 to 400, depending of importance of decision block. I also use negative values for lowering.

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

  12. #72

    Default Re: Campaign AI Project

    Quote Originally Posted by bitterhowl View Post
    From 50 to 400, depending of importance of decision block. I also use negative values for lowering.
    I was trying along the lines of invade priority so like 1500 or so. Maybe the numbers I used were too high and was just ignored or something. I'll have to look at it again.
    Do you know if it's cumulative like alliance_against? I imagine it must be guess work since it's not given in LTGD.

    Thanks for the info, I will definitely take another look at it.

    Edit:
    I think I was working with pts_desire back before Kingdoms, maybe it wasn't even really implemented yet. There are a lot of differences from the version I did most of my learning on to the finished one. I sometimes forget that.
    Last edited by CavalryCmdr; June 12, 2021 at 04:01 AM.

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

    Default Re: Campaign AI Project

    Got some promising feedback about my CAI drafts, using pts_desire, pts_invasion, pts_defend as a new method. I suppose I'll release it soon, I think it would be better to do it in this section, how do you think?

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

  14. #74
    Dismounted Feudal Knight's Avatar my horse for a unicode
    Content Director Citizen

    Join Date
    Aug 2017
    Location
    there!
    Posts
    3,144
    Blog Entries
    1

    Default Re: Campaign AI Project

    That would make sense, other such works like Skynet AI can be found here as well.
    With great power, comes great chonky dragons to feed enemies of the state. --Targaryens?
    Spoiler for wait what dragons?



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

    Default Re: Campaign AI Project

    I suppose it's good to place here PiterAI and beermugcarl AI as well.

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

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

    Default Re: Campaign AI Project

    I released my P.A.I.N. CAI on local forum imtw.org

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

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

    Default Re: Campaign AI Project

    So here's a link to dedicated English speaking thread about my brand new CAI TrueGeneral CamP.A.I.N.


    P.A.I.N. starts from right there

    If community insists I can open a separate thread here on TWC ofc.

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

  18. #78

    Default Re: Campaign AI Project

    your link is not working.
    getting older

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

    Default Re: Campaign AI Project

    Hmmm, it's a bit strange, because for me it's working both from PC and mobile.

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

  20. #80

    Default Re: Campaign AI Project

    Hi Bitterhowl,

    I have a question to your AI, on the site where the link did lead me you say that there are 4 AI types pope, slave, default and mongols. As I just Implemented the AI into Roar of conquest I thought it would be good to set the factions to these AI´s instead of Catholic or Islamic. Was this assumption correct? Or would it also work with the other AI´s? Will give some feedback later on when I have played some campaigns, for the moment sicily has declared war on the papal states on turn 5 which I don´t feel very comfortable about but I will see how it goes. I just hope the pope can avoid conflicts just stay in rome, not conquer new territories and call a crusade here and there.

Page 4 of 5 FirstFirst 12345 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
  •