Announcement

Collapse
No announcement yet.

AI questions

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

  • #16
    Hm.

    1. VB is not a scripting language.

    2. You don't want your AI routines in VB since its too slow.

    Just my $0.02, from a programmer's POV.
    (\__/) 07/07/1937 - Never forget
    (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
    (")_(") "Starting the fire from within."

    Comment


    • #17
      1) The AI should know who/what is weaker/stronger than itself and attack/retreat accordingly.
      2) The AI needs to attack all at once using the appropiate units. e.g. a) build some bombers, attackers, defenders, and engineers. b) send them all out, maybe have the engineers build airports or forts near cities that are far from the AI's home cities this way the units can recooperate. c) have the bombers attack for a turn (or several) then follow up with the offensive units. the defenders are to protect the attackers and engineers while the bombers are...well...bombing. d) leave a couple of defenders in the base and move on to the next city if there are still ample units left.
      3) If it is in battle, it should either send a second wave to a different location of the enemy's civ or bring up reinforcements to the battle.
      4) Oh, yeah and give it the senses of tasting, seeing, hearing, smelling, and feeling while your at it...
      [This message has been edited by Nemo (edited June 16, 2000).]

      Comment


      • #18
        About AI:

        Please be influenced by other developers!!

        Despite what Steve Clark said, it is still possible to have a challenging AI.

        In particular, several old games by developer SSG (Strategic Studies Group, in Australia) had very good AI in comparison to todays modern games:

        Warlords 2: The AI would build "taskforces" appropriate to capturing the city. It would hammer weak points. In the original Warlords 2, the player could give the enemy warlords "personalities" that affected their STRATEGIES, not just cosmetic things, ie "ratsbane" fights 'on the cheap', ravager uses 'scorched earth' tactics, ect.

        Carriers at War: very good AI.

        SSI:
        Panzer General, particularly Panzer General II.

        The Operational Art of War 2:
        Simply because, again, it would attack weak points and build taskforces.


        My Suggestions to Improve Civ 2 AI that do not involve many variables:
        -the AI must have a low and a high intensity war mode.
        -the low intensity is default. In this setting the AI will ATTACK WEAKPOINTS, with spies, battleships, and try to CONTROL VITAL TERRAIN. Vital terrain are the areas near civilizations (and of course the homeland), but not built up, where an enemy force must travel to attack the AI, or vice versa. Examples from earth map: panama canal, the Middle-East, India, Central Asia. Securing these areas is accomplished with the "two move, high attack" type of units, followed by fortresses, followed by cities. Once an area has reached 'x' level of security, the AI moves on to control areas ever closer to its enemies.
        -high level war: If the AI is at low-level war for more than 'x' turns without peace, or if the enemy has successfully driven the AI out of more than 'x' VITAL AREAS ('x' should be '1' on Deity), or if the AI has a military advantage over a foe who is inferior and has a poor diplomatic relationship with the AI for 'x' turns, the AI goes into high level war.

        -under this setting, the AI BUILDS TASKFORCES, using the following variables: number of cities to be taken (at least one of large size), number, type, and defense strength of units, combat relevant improvements such as barracks, walls, coastal fortresses. The number of units that could be built in the target city before the AI taskforce arrives is added to the final variable.

        -the taskforce is proceeded by x number of support units (depending on enemy units in airbases, the sea, fortresses) who carry out a CONTROL VITAL AREAS function in a region of whatever size around the target city (ies). The taskforce is always launched regardless of the success of this "softening up" approach so that humans can't keep the AI at bay by killing a few subs or armours.

        -While in high-level mode, no superflous things are built like marketplaces or defensive units. The game should be made in such a way that, after early expansion, a typical AI can put together a TASKFORCE capable of taking one large city in 20-30 turns (at least).

        -If the TASKFORCE is successful, the AI EVALUATES following: Has more than x% of the taskforce survived? Does the enemy have a numerical/qualitative advantage? Has the enemies taskforce been more successful? and any other variables, such as a sneak attack by another civ. If these weighted 'IF, Then' questions add up to more than x% the AI tries to make peace, and if that is refused, goes into its defensive low level posture again until it can build up another taskforce. If the IF, THEN questions add up to LESS than x%, the AI will immediately examine a new target city, sending appropriate force to CONTROL VITAL AREAS around it, and immediately build up a new taskforce (in this scenario, 80% of AI cities are building offensive units)

        If the TASKFORCE is unsuccessful, the computer will EVALUATE a more lengthly IF, THEN list to make a yes/no decison. This list would contain relative military strenghts, how far ahead/behind the civs are economically and scientifically, attacks on the AI homeland, diplomatic vendettas, ect. You should get the spirit now.
        The yes/no decision is to see if the AI should build another TASKFORCE of that is +x larger (growing larger with each defeat), or try asking for peace. If peace is refused, and the AIs EVALUATE list still gives results unfavourable for AI success or existence, it returns to low-level war (ie, CONTROLLING VITAL AREAS, defensive units, science and taxes, ect., until such time as it recieves a favourable result from its EVALUATE list. (or makes peace).


        A general guidline: the longer and more thought out the lists of variables(and their numerical weights) that the AI uses in its IF,THEN evaluations are, the better the response will be. If there is enough development energy, these variable lists could be difficulty level dependant, for example a cheiftain AI might look only at numerical values and not at qualitative things like bonuses, firepower and hit points, ect.


        I hope you take the time to make a good basic AI, 'cause if you do I would buy expansion packs FOREVER.
        "Wait a minute..this isn''t FAUX dive, it's just a DIVE!"
        "...Mangy dog staggering about, looking vainly for a place to die."
        "sauna stories? There are no 'sauna stories'.. I mean.. sauna is sauna. You do by the laws of sauna." -P.

        Comment


        • #19
          Eliminate general stupidity.

          For example: If I am playing SMAC (original, not expansion), and I have the HSA, then why do morgan and miriam still throw probe teams at me? It is stupid actions like this that make me wonder if a pocket calculator could play better. Things like this wouldn't be difficult to fix. If you have the HSA then the AI should realise "No point in using probe teams against him/her" and instead put the rescources into military units.

          Give the AI a Tech goal.
          When researching, I never just sit there and research 1 tech in physics, then 1 in economics, then 1 in transport etc.
          If I am going to research I have a far off goal. In SMAC I usually play as UoP. My first research goal is Secrets of the Human Brain. Then I go for Cyberethics (to get knowledge) Then I go for Eudiamonia (With a few stop offs for weapons techs). The AI just tends to sit there and research across the board.



          ------------------
          - Biddles

          "Now that our life-support systems are utilising the new Windows 2027 OS, we don't have to worry about anythi......."
          Mars Colonizer Mission
          - Biddles

          "Now that our life-support systems are utilising the new Windows 2027 OS, we don't have to worry about anythi......."
          Mars Colonizer Mission

          Comment


          • #20
            Things the AI allows me to do that the AI should do:

            1) For expansionist civs, go _straight_ for Republic at the beginning. Forget military for the moment -- buy peace treaties, or buy units if it needs them. The diplomat is about the best defensive unit early on!

            2) Use luxury bursts for growth -- at appropriate times in Republic/Democracy, put luxuries up really high for a few turns just to grow the cities. Tremendous advantage.

            3) Use a third nation's city as a staging post.


            Things the AI allows me to do that it shouldn't let me do:

            1) Talk it into having a revolution before I buy its city (When at war, if you talk to an AI civ it will invariably overthrow its Democracy so that it doesn't have to make peace. Now it's not a Democracy, you can buy the city).

            2) Fortify units on mountains in fortresses the AI has built for me, right in the middle of its own territory.


            Things the game lets me do that it shouldn't

            1) Use my enemy's railroad.

            2) Use spys to 'sneak' entire tank regiments past its units' zones of control.

            Things the game lets the AI do that it shouldn't

            1) Know which of my cities have SDI

            Comment


            • #21
              Things the AI allows me to do that the AI should do:

              1) For expansionist civs, go _straight_ for Republic at the beginning. Forget military for the moment -- buy peace treaties, or buy units if it needs them. The diplomat is about the best defensive unit early on when units come one at a time. Anyone comes near, you bribe them!

              2) Use luxury bursts for growth -- at appropriate times in Republic/Democracy, put luxuries up really high for a few turns just to grow the cities. Tremendous advantage.

              3) Use a third nation's city as a staging post.
              Often there will be one city of a neutral country on the continent of a larger civ. Conquer that city and stack it to the hilt with units before declaring war on the real target.

              4) Conquer by continent -- concentrate on clearing whole islands to avoid your enemies using 3.

              5) Don't go for war when there are still nearby uninhabited continents to claim.

              6) Go on goody hut expeditions with a two-move unit and a ship. (Horsy gets off ship to claim coastal goody hut, and can then get back on to avoid the nasty barbarians he just released).

              7) Send your caravans only to your own cities. In the long run, the increased income from owning both ends of the trade route outdoes the initial bonus for faraway/foreign cities.

              8) Build cities in defensible positions slightly beyond the outskirts of your civ (but on the same continent). Then fill in the vacant area with more cities to support them (and 'connect them up' to your civ). Avoids too many messy border wars early on. In short: grab land quickly.

              9) Nuke sea fleets (no pollution)

              10) Use airports to ship troops into handy staging posts

              11) Phase your growth -- this goes something along the lines of 2, but you make sure you build your settlers in big synchronised waves so that your luxury-fired growth bursts will be more effective. (And it makes settling a continent really quick when you have 20 engineers on the job!)
              Ie: declare 'for the next X turns, you're all building settlers & we'll have ten new cities to cover that island.' do the settling and then stop settler production to concentrate on growing the new cities fast.

              12) Buy improvements, especially factories (Especially in small underproducing cities that will produce well once you've grown them)

              13) Target wonders in your invasions, especially happiness wonders. There's nothing like conquering Michelangelo's and having all your opponents cities instantly fall into disorder and become so much more buyable!!

              14) When looking to war, go for a technologically superior opponent. Invade with waves of diplomats, stealing their technology and buying their cities. (Don't forget to steal tech before buying the city so you get 2 techs from the city)


              Things the AI allows me to do that it shouldn't let me do:

              1) Talk it into having a revolution before I buy its city (When at war, if you talk to an AI civ it will invariably overthrow its Democracy so that it doesn't have to make peace. Now it's not a Democracy, you can buy the city).

              2) Fortify units on mountains in fortresses the AI has built for me, right in the middle of its own territory.


              Things the game lets me do that it shouldn't

              1) Use my enemy's railroad.

              2) Use spys to 'sneak' entire tank regiments past its units' zones of control.

              3) Prebuild wonders (keep building a wonder someone else has already built so I can switch to another in a few discoveries' time)

              Things the game lets the AI do that it shouldn't

              1) Know which of my cities have SDI

              General Game Tweaks:

              1) The fact that invasion by diplomat is so superior to warfare indicates that it's too easy & cheap in Civ2.

              2) After the development of Economics, the caravan should become obsolete, and trade routes should just set themselves up.

              3) (I suspect you'll already have this in your Civ3 prototype by now.) Have a General/Field Marshall unit which modifies attack/defense/movement of stack or confers other bonuses. I'd suggest the general's bonuses could be random and decided at general-create time: eg, 'all units stacked under general count as veteran' or 'doubles terrain defence bonuses', etc.
              Special generals (Nelson, Napoleon, Wellington, Montgomerie...) with multiple bonuses could also be created like wonders.

              3) There are a number of other elegant modifications to the rules that would improve the game no end (no I haven't posted them here & no I haven't seen them here.). These are short & uncomplicated, but off-topic for this post.
              Email me at wbillingsley@crosswinds.net or bill_billingsley@adc.com if you are interested.


              William Billingsley,
              Senior Developer,
              ADC Software Services Division.

              Comment


              • #22
                the ai in civ3 should:

                expand early. most important.

                fill thier own continent before they invade others. stay peaceful if possible until there is no more easy expansion room.

                try to conquer all of thier continent.

                give a bonus to stacked units, make the ai stack inteligently.

                always attack in force, never single units.

                always attack with the highest offence units first working thier way down, the best defence units go last and occupy the city.

                build coastal cities or build inland, not one square in.

                let the ai see unit strength just outside their borders, if it is high, plan for a defence.

                protect settlers with a troop, if the settler builds a city, switch support and use it for defence.

                the longer a peace treaty lasts, the harder it should be to break and the better it gets.

                allow an ask nicely option for tech.

                allow an ai to ask for me troops to defend itself from another ai. (the enemy of my enemy...)

                monarcy and graneries early.

                always build the cheaper improvements first. buy the granery if the civ is rich.

                move offencive troops to the borders but keep them supplied from the interior.

                recycle any troops two generations old.

                extra defences for active wonders.

                dont allow the player to buy ai cities.

                Comment


                • #23
                  Here is a strategy that my friends often use against the AI:

                  1) Concentrate on trade and build up a very large reserve over a number of turns.

                  2) Use multiple diplomats to harass an enemy's capital city and destroy all its defensive buildings. (These same diplomats can be used to force a civilisation out of democracy if necessary).

                  3) Invade the capital city with overwhelming force.

                  4) Use additional (multiple) diplomats to buy as many cities as possible.

                  With a strategy like this, a very powerful CIV can be knocked out of a game fairly quickly and consistently.

                  Suggestions:

                  1) Better AI use of Diplomats and other special units that you might employ in CIV III for counter-intelligence.

                  2) Removing the ability of a diplomat to bribe an enemy city to join your CIV directly. Perhaps they should start their own CIV as in CTP.

                  Comment


                  • #24
                    I sometimes use diplomats to get my units through where I've lost ZOC. I think thats cheating, I think'd be nice if that weren't possible to do.

                    Comment


                    • #25
                      Here are som stuff:
                      - The AI players don't know how much power they need in one attack if it's gonna beat me. Even when the Ai player has alot of units it simply cannot focus on a specific target (like a specific city) and instead it just tries to do too many things at the same time, if the Ai-player could concentrate on a few specific goals it would become a much more dangerous enemy.
                      - The AI-player should have some idea of it's own power compared to the power of other civs, especially those where they have established an embassy.
                      - As it is now, AI-controlled units move around aimlessly. Instead of every unit having it's own agenda i think that it somehow should be some kind of overall coordination for the army.
                      - If the AI learned not to waste so much time on suicidal units it would be more able to concentrate on other things. Like growth, and economy.
                      - But lets not forget. Stupid leaders has made stupid decisions throughout history. I think that the AI-players should atleast sometimes do stupid moves, but not always as it is in the existing games.
                      stuff

                      Comment


                      • #26
                        Improve the algorithm uesd for settler actions. adam smith had good algorithms that are implimentable. He started several threads in the strategy section.

                        Comment


                        • #27
                          here's my 2 cents.
                          SETTLERS. And engineers. What do they do with them? Irrigate, roads/rr, found. I am playing a game that lasts into the 2700's, and am using armies of engineers to transform all my land to grass land and hills. I go out every few turns and buy another engineer or two off a neighbor. whenever I buy a enemy city, I get them all to work at improving the land I now possess. I don't get it! why don't they improve their own land? even settlers can clear jungles and forests, but they never do that.
                          While we're at it, how come they don't come and buy one of my settlers/engineers now and then. I can buy huge amounts of theirs without incident, but they don't bribe my units unless we're at war, and then only frontline military.
                          that's all for now
                          Any man can be a Father, but it takes someone special to be a BEAST

                          I was just about to point out that Horsie is simply making excuses in advance for why he will suck at Civ III...
                          ...but Father Beast beat me to it! - Randomturn

                          Comment


                          • #28
                            Wow! I don't visit the forum for a day and this thread's had a million posts already!

                            First of all I'm not trying to sound arrogant and tell you guys what you should be doing, but I think in Civ3 the AI should be improved in many ways:

                            *In normal empire management the guys above have said it all.
                            *But I think the main area of improvement is threat assement.
                            The AI should scan areas of the map, and examine each according to a set of rules. (So obviously the AI would need to scout often with diplomats/scouting units). A particular rule used could be related to the amount of friendly/enemy units there. This would allow the AI to detect an incoming invasion fleet accurately and rush reinforcements there.
                            *The same area scanning technique could also have other rulesets so that the AI can probe areas for lack of enemy units, but the presence of enemy cities. This would obviously be a weak spot in the enemy civ and the AI sohould respond accordingly (ie go into a special mode or something and continuously pound that weak spot with military units)
                            This would allow a AI civ to detect and launch a surpise attack on a spot away from the main battle front.
                            *Once again, the rule-base area scanning can be used to determine which part of an enemy empire is most critical to the enemy - eg a city on/near a vital landbrige/bottleneck, a capital, or a city packed with wonders, or an easy stack of units to kill.
                            *Of course the same technique could be used to detect weakness in the AI's own civ.

                            I think if a rule based system is adopted then it shouldn't be too hard to program AI civs of different behaviours. Just change the varibles used in the rulesets.

                            Most of the military-related AI improvements that the guys mentioned above should be able to be implement with this system.

                            (BTW Like I keep ranting on about in other threads, I think the AI should be open source. It could have a custom language, a bit like Civ2's events.txt, but it could very maybe use VB, even though that is slow - but at least it's easy to learn/program in.)

                            ------------------
                            No, in Australia we don't live with kangaroos and koalas in our backyards...
                            [This message has been edited by UltraSonix (edited June 16, 2000).]
                            No, in Australia we don't live with kangaroos and koalas in our backyards... Despite any stupid advertisments you may see to the contrary... (And no, koalas don't usually speak!)

                            Comment


                            • #29
                              What? "Strategy to beat the AI"? Do one need an stategy?

                              1/ Well, theres an very old saying that says "an army marches on its stomach".

                              You can parafraze that by saing: "An strong CIV3-AI marches on its many city-improvements and well developed city-areas.

                              A good AI should constantly monitor the human player, an ALWAYS try to accomplish the same infrastructure/ the same number of cities*. Any CIV-AI ignoring above, is gonna be beaten again, again and again...

                              It is as simple as that. Dont let AI waste time bulding buckloads of "cost-effective" crap-units. For most of the game: build and upgrade max 3 high-class units per city.

                              (*to avoid cluttering up the map with to many cities, any 20+ city -empire should be MUCH more prone to empire-unstability, then in previous civ-versions. Furthermore:

                              - No indevidual city should be able to build 2 or more settlers in a row, without building a city-improvement in between.

                              - 3 totally undeveloped cities at any given time means 20% chance that these cities "break out" and become renegade city-states (have to be conquered).

                              - 4 totally undeveloped cities at any given time, means 40% chance..., and so on).


                              Comment


                              • #30
                                I just Lay Back and build the most powerful civilization by created dozens of trade routes; giving me the economic egde. I build a strong group of cities; about 10-15 cities create one unified megalopolis to create a power command center. Build MECH INF. because they have the best land defense capabilities and fortify them in my cities. Finally I position my battleships & carriers to blockade their capital, bombard the city an see it get taken over by the relentless forces of the POLIS.

                                ------------------
                                GAMEOPOLIS

                                Comment

                                Working...
                                X