Announcement

Collapse
No announcement yet.

AI : Army Movement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Martin,
    I di dthe debugai and watched the barbs and AI behave for a few turns (this was with rev683) The AI was making good use of slavers etc. THe barbs were almost always with the goal attack. It had the coordinates and I couldn't figure where they corresponded to the map but it seems like the barbs would just hunt down units. Occassionally i saw a pillage order and the barbs did that but never did they attack a city.

    Is there a calculation to attack a city? Does the barbs assume a city has a 12 stack since they cant see units?

    I'm thinking maybe there should be an attack city goal or that the game should tel the AI how many units are in a city so they will target it better, especially when its empty.

    Maybe thats the main problem when it seees a city empty it assume sthere is no target because there are no units to attack. maybe something if the city is empty it becomes a very high priority to attack/take it.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • Originally posted by E
      Is there a calculation to attack a city? Does the barbs assume a city has a 12 stack since they cant see units?
      Not really.

      Originally posted by E
      I'm thinking maybe there should be an attack city goal or that the game should tel the AI how many units are in a city so they will target it better, especially when its empty.
      The second idea is a cheat, so forget about it. The first idea is indeed in the game. The goal is called GOAL_SIEGE and in the strategies.txt the Barbarian priority of that is exactly zero. That means no Barbarian will ever attack a city on its own.

      Originally posted by E
      Maybe thats the main problem when it seees a city empty it assume sthere is no target because there are no units to attack. maybe something if the city is empty it becomes a very high priority to attack/take it.
      Don't think of cheats like city emptyness, the AI can't now this. In fact the solution should be clear now, just modify the strategies.txt in a way the mods did.

      - Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • strategies.txt or personalities.txt? I noticed the default personalities still ahve no variety too.
        Formerly known as "E" on Apolyton

        See me at Civfanatics.com

        Comment


        • Originally posted by E
          strategies.txt or personalities.txt?
          E, for some reason I am pretty tempted to quote my last sentence.

          Originally posted by E
          I noticed the default personalities still ahve no variety too.
          There is variety, for instance the use different default strategies.

          -Martin
          Civ2 military advisor: "No complaints, Sir!"

          Comment


          • Originally posted by Martin Gühmann
            for some reason I am pretty tempted to quote my last sentence.

            why do we have those goal values in personalities.txt then? are they modifiers or thresholds? are they even used?
            Formerly known as "E" on Apolyton

            See me at Civfanatics.com

            Comment


            • Where do you see the word "goal" used in the personalities.txt? The personalities.txt just determines which strategy to use and that's it.

              -Martin
              Civ2 military advisor: "No complaints, Sir!"

              Comment


              • ok personalities.txt has this:

                [code]
                PERSONALITY_KAHN {
                DefaultStrategy STRATEGY_MILITARIST_DEFAULT

                FullAttackStrategy { Strategy STRATEGY_ATTACK Priority 1250 }
                BuildupStrengthStrategy { Strategy STRATEGY_DEFEND Priority 750 }
                SeigeCitiesStrategy { Strategy STRATEGY_SEIGE Priority 800 }

                LastStartTurn 75
                StartStrategy { Strategy STRATEGY_AGRESSIVE_START Priority 1200 }

                NuclearStrikeStrategy { Strategy STRATEGY_LAUNCH_NUKES Priority 150 }
                MinimumNukesStrategy { Strategy STRATEGY_MINIMAL_NUKES Priority 100 }
                LowNukesStrategy { Strategy STRATEGY_AVERAGE_NUKES Priority 100 }
                AverageNukesStrategy { Strategy STRATEGY_MAXIMUM_NUKES Priority 100 }
                MaximumNukesStrategy { Strategy STRATEGY_MAXIMUM_NUKES Priority 100 }

                ExpansionStrategy { Strategy STRATEGY_SETTLE_LARGE Priority 1100 }
                ExplorationStrategy { Strategy STRATEGY_EXPLORE_WIDE Priority 200 }

                MaxIslandSize 100
                IslandNationStrategy { Strategy STRATEGY_ISLAND_NATION Priority 150 }

                StartLowDefenceStrategy { Strategy STRATEGY_DEFENSE_NONE Priority 800 }
                StartHighDefenceStrategy { Strategy STRATEGY_DEFENSE_VERY_LOW Priority 800 }

                DefenceNoneStrategy { Strategy STRATEGY_DEFENSE_NONE Priority 800 }
                DefenceVeryLowStrategy { Strategy STRATEGY_DEFENSE_NONE Priority 800 }
                DefenceLowStrategy { Strategy STRATEGY_DEFENSE_VERY_LOW Priority 800 }
                DefenceMediumStrategy { Strategy STRATEGY_DEFENSE_LOW Priority 800 }
                DefenceHighStrategy { Strategy STRATEGY_DEFENSE_MEDIUM Priority 800 }
                DefenceVeryHighStrategy { Strategy STRATEGY_DEFENSE_HIGH Priority 800 }

                CitiesOverLimit 100
                OverCityLimitStrategy { Strategy STRATEGY_TOO_MANY_CITIES Priority 2000 }
                NoRevolutionStrategy { Strategy STRATEGY_NO_REVOLUTON Priority 2000 }

                Exploration: Wide
                Expansion: Maximum
                Discovery: Military
                Conquest: Agressive
                Trustworthiness: Chaotic
                Alignment: Evil

                StrongGreeting DIP_GREETING_FIRST_FOREIGN_4
                WeakGreeting DIP_GREETING_FIRST_FOREIGN_3

                ThreatFollowThrough 0.5
                Description PERSONALITY_KAHN_DESCRIPTION

                }

                what are these used for then? STRATEGY_SEIGE is different than GOAL_SEIGE? default personality i assume is the starting one but I thought the priority change in personalities changes the strategy and then changing to strategy_seige is how it works. But I guess I'm wrong. how does it work then?
                Formerly known as "E" on Apolyton

                See me at Civfanatics.com

                Comment


                • Well E, I think your problem is that you don't know the difference between strategy and goal.

                  Unfortunately I don't have the time to explain the difference to you, but you can consult Merriam Webster for strategy and for goal. The explanations there for goal is what I understand under the term goal. In the use in CTP2 fits with it also. The definition of strategy there fits also to what I think is a strategy. Well maybe they could be a little bit clearer and more precise, but essentially that's what it is.

                  -Martin
                  Civ2 military advisor: "No complaints, Sir!"

                  Comment


                  • Thanks Martin I know what a strategy and goal is but how does ctp2 use them? I figure strategy is the overall plan for the AI but how does it switch to them, how does it know to switch.

                    Are the goals for individual units and how do they tie into the strategy.

                    I'd like to help with AI but clearly I need a little more info, the code doesn't make the connections clear.
                    Formerly known as "E" on Apolyton

                    See me at Civfanatics.com

                    Comment


                    • I dont know if this will help.But when last I played a full game using 618 playtest I noticed that the AI in the early part of the game seems more willing to send large stacks towards your cities to capture it.About 500 turns in I start to see changes in AI war tactics.Smaller stacks or only a stream of single and groups of 2,s or 3,s by the time you reach the 1900.I also tweaked production numbers in DiffDB file so the AI could build up forces to keep pace in offense and defense.
                      I think what happens is (this might be key) that as AI factions meet and borders are locked in the AI has so much to deal with it the AI just bogs down and plays deffense.
                      With the updates the AI to AI diplomacy wars seem to last about 20 to 30 turns which helps gives the AI a break to rebuild its army.But because there is no AI to AI alliance in the game the AI can never go all out in attacking you (only in the early part of the game) beacause of theaths from other nations around its border.Must stay in deffensive mode or will leave cities open for attack.

                      Comment


                      • Well, your questions are getting clearer and thus easier to answer.

                        Originally posted by E
                        Thanks Martin I know what a strategy and goal is but how does ctp2 use them? I figure strategy is the overall plan for the AI but how does it switch to them, how does it know to switch.
                        That's why we have the priorities of the strategies. In fact the actual strategy the AI uses is not just a plane database record but a merger of different database records. The takes its base strategy and then merges in the other startegies, the early strategies the island stratgy, the expansion strategy and the attack and defence startegies. If a strategy is merged in another strategy the merged in strategy overwrites the values of the base strategy, and in which order this is done depends on the priority.

                        Originally posted by E
                        Are the goals for individual units and how do they tie into the strategy.
                        No, the goals aren't for individual units, they aren't even for individual armies, therefore we the agent stuff in to assign more than 12 units per goal if necessary.

                        Originally posted by E
                        I'd like to help with AI but clearly I need a little more info, the code doesn't make the connections clear.
                        I am afraid that you have to do some of the work yourself since the code is probably more complex than necessary, and therefire hard to understand.

                        -Martin
                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • Martin,

                          How much are we restricted to changing strategies.txt?

                          I noticed strategies like seige and attack have a higher defense value than attack or seige. If I'm understanding it right then it makes more a more passive game.

                          I did a quick experiment with my Call2Civ mod. I removed all previous AI strategies, personalities txt and started thegame with the ones our base game.

                          The barbs would attack units, but I saw no city attacks and plenty of slavers

                          After turn 60 I edited strategies and increased theseige and attack code for attack, seige, and militarist.

                          reloading the game a one city civ was wiped out by another civ in a single turn (guess they had forces close) and the barbarians promptly hit my city.

                          I'll continue to playtest but I think we need to do some minor value tweaking.
                          Formerly known as "E" on Apolyton

                          See me at Civfanatics.com

                          Comment


                          • I have in the past done some tweaking of files like Goals file and Strategies file found in aidata.
                            Now I used the 1.11 version of CtP2 as a base .The code to CtP2 had not been given at that time.
                            Using the Apoltyon mod as guide here are some changes I made,
                            In strategies file Goal Attack 72000 25 25
                            Goal Seige 62000 20 15
                            Lower in the file in the Defense Strategies I reduced in half of what Apolyton mod value is.This is garrison force in cities,did the same for Force Matches.
                            In the Goal file. Copied the Atttack goal from Apolyton mod the rest I only add in the other goals like seige the
                            TargstOwener:Cold Enemy. This was added in the mod which is not in the 1.11 version.This is key as it zero,s in the AI on a single traget. What this does is make the AI throw up a offensive block as you near its boder.Which can weaken your attack.2nd the AI will have units left over to defend its city.If the city is taken the ColdEnemy elment together with higher Attack priority will cause the AI to use units near by to reclaim their city.
                            I think these values help the AI to combine offense and defense in a way that does not weaken it if in more than one war.Not a tactical sharp AI but this seems to to help to keep its empire from being beaten by counter attacks .Again the ColdEnemy element added is key.

                            Comment


                            • Originally posted by E
                              How much are we restricted to changing strategies.txt?
                              The only thing we are restricted to is our knowledge of the system and code behind.

                              The question is what does the system with the database values do and what it is supposed to do? You can modify those values and adapt it how you like, but if I find a defect in the code and you have modified the system before then the system doesn't work anymore as supposed, because your workaround is just another defect of the system.

                              So if you know what you are doing everything is alright, if you don't know what you are doing then you have to figure out how it works and then you know and therefore then it is alright.

                              So what are you doing there? How does the system work?

                              -Martin
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment

                              Working...
                              X