Announcement

Collapse
No announcement yet.

Theories about AI and land mass numbering

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

  • Theories about AI and land mass numbering

    By "land mass numbering" I'm refering to the number the game assigns to each seperate land mass; those that aren't connected to another tile of another land mass. When you're in view mode, and you see the coordinates of the tile in parentheses, eg (120,78)3, that 3 refers to the land mass number.

    It's well known that there can't be more than 63 land masses before you're warned that the AI might be impaired, but does anyone have any theories as to how it is impaired? Any new land masses after 63 are still numbered "63", so it might be a problem with how it regards cities located on land mass no.63 when they're scattered all over the globe.

    Before I can on, could someone (Mercator...) please tell me if the number is dynamic? What I'm thinking of doing is starting a new scenario using a map base which initially seperates major continents, ie North and South America would previously be considered as being on the same land mass because they are connected by adjoining tiles, even though it's diagonal. I can also do this to split Africa, and Europe, from the rest of Asia. Africa's obviously easier; for Europe I need to remove large strips across the caucuses, and then from the Aral sea through the urals to the top, whilst winding my way around rivers. For others, I'm going to group some island clusters together for the starting .mp file so they're considered the same land mass. When in the game, I can use the terrain editor to restore the map to what it was, but this would be for nothing if the game re-numbers the land masses, and Africa, Europe, and Asia become one - again.

    I remember something in the manual about higher trade bonuses for cities on different land masses...I think "across the ocean" was how they put it. So that's obviously one factor. Combat might be completely screwed up, OTOH, we shall have to see. I'm thinking one application might be to split a map into various heartlands - purely for cosmetic reasons. I think I might also need to hex-edit the numbers for the land I'm putting back in, otherwise they might remain "0" (ocean).

    Any thoughts?
    "I didn't invent these rules, I'm just going to use them against you."

  • #2
    Here's an interesting post on the alt.games.civ2 newsgroup:

    quote:

    If you can see a land link and walk units across, it is a continent.
    The continents are numbered (in the map maker), as the AI needs to
    know which squares are on the same continent.

    There are some intercontinental effects in the game, even though the
    Wonders are not. The AI will respond to presence of a force on their
    continent as a threat, and consider you weaker if you do not have
    forces sharing a land mass. The cash trade bonus also is increased
    for moving your caravans between continents.


    This would suggest that the idea of spliting a large continent into national heartlands would help to reduce AI aggression - perhaps simulating the national "boarders" thing that's been missing. It also suggests I re-write Crises to take advantage of this.

    Good news: the land mass number is not dynamic in the sense that newly seperated islands are assigned a different number; but when filling the ocean in with land to rejoin a split continent, the new land is assigned the same number as the mass to the left - logical, as the game looks at the map from top-left to bottom right. The only bad news (for me) is that somehow North America ended up with the same number as ocean.

    Incidently, inland oceans at the start have the number 63. Any idea what difference this might make?
    [This message has been edited by Andrew Livings (edited March 08, 2001).]
    "I didn't invent these rules, I'm just going to use them against you."

    Comment


    • #3
      On a related note, does anyone know what functions or activities the numbers on the shields of the units represent when you set reveal all and human player to none. Presumably defend,attack,explore and resource improvement are some of them but I have never been able to figure out which number is what.
      .
      This is a link to...The Civilization II Scenario League and this is a link to...My Food Blog

      Comment


      • #4
        The only bad news (for me) is that somehow North America ended up with the same number as ocean.


        Oceans are numbered separate from landmasses. Oceans all get a number starting from 1 and landmasses are also numbered starting from 1.

        Incidently, inland oceans at the start have the number 63. Any idea what difference this might make?


        Only those water bodies with less than 10 squares have the number 63. I know how the numbering works, bu I have no idea how it affects the AI.

        As an aside, I made a file describing map structure (updated recently): http://www.civgaming.net/mercator/re.../mapstruct.htm
        But I don't think that brings much more about the counter than you already knew, or I just said.

        Edit: updated URL.
        Last edited by Mercator; September 21, 2003, 08:25.
        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

        Comment


        • #5
          I didn't really know about the "63". But I'm fairly sure the numbers are not dynamic from the Civ2.exe program's perspective, once the map is in a .scn or .sav file. But the Civ2Map.exe program does reassign them dynamically, or they are reassigned if a .mp file is used to create a new game.

          Check out Rick Westera's new Rome scenario "280BC"(the "other" new Rome scenario, not BeBro's "Imperium Romanum"). The author did exactly what you are describing: made separate land mass numbers for Europe, North Africa, and Asia (actually, he includes Egypt and Greece as part of the Asian landmass...the Hellenic world, I guess?).

          I'm not sure exactly how he did it...I'm assuming he must have used the process you suggest: removing bits of land before starting, and then adding them back while constructing the scenario; the break pattern is consistent with that approach, except that in the Caucusses and the Balkans it looks like it would have been a lot of work.

          It does, indeed, have the desired effect of juicing the one-time trade bonus with the 2-continent modifier, which is a welcome change. In many scenarios, islands a medium distance away will be more profitable trade partners than huge cities on the other side of the map, simply due to the two-continent effect. In this scenario, it is much more realistic that the large trade centers, like Carthage, Rome, and Alexandria should have greater incentive to trade with each other rather than focusing, almost exclusively, on islands like Crete and Rhodes. I can't say for sure whether it impacts the recurring trade bonus or not (recurring bonus should be higher if the cities are ever connected by roads...but would the different continent numbers affect that?)

          I'm not sure if it really has any impact on AI aggression, but it might. One other interesting effect appears to be on peace and tribute negotiations. Since the relative strength calculations are continent-specific, you don't have the AI donating huge sums or cash so readily, or offering peace quite so quickly if you do a quick raid to seize one of his cities. In playing as the Romans, the main Hellenic powers weren't cowed by my massive military sitting in Italy, until I'd actually taken a few cities and moved some of it into their "continent". Similarly, the Carthaginians wouldn't fall for the "seize one-city...make peace...seize another city..." approach either. I'm pretty sure it's a function of the continent numbering and relative strength calculations.

          I was unable to port the map out to a .mp file and retain the continent numbering in a new game/scenario. But I had no problems modifying the .scn and .sav files and starting new games/scenarios using that base. I even succeeded in porting it to ToT with Angelo Scotto's converter, and the ToT scenario also retained the unique landmass numbering scheme (I've been trying to port some scenarios to ToT, since I'm too busy/lazy to do a scenario of my own, but I want to see some of ToT's impressive events capacity in action - sadly there are very few quality ToT scenarios, despite its amazing potential).

          A side note - the author did at least one other innovative thing (at least I hadn't seen it before either): He managed to include events to give several of the civs extra units, but ONLY WHEN PLAYED BY THE AI.

          Comment


          • #6
            It sounds like he did a god job then . I've had no luck in keeping the same body counter numbers either. I remembered a thread by Gothmog about problems with the AI not building naval units because of the body counter problem, and him saying he'd solved it by analyzing the map in the map editor before saving it. "Ah ha", I thought. Maybe the solution was to set up the map in the game, load it in the map editor, not run the Analyze map feature, save it, then start a new game on it. Sadly it didn't work, so I can only conlcude it must be something to do with how the .exe file creates new games from either random or saved map files: it creates the polar strip and resets the body counter. It didn't work using the "Mapcopy" program either, which can save body counter information.

            see http://apolyton.net/forums/Forum18/HTML/001335.html?8

            quote:

            Oceans are numbered separate from landmasses. Oceans all get a number starting from 1 and landmasses are also numbered starting from 1.


            Thanks for that. There I was, panicking over nothing.

            "I didn't invent these rules, I'm just going to use them against you."

            Comment


            • #7
              What happened when I imported an unanalyzed map into a scenario using map copy, was that all the body counter numbers were the same, (zero I think).
              I think that's what causing the AI not to build ships, it thought there was only one land mass.
              "Cease fire! Please! Cease fire. What a dreadful waste of ammunition!" -- General Horatio Herbert Kitchener
              --

              Comment


              • #8
                I think I know what the "63" is for. I noticed before that cities next to ocean but with no sea access couldn't build build costal improvements or naval units, so it must be when the inland sea is too small. Presumably if an inland lake consist of 11 or more ocean square when the game begins, it would be numbered 0(?) and they could. Or could there be more than one major ocean body?

                Anyway, take a look at this for convulted:
                "I didn't invent these rules, I'm just going to use them against you."

                Comment


                • #9
                  The only dynamic part is changing ocean terrain to land, and land to ocean. I haven't got a general rule for how it assigns the body counter to new land that's formed, but (if it's adjacent) I think it might be the same as the largest adjacent continent. Haven't tried it for mid-ocean islands...yet.

                  So here's an interesting proposition: if the game tells the AI to ignore inland oceans for building naval stuff, might it ignore oceans that have a body counter of 63 when they have access to the main ocean, 1.

                  I'll demonstrate. In the Black Sea I have two cities (marked "X") next to the ocean which I don't want to build ships.



                  I'm going to create inland oceans squares (63) next to them, so I first block off the main ocean (1)



                  and then remove the ocean squares adjacent to the cities



                  The remaining ocean squares I want to stay as the main body (1), so I change the terrain to ocean, starting from the left.

                  I can of course disable the costal function via a hex-editor, but this is for experimentation. I'm more interested in seeing if the AI will move into the ocean squares (63) to get to the cities, or if it will ignore them. If it does then this offers another way to structure combat by creating a map on which the AI cannot get to specified cities to perform costal bombardments.
                  "I didn't invent these rules, I'm just going to use them against you."

                  Comment


                  • #10
                    Very interesting discovery... You gotta love this game.

                    JP
                    John Petroski
                    PetroskiJP@hotmail.com

                    Comment


                    • #11
                      Update, because I've been working on this again and found that only "classic" versions of the civ2.exe (ie pre- 2.62) wil dynamically reassign water body counters. Later versions will use the same body counter for water as the land taken away.
                      "I didn't invent these rules, I'm just going to use them against you."

                      Comment


                      • #12
                        Ignore my last post: the anamalous results were from settings in the rules.txt and nothing to do with the version. I had the terrain type change to ocean when irrigated as a short-cut when editing the terrain.
                        "I didn't invent these rules, I'm just going to use them against you."

                        Comment

                        Working...
                        X