Announcement

Collapse
No announcement yet.

Making an artillery bombard algorithm

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

  • Making an artillery bombard algorithm

    Everybody says that AI should use bombard units better.
    That's true, but nobody really knows exact way how to do it.

    So, I decided to try to make hypothetical artillery algorithm.
    (if someone from Firaxis reads this, this could be a guideline how to make a real algorithm)


    When to build them?
    There should be two modes:
    -artillery low mode (same as Civ3 now)
    -artillery heavy mode

    Artillery heavy mode should be initiated:
    -when best defending unit of neighbor civ has higher defense then your best attacking unit with movement of 2 or more
    -when best defending unit of neighbor civ has same or higher defense then your best attacking unit with movement of 1

    This will mean making more bombard units when you have just Cavalry against Infantry (but not Riflemen), or Swordsmen against Greek Hoplites (but not Mounted Warriors vs Hoplites).

    Now I'm not sure what build ratio should be for artillery heavy mode.


    Goal acquisition:
    -Artillery should be used offensively against stacks of units or cities.
    -In order to choose city for bombardment, you need to have as many bombard units as enemy has units in defending stack, but never less then 3.
    -Bombard units should be accompanied with as many defensive units equal to half number of artillery units (rounded up), but never less then 2 (this is pretty conservative, but we don't want human player to "harvest" enemy bombard units for free).
    -Stack should retreat (go to nearest city), if number of defenders gets lower then one quarter or number of artilleries or 1.
    -If stack has fewer defenders then normal but still not enough to retreat, reinforce it with more defenders.
    -When choosing cities, put higher priority on those near the borders and lower priority on those away of borders (using bombard stack deep intro enemy territory is suicide).

    -Target unit stack on open only if they are on your border or one tile in enemy border.
    -When attacking enemy unit stacks on open there lower limit on number of artilleries still applies (as many as enemy units), but not if artillery is in city and can bombard a target without moving (then fire with whatever you have).

    When having not enough artillery to have a valid target, use them in defense mode:
    -put them in city near the border, but only if there is enough defenders (half number of arties or at least 2)
    -If no one city has as many defense units then put them in two or more cities.

    -If your artillery stack is captured, put high attack priority on enemy group with them for recapture.


    Well, that all that I could think of at this moment.
    If the engine in which Civ3 is made, has functions similar to those I used in descriptions, then this should be possible to program.

    Any ideas how to improve it?


    P.S.
    Possible problem: Harvesting AI's bombard units.
    That's why I gave high number of defenders to any AI stack of units. Still, it would maybe be better to slightly change game rules, so only half of artilleries gets captured and rest destroyed. Just to help AI a little.

  • #2
    Ironically, the first modern computer was designed to do artillery algorithms.
    "And so, my fellow Americans: ask not what your country can do for you—ask what you can do for your country. My fellow citizens of the world: ask not what America will do for you, but what together we can do for the freedom of man." -- JFK Inaugural, 1961
    "Extremism in the defense of liberty is not a vice." -- Barry Goldwater, 1964 GOP Nomination acceptance speech (not George W. Bush 40 years later...)
    2004 Presidential Candidate
    2008 Presidential Candidate (for what its worth)

    Comment


    • #3
      That true!!! So let's bring this puppy full circle and give us access to these AI routines via a yet more improved 'editor'. On that note, an 'event trigger' would be nice. Access to goody hut routines, etc. etc. Is my singing loud enough Firaxis?

      Otherwise, GREAT JOB player 1

      I salute your fine thinking, but before too much my own attention hereto, I like to see, hear, smell some positive 'sign' from the game wizards above, that is something they are willing address this year for Conquest upgrading. (or call it patching, I do not much care as long as goodly results are forthcoming)
      The Graveyard Keeper
      Of Creation Forum
      If I can't answer you don't worry
      I'll send you elsewhere

      Comment


      • #4
        Possible problem: Harvesting AI's bombard units.

        Possible solutions:
        (1) Limit AI arty stacking in the field to 4-6 units (plus defenders) per tile; If number of defenders falls below minimum, then withdraw until full number of defenders are restored; If any arty in the field is captured, do not stack arty in the field while at war with that opponent* so it doesn't happen again.

        (2) Have just 1 arty unit with multiple defenders, but try to have MANY such stacks.

        *"With that opponent" assumes that the capture situation would rarely occur with another AI. Against a player would be a risk. A dilemma would be whether to reset the "war with that opponent" flag under changing circumstances; e.g., more military superiority by a particular amount.

        Comment


        • #5
          Eliminate harvesting of artilery, it seems quaint, however quite frankly it is not even realistic. For those who man such field weapons 'do not' hand over their equipment 'intact' so long as there is even one good officer still among them. They scuttle it! And since this is just something the human takes advantage of if the AI uses them, eliminate that characteristic. Enslaving et al has gotten to be a little much. Foreign beligerents normally are not cooperative, it simply costs more resources to manage their imprisonment.

          Stacking needs desperate improvement, artilery is a good place, like the new idea of 'worker gangs' let's extend it to artilery and see how that plays out. When they stack, they automatically combine up to 2 or 3 for starters and move and hit thereafter at once sequenced. Scrolling through stack of doom is novel once or twice, thereafter sours. Give the artilery low defensive rating and once overtaken they are destroyed.

          Now with these simple changes I bet the AI could be made do a lot better and we could have much better Civil War and Napoleon Era battles. As is until the AI artilery use is improved we are greatly hampered here with CIV lll.
          The Graveyard Keeper
          Of Creation Forum
          If I can't answer you don't worry
          I'll send you elsewhere

          Comment


          • #6
            One nice thing, when I mispell a word, I do it every time
            ARTILLERY
            The Graveyard Keeper
            Of Creation Forum
            If I can't answer you don't worry
            I'll send you elsewhere

            Comment


            • #7
              Antrine, are you suggesting when in a stack being attacked, all artillery is treated as ONE unit with a defense of one?

              Otherwise it would take an additional unit (or movement point of a blitz unit) to take out each arty.

              (Arty: abbreviation for artillery (or any bombard unit in Civ3-speak )

              Comment


              • #8
                I had not thought of just like that, however that would fair, for unguarded arty whether ing a stack of 1, 2 or 3 would still be smartly overrun. So I quess a defence of 1 for a stack up to 3. And they stack automatically once collected unless you tag it to remain alone. Basically arty does not move around well alone and unprotected on any battlefield. Which again brings up stacking and combined arms without a Leader.

                In my mods I have found one niffty application of the idea of escorts and armed transportation. I modded the 'Knight' to 'Noble Guard' and altered how/where it appears in game and gave it a load factor of one unit. I also extended it's movement (to 3) to reflect this philosophy of armed or escorted transportation. Extra horses and fast wagons if you like. Anyway it works beautifully, you load up a settler, worker, or a slow moving archer or arty to one 'Noble Guard'. It carries it along, if attacked and destroyed the carried unit is there exposed to combat etc. Also at the end of the 'Noble Guard's' movement the 'loaded unit' can be manually activated (awakened) and then move and attack or spawn a city from that position as a fresh unit for it was carried thus to front or whatever. Handy for emulating combined arms for when you attack with a loaded arty or archer they may get their turn and with act preemtively if first attacked.

                The more I play test it out, the more I like it. Although of course the AI knows not of this. Thus bearing out the limits that modding exposes. We can modify but without access to AI behaviour routines, how do we get the AI to use new advantages and the tactics that are spawned thereof?
                The Graveyard Keeper
                Of Creation Forum
                If I can't answer you don't worry
                I'll send you elsewhere

                Comment


                • #9
                  In playing these ideas out maybe even a little better so as to preserve somewhat the 'enslaving or spoils of war' idea.

                  Is to say 'get the tech' behind the unit you overrun say the third time. So if you overrun and destroy something you do not have the tech for, some 'spoils in the form of reverse engineering' could be a nice touch. Instead of just a few mere units, for indeed one of the major risks in losing control of battlefield equipment is just that, 'reverse engineering' or at least new ideas for to defeat the item.
                  The Graveyard Keeper
                  Of Creation Forum
                  If I can't answer you don't worry
                  I'll send you elsewhere

                  Comment


                  • #10
                    To prevent artillery harvesting - there could have an "operator" with each artillery unit; when the artillery stack is defeated you get a slave instead of each artillery piece - let's just say they broke their stuff and all you could keep is their men.

                    This idea might sound really daffy

                    Comment


                    • #11
                      Stack should retreat (go to nearest city), if number of defenders gets lower then one quarter or number of artilleries or 1.


                      Umm... if their defenders are lower than one, they've been captured

                      Other than that,

                      Comment


                      • #12
                        I my games the AI will use artillery in mass, both against invading armies and cities. I pick one unit per era that is either the strongest offensive unit or the strongest defensive unit to enslave artillery pieces of the same era. Using this method I have seen, on multiple occasions, the AI use blitzkrieg like campaigns against the other AI civs. To keep the game balanced I give my civ a unique unit for every unit type in the game: unique warrior, phalanx, horsemen, tank, etc. Their units would enslave artillery mine would not. I also use unique artillery: one type for my player, another type for all of the AI. This prevents my civ from being able to use their artillery because their artillery is not available to me as my artillery is not available to them. With this in place it creates a new dynamic: battle fronts. The AI will fortify and bombard where ever enemy units are encountered and will not advance until the opposing units are destroyed or retreat. It also adds another dynamic: if you are custom to sitting by and watching one civilization destroy another then you are allowing one civilization to become a super power. Maintaining a balance of power between all civs becomes very important, otherwise you will face an invasion force of 30 defensive + 30 artillery + 20 offensive units in multiple stacks in your territory bombarding and pillaging all the way to your core cities with no hope of capturing their artillery.
                        Last edited by jjbrasington; February 4, 2013, 11:21.

                        Comment


                        • #13
                          In prior versions (civ3, PTW) the ai did use artillery some. In C3C it is so rare to see artillery used to attack a city (when the city is not in range from another city) that I could not tell you the last time I saw it. Now in a modified game, that could change.

                          There is no need to make a unique artillery for all. Let the ai capture yours and use them, if it can capture anyway. You can impose your own rule to not use any that you capture, but the ai needs all the help it can get.

                          Comment


                          • #14
                            Capture Artillery was best feature. Wish they would bring it back
                            Faranca wajaba sara damaar! - France must be destroyed!

                            Comment


                            • #15
                              It still is in the game. The only time you cannot capture a cat/treb/cannon/artie is when you do not have that tech. IOW you cannot capture a cannon, if you have only learned about treb and cats.

                              Comment

                              Working...
                              X