Announcement

Collapse
No announcement yet.

What factors affect AI behaviour?

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

  • What factors affect AI behaviour?

    I'm having a problem with the AI building too many units and not expanding enough in my games. Does anyone know what factors can be changed to make the AI behave differently? Non-arable land seems to confuse it a lot, for one thing. The "Expansionist" trait helps, of course, but it is rarely enough.

    On a similar note, has anybody discerned the rules of the AI's terrain usage? It seems that it knows that food is more important when the food surplus is low or non-existent, but other than that I've been unable to figure out much.

  • #2
    I think if you give it a lot of 'grassland' (whatever you have decided to call it), it will expand to no end if the settlers are cheap enough.

    Comment


    • #3
      cheap domain 3 settlers

      Comment


      • #4
        The Ai is a dummy. If you want an opponent to truly challenge you. Play MP.

        Comment


        • #5
          The AI is indeed a dummy, but SP does have the crucial advantage over MP that it doesn't put as large demands on your spare time as SP. Furthermore, with certain self-imposed rules I believe it is possible to make the AI challenging. I'd prefer MP, but that's just not doable for me.

          Comment


          • #6
            It seems that microprose hardcoded the AI to have a preference for smallish, but well developed empires over the sprawling and generally lightly developed empires most experianced players prefer (think of how many times you've watched the AI obsessively build fortresses and RRs while you've concentrated on founding new cities).

            The solution: there is no truely satisfying solution I suspect. A combination of dirt cheat engineers and occasional tweaks to the AI civs via cheat mode can work wonders though - in my experiance, if you give the AI cities through cheat mode it tends to use them fairly well.
            'Arguing with anonymous strangers on the internet is a sucker's game because they almost always turn out to be - or to be indistinguishable from - self-righteous sixteen year olds possessing infinite amounts of free time.'
            - Neal Stephenson, Cryptonomicon

            Comment


            • #7
              That's my experience too Case. Sometimes the AI is really good at developing the infrastructure of their cities. If terrain improvement is made more important, I think this would aid the AI slightly.

              One of the main problems is all the units they produce who run around doing nothing except eat shields. I can make them all civilized, but then I they're that much easier to romp in battle.

              Does anyone know how the AI assigns workers to terrain squares?

              Comment


              • #8
                Well, as to overimprovement, can't you just deny them the ability to make fortresses/RRs, and limit development in other ways, so they have to use settlers for actual cities? How about settlers that eat zero food per turn and have combat abilities? The AI might behave more sensibly if ALL of its units are settlers. It'll be forced to build less to avoid disbanding its cities, right? I have little scenario experience, of course...
                1011 1100
                Pyrebound--a free online serial fantasy novel

                Comment


                • #9
                  The AI does remarkably well with combined combat and settler units.
                  I once set catapults to the settler role by misstake and had an AI that expanded rapidly...
                  Not sure if the stats of that combat unit affects the AI's use of it though.
                  No Fighting here, this is the war room!

                  Comment


                  • #10
                    Originally posted by Henrik
                    The AI does remarkably well with combined combat and settler units.
                    The AI loves combined settler units. In the beta version of Raging Dragon I gave Sappers a settler flag. The result: the AI built nothing but sappers!
                    'Arguing with anonymous strangers on the internet is a sucker's game because they almost always turn out to be - or to be indistinguishable from - self-righteous sixteen year olds possessing infinite amounts of free time.'
                    - Neal Stephenson, Cryptonomicon

                    Comment


                    • #11
                      Curt Sibling had a similar problem with his Bitterfrost scenario where the AI settlers wouldn’t touch any terrain with a low fertility index (see Allard Höfelt’s excellent hex editing compilation). The AI will not build on any terrain except for those that use the grassland or plains slots (unless their fertility index is raised above 6). As a result you have a large number of “wasted” terrain slots - if that's your goal.

                      From the findings in the hex editing article, the fertility values appear to be dynamic as the game progresses – terrain improvements, cities and available land all seem to be influential. I'm guessing that ongoing modifications to this index are based on its initial value and are not later recalculated from the terrain slot value (byte 1 for each tile). Does anyone have any idea? If that is the case, there’s nothing to stop you changing the fertility values at the start of the game. Now, you could hex hack all the map tile entries in the .sav or .scn files, but I wouldn’t wish that on my worst enemy. Alternatively, some kind soul could, erm, produce a utility that allows you to modify the fertility values for each terrain slot. A certain somebody, cough, comes to mind.

                      Just out of curiosity, I started a few random maps to see what sort of fertility values came up. These are values for the last 4 bits of the 6th byte for each tile in the main map block on the 1st turn:

                      Code:
                      Terrain              Hex Values    Decimal Values
                      Plains                  8-F            8-15
                      Plains + River          C-F            12-15
                      Grassland	        8-F            8-15
                      Grassland + River       C-F            12-15
                      All Other Terrains      0              0
                      Values for plains and grassland below 10 were very rare. The distribution of values for each terrain type seemed to present a bell-shaped curve, skewed to the right - of course this is just at a glance. More data might reveal wider ranges, but, hell, I got sick of looking.
                      Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                      Comment


                      • #12
                        OK, I’ve done some experimenting. I started a new game and hex edited the fertility values of some hills, mountains and jungle to 15. After 40 turns the value remained the same. I then reloaded the 1st turn and placed an AI settler on one of the edited hills. He promptly built a city. All the tiles within the city radius that had a previously hacked value of 15 immediately dropped to 7, not 0. This answers my question. When the game recalculates the revised fertility value, the current terrain type byte is not considered.

                        Furthermore, changing the terrain type from within the cheat menu (Shift+F8) also does not modify the fertility value – something to be aware of if you’re thinking of adding more grassland and plains tiles to a saved game at a later date. Edit: Similarly, one way to get the AI to colonise other terrains would be to create them as grassland or plains in the map editor and then later change them to something else in the cheat menu.

                        Edit (again): Hmm, pulling the MapCopy utility out of the cobwebs I find that there already exists a utility that can modify these values in the save game. Unfortunately (for me and about 3 other people on the planet), it doesn't work with ToT. It also doesn't differentiate between non-grassland/plains terrains. Apologies for my public gibberings.
                        Last edited by Catfish; November 6, 2003, 06:48.
                        Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                        Comment


                        • #13
                          Very interesting, thank you for all the replies. Let me see if I get this right: Each tile on the map has a fertility value that seems to depend primarily on the moisture level of the tile and secondly on the surrounding terrain. Any non-arable tile is set to zero, regardless of the surrounding terrain.

                          I'm not very fond of the idea of giving the settler flag to all units, but I'll try it out and see if the results can be put to good use somehow. Thanks again!

                          One more thing, the AI never suffers from starvation. I have very high food upkeep costs for settlers in my patch, and starvation is simply eliminated for the AI. The cities still don't grow, but any negative amount of food is ignored. So another way of improving the AI is to make settlers eat more, if only I could make sure that they expand with those settlers.

                          Comment


                          • #14
                            Originally posted by Sore Loser

                            One more thing, the AI never suffers from starvation. I have very high food upkeep costs for settlers in my patch, and starvation is simply eliminated for the AI. The cities still don't grow, but any negative amount of food is ignored. So another way of improving the AI is to make settlers eat more, if only I could make sure that they expand with those settlers.
                            My experience is otherwise. AI controlled cities will shrink if not enought food is available. I've noticed this many times. The effect is most pronounced when you forget to explore the tiles around a city when making a scenario. These 'dark' cities melt away very quickly.
                            Tecumseh's Village, Home of Fine Civilization Scenarios

                            www.tecumseh.150m.com

                            Comment


                            • #15
                              What version are you using? I'm using 2.42, it may simply be a bug that's been corrected in later versions.

                              Comment

                              Working...
                              X