Announcement

Collapse
No announcement yet.

Strategies' goal effects

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strategies' goal effects


    There is a txt. file Strategy.txt or something.I heard there is a line (AIAttack or something) if you move it further up the file or change the no. . there should be a AIDefense line or something change the Attack line to the same no. position in file.

    I just heard this i don't even have the game so i can't check it out.if someone sends me the strategy.txt file I'd look over it see what i can do (if you're too engrossed in the game to bother, I don't have it for 7 more days.

    Don't flame me if i'm wrong.

    ------------------
    " mind over body "
    Destruction is a lot easier than construction. The guy who operates a wrecking ball has a easier time than the architect who has to rebuild the house from the pieces.--- Immortal Wombat.

  • #2
    4

    Comment


    • #3
      1

      Comment


      • #4
        1

        Comment


        • #5
          5

          Comment


          • #6
            1

            Comment


            • #7
              1

              Comment


              • #8
                a small analysis on the goals.txt and the strategies.txt from an answer of Azmel to a mail of mine


                For every goal type record in Goals.txt, there is a corresponding entry in one or more of the strategy records in strategies.txt. Each GoalElement specifies (for that particular strategy) what the priority is for performing a particular goal relative to other goals. The priority is sometimes also refered to as the raw priority. Before any units are assigned to a goal, all goals of a particular type are sorted based on their raw_priority modified by any positive or negative bonuses for that goal type from it's Goals.txt record. Only the top "MaxEval" number of goals are ever matched to units. The MaxEval number can be absolute (ie. the best three goals) or relative (ie. two per city, or best four goals if we have two cities). If you increase the MaxEval attribute, you increase the pool of goals that the AI will consider, and usually improve intelligence at the expense of processing speed. If MaxEval is set to 0, then no goals of this type will be performed. The MaxExec field limits the number of a particular goal type that will be performed. This lets you consider the 10 best seige goals, but only actually seige the best two cities so that your troops don't get too spread out.

                In general, goals execute from highest to lowest priority. The defense goal type usually has the highest priority so that units will be assigned to defend cities first, and then assigned to seige cities and perform other goals. For example, if the GoalElement for GOAL_ATTACK has a higher priority than for GOAL_SEIGE, then AI units will first try to attack enemy armies, and then with any remaining unassigned units, try to seige enemy cities. However, if two goals have very close raw priorities, then the match priority becomes more important. The match priority is computed based on how good a match a particular army is for a specific goal. In general, the closer an army is to a goal, the better it's match. That way even when seige goals have a higher raw priority, an army right next to an enemy unit will attack it rather than move 20 cells to seige a city.

                Hope this brief explaination helps. Although it's a complicated system, with a little work it should be possible for anyone interested enough to tweak and customize.


                Wes, forget the units and wonders, get into these two files!!

                Comment


                • #9

                  I've tried modifying some of these goal priorities. Even set the GOAL_SEIGE to like a million or so. It didn't help one bit.

                  perhaps, the 2nd aspect of azmel's comment, i.e. the match priority over-riding the raw priority might be skewing the AI into not attacking cities (which is what we want).

                  In that case, seems like we need to have the AI have ready stacks of tons of offensive units.

                  Comment


                  • #10

                    Mark,

                    Can you also ask him how to improve the transportion of units, and the other AI problems we've mentioned?

                    You seem to have his ear

                    Comment


                    • #11
                      Thanks, Mark. I will try and sort this out, but I am sure there are many people here who can do as well or better than I can at deciphering the code.
                      Below I have posted the code pertaining to the most important goals. I believe I understand the part about MaxExec and MaxEval, and the assigning of units and the strategies.txt part, so that leaves the goals.txt part to nail down.

                      What I would really like is if someone would go through each flag, and explain 'exactly' what it pertains to and does, and how the negative sign affects the AI's decision. 90% of the time, these are pretty self-evident, but it's that other 10% that always seems to be the crucial part.

                      GOAL_DEFEND {
                      ExecuteIncrementally
                      NoTransport

                      SquadClass:CanAttack
                      SquadClass:CanDefend

                      TargetType:City
                      TargetOwner:Self

                      Execute ORDER_MOVE

                      ThreatBonus 1000
                      EnemyValueBonus 0
                      AlliedValueBonus 1000
                      PowerBonus -100
                      DistanceToHomeBonus 0
                      DistanceToEnemyBonus 0
                      ChokePointBonus 250
                      UnexploredBonus -999999
                      ObsoleteArmyBonus -500
                      TreaspassingArmyBonus 0

                      ThreatenType:None
                      ThreatenBonus 0

                      ForceMatch efensive
                      }

                      GOAL_SEIGE {
                      RallyFirst

                      SquadClass:CanAttack
                      SquadClass:CanDefend
                      SquadClass:HasZoc
                      SquadClass:CanCaptureCity

                      TargetType:City
                      TargetOwner:HotEnemy

                      Execute ORDER_ATTACK

                      ThreatBonus 500
                      EnemyValueBonus -250
                      AlliedValueBonus 1000
                      PowerBonus 500
                      DistanceToHomeBonus 0
                      DistanceToEnemyBonus 0
                      ChokePointBonus 500
                      UnexploredBonus -999999
                      ObsoleteArmyBonus 100
                      TreaspassingArmyBonus 0

                      ThreatenType estroyCity
                      ThreatenBonus 5000

                      ForceMatch:Offensive

                      TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
                      }

                      GOAL_ATTACK {
                      RallyFirst

                      SquadClass:CanAttack

                      TargetType:AttackUnit
                      TargetType:SpecialUnit
                      TargetOwner:HotEnemy

                      Execute ORDER_ATTACK

                      ThreatBonus 100
                      EnemyValueBonus -250
                      AlliedValueBonus 1500
                      PowerBonus 500
                      DistanceToHomeBonus 0
                      DistanceToEnemyBonus 0
                      ChokePointBonus 50
                      UnexploredBonus -999999
                      ObsoleteArmyBonus 100
                      TreaspassingArmyBonus 0

                      ThreatenType estroyCity
                      ThreatenBonus 5000

                      ForceMatch:Offensive

                      TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
                      }

                      GOAL_SALLY {
                      IsSally
                      NoTransport

                      SquadClass:CanAttack

                      TargetType:AttackUnit
                      TargetOwner:HotEnemy

                      Execute ORDER_ATTACK

                      ThreatBonus 0
                      EnemyValueBonus 0
                      AlliedValueBonus 0
                      PowerBonus 100
                      DistanceToHomeBonus 0
                      DistanceToEnemyBonus 0
                      ChokePointBonus 100
                      UnexploredBonus -999999
                      ObsoleteArmyBonus 0
                      TreaspassingArmyBonus 0

                      ThreatenType:None
                      ThreatenBonus 0

                      ForceMatch:Offensive
                      }

                      GOAL_ESTABLISH_EMBASSY {
                      NeedsEscort

                      SquadClass:Special

                      TargetType:City
                      TargetOwner:Ally
                      TargetOwner:Neutral
                      TargetOwner:NoContact

                      Execute ORDER_ESTABLISH_EMBASSY

                      // just want to establish embassy at closest city.
                      ThreatBonus 0
                      EnemyValueBonus 0
                      AlliedValueBonus 0
                      PowerBonus 0
                      DistanceToHomeBonus -1
                      DistanceToEnemyBonus 1
                      ChokePointBonus 0
                      UnexploredBonus -1500
                      ObsoleteArmyBonus 0
                      TreaspassingArmyBonus 0

                      ThreatenType:None
                      ThreatenBonus 0

                      ForceMatch:Special
                      }

                      Comment


                      • #12
                        So that's what they've done with those incomprehensible priorities from the old AIP files. It looks a lot clearer.

                        The game is not yet out in the UK so I won't be able to get it for another week or two. I'd really appreciate it if someone would e-mail me the most important AI files; this looks very interesting.

                        Thanks,

                        Peter

                        BTW: Colorme, is it possible that you've just got the AI trying to evaluate GOAL_SEIGE's, rather than trying to execute them?

                        Comment


                        • #13
                          WesW and other Mod-Maker,

                          I have no idea if that is a well known fact or not so forgive me if it is but to increase the performance and the combat capacity of the AI the first thing on you're todo list should be to increase the Production, Gold and Science bonuses it gets.

                          As it is the AI gets 0 (that's right ZERO) bonus on those 3 things onless it's already 25% weaker than the human player (which means that it's already dead aniway).

                          The production bonus is particularly important because the AI can do much less than a human with the same ressources and it doesn't have much left to build an offensive army with.

                          Why as Activision shipped the game with those difficulty settings is beyond me, at first i tought the AI was very bad but once the settings are correctly set it's...still bad but much better.

                          Also what I would call the Gold Bug (the player end up with so much that it's hard to spend it all) is partly because of game balance and partly because they didn't set the Wages Right, medium wages is 4 instead of 12 and maximum wages is 6 gold instead of 20, as it is you should always pay you're peoples maximum wages because it cost almost nothing and it gives you extra happiness.

                          I am looking forward to playing the Med mod.

                          Comment


                          • #14

                            Peter,

                            I left MaxEval unchanged at 25 or so, and played around with MaxExec (10,5,3, etc.).
                            Didn't seem to help.

                            Comment


                            • #15
                              In Ctp2, they took the route of handicapping the human, rather than gifting the AI. Here are the lines from the DIffDB that do that. Production is not included in this, but production was actually the thing the AIs did best in Ctp1, where they were handicapped vs. the human in the initial settings.

                              MAX_HUMAN_ADVANCES--------3
                              MAX_AI_ADVANCES ----------6
                              HUMAN_SCIENCE_BONUS--------0.4 # % amount to add to advance cost for the player
                              HUMAN_FOOD_BONUS-------- -0.2 # % amount to add to food collected for the player

                              Btw, I have seen a couple of players comment on the gold slider being wrong. Please tell me what you saw that revealed this, so that I can try and set it to what it should be.

                              Comment

                              Working...
                              X