Announcement

Collapse
No announcement yet.

Ai Ics.......

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

  • Ai Ics.......

    I was fiddling around with strategies.txt and unitbuildlists.txt last night. Anyways, I was trying to find out the intricacies of how they work. So I put UNIT_SETTLER in the DEFENSE build list to see what it would do.

    WELL......................

    I quickly ran through 100 turns (this is of WAW mod). Then went into cheat mode, and flicked to one of the AI's.

    43 cities.

    I blinked and flicked to the next AI.

    38 cities.

    By now I was starting to laugh. I continued flicking and every AI had built more than 35 cities.

    But not ONE AI had built anything but settlers. Obviously, because the strategies.txt was telling them to have at least 1 defender in each city, it was building defenders. They happen to be settlers, and the AI moved them out to build cities. ICS on a big scale.

  • #2

    Brilliant
    How were they doing in terms of happiness etc. ?
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment


    • #3

      Yesh, how was the AI doing otherwise? Competitive with the human? How was the situation another 100 turns later?

      I think this is good news as currently the AI at times still expands too slowly in some cases. This measure would obviously be too extreme but if we could tone it down a little and could be stabilized later on...
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        Ummm........ I can't tell ya how the AI was going in comparison to me. You see, when I'm testing to see how a change I make impacts long-term play, I setup my original city, fortify/disband anything else, set production to infrastructure, science to zero, hit ENTER and walk away for a smoke outside and make a coffee. By the time I get back, it'll be up to about 50-70 auto-turns. But from what I remember, the AI was keeping happiness about 77, but remember in WAW you get a cathedral as default.

        After this 100 turns, after laughing for a few minutes looking around, I decided to jump out. So I don't know the 200 turn state.

        Of course, with a bit of manipulation of strategies.txt, unitbuildlists.txt and a bit of SLIC to change strategies, we should be able to dictate what the AI builds.

        Comment


        • #5
          Any chance we can bring the same kind of intelligence to the AI so it can billed navel units

          Could be a great upgrade
          "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
          The BIG MC making ctp2 a much unsafer place.
          Visit the big mc’s website

          Comment


          • #6
            A little while ago I made a little strategy that simply set the AI to build 0 settlers when it had more cities than the human, up to 60 I think.
            It think it worked quite well, but I never reached 60 in my tests.
            Concrete, Abstract, or Squoingy?
            "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

            Comment


            • #7
              Must...use...this...only...for...good!!!

              Boy, this really sounds promising. A possibility may be to place settlers within some of the less-researched branches of the unit lists, such as the UNIT_BUILD_LIST_MOBILE entry. So the entry would look like this. (This is Cradle's setup - the early settler is called Nomad)

              UNIT_BUILD_LIST_MOBILE {
              Unit UNIT_NOMAD
              Unit UNIT_JAVELIN_CAVALRY
              Unit UNIT_CHARIOT
              Unit UNIT_HORSEMAN
              Unit UNIT_CATAPHRACT
              Unit UNIT_TEUTONIC_KNIGHT
              Unit UNIT_KNIGHT
              Unit UNIT_CAVALRY
              Unit UNIT_FIGHTER
              Unit UNIT_BOMBER
              Unit UNIT_INTERCEPTOR
              Unit UNIT_STEALTH_BOMBER
              Unit UNIT_STEALTH_FIGHTER
              }

              Since Javalin Cavalry (enable tech Horse Riding) comes a little later in the tech tree, this may force the AI to build a couple of additional Nomads before it has the ability to build Jav Cavalry. The percentages to build the mobile units is also lower than the defensive units, so you should, in theory, not have the extreme results you were getting in your test.

              To be really daring, place the Nomad in the middle of a list to build them in the middle of the game. But the one thing I have noticed is that once the map is filled up, the AI will generally respect borders when it comes to settling new cities. I do not know how that can be overcome though.
              Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
              ...aisdhieort...dticcok...

              Comment


              • #8
                Originally posted by The Big Mc
                Any chance we can bring the same kind of intelligence to the AI so it can billed navel units
                Just go to the strategies.txt and look the special units count here is the code from my GM1_strategies.txt:

                Code:
                    // Number of special units that should be built
                    SettlerUnitsCount       4 //WW from 1 //MG from 2
                    SeaTransportUnitsCount  8 //MG from 3
                    AirTransportUnitsCount  2 //WW from 2 //MG from 1
                    SpecialUnitsCount       6 //MG from 4
                You sea I increased the number of sea transporters that the AI should build the only problem is to make the AI use them.

                In the settle strategies I increased the numbers of settlers that the AI should build to 6, the result is that the map will be filled with AI cities until there is no space left:

                Code:
                STRATEGY_SETTLE_COMPACT {
                
                    // Number of special units that should be built
                    SettlerUnitsCount   6 //MG from 2
                Originally posted by hexagonian
                To be really daring, place the Nomad in the middle of a list to build them in the middle of the game. But the one thing I have noticed is that once the map is filled up, the AI will generally respect borders when it comes to settling new cities. I do not know how that can be overcome though.
                Take a look into the CRA_goals.txt, there you find these entries:

                Code:
                GOAL_ATTACK {
                  RallyFirst
                
                  SquadClass:CanAttack
                  SquadClass:CanCaptureCity
                
                  TargetType:AttackUnit
                  TargetType:SpecialUnit
                  TargetOwner:HotEnemy
                  TargetOwner:ColdEnemy
                
                  Execute	ORDER_ATTACK
                 
                  ThreatBonus			  500
                  EnemyValueBonus		 -250 //from 250
                  AlliedValueBonus		 1500
                  PowerBonus			10000 //from 20000
                  DistanceToHomeBonus	    0 //from -10
                  DistanceToEnemyBonus	    0
                  ChokePointBonus		  250 //from 50
                  UnexploredBonus	  -999999 
                  ObsoleteArmyBonus		  100
                  TreaspassingArmyBonus     0
                
                  ThreatenType:DestroyCity
                  ThreatenBonus 5000
                
                  ForceMatch:Offensive
                
                }
                
                GOAL_SETTLE_LAND {
                  NeedsEscort
                
                  SquadClass:Special
                
                  TargetType:SettleLand
                  TargetOwner:Self
                  TargetOwner:NoContact
                
                  Execute	ORDER_SETTLE
                
                  ThreatBonus			 -100
                  EnemyValueBonus		 -100
                  AlliedValueBonus		  100
                  PowerBonus			  100
                  DistanceToHomeBonus	    0
                  DistanceToEnemyBonus     15
                  ChokePointBonus		  100
                  UnexploredBonus		 -100
                  ObsoleteArmyBonus		    0
                  TreaspassingArmyBonus     0
                
                  ThreatenType:None
                  ThreatenBonus 0
                
                  ForceMatch:Special
                }
                The difference between the two goals is that the AI will only attack hot and cold enemies, the settle goal has only own land and noone's land as target type, if you add hot, cold enemey, alley and neutral than the AI shouldn't respect borders.

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

                Comment


                • #9
                  There's always an answer somewhere! Thanks Martin for pointing that out.

                  I think I know how to use that info now...
                  Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                  ...aisdhieort...dticcok...

                  Comment


                  • #10
                    Hex:
                    You might need to rethink the MOBILE list. The AI "appears" to use the MOBILE list for air units. During my tests I believe DEFENSE list covers the garrisondefenseunits. OFFENSE covers the garrisonoffenseunits. RANGED covers the garrisonrangedunits. MOBILE covers the air units. SEA covers the sea units.

                    I'm not positive, but I'm looking into it. I'll let you know how I go.

                    Also, it doesn't matter where in the list you locate something. The AI will build any possible unit, usually the newest. IE: for fun I turned the whole list over to see if that did anything. It doesn't. The AI just built units from the bottom of the list. Hope this helps.

                    Comment

                    Working...
                    X