Announcement

Collapse
No announcement yet.

What to teach the AI

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

  • What to teach the AI

    A lot of people (okay everybody) seem to agree that the biggest possible improvement to AC would be 'smarter' AI...but that's not a very specific request. The AI is a system of rules and balancing values, so what would you add to the rules, or what should have more weight in the values?

    For me the biggest thing would be to add one simple counter. If the AI kept track of the number of bases it lost in the last turn, and over the last few turns, it could recognize when its little electronic brains are getting beaten in. Maybe it could then do something about it, even if it were just to plead for a cease-fire.

    For example, in my current game the Believers ran amok, and eliminated everyone but me and Morgan. They covered about three quarters of the map when I finally managed to steal Air Power from them, but four of my six bases could pop out an impact needlejet every two turns. Now I've taken about a third of their bases and my handful of speeders take between one and three more every turn, and my jets are keeping a forcefully demilitarized zone far enough in front of them that nothing gets taken back...but Miriam is still demanding a base be returned to call off the vendetta. I'd stop the pounding just to get all my new holdings better organized and break the monotony, but I can't bring myself to meet the outrageous demands of a foe that doesn't know she is getting mashed.

    This is a consistent weakness (Civ III, GalCivII) that seems like it shouldn't be that hard to address. What else should be done, specifically?

  • #2
    Once an AI starts losing their behavior becomes "undefined" from a humantistical perspective, at that point in the game a human would simply leave. Any behavior is going to seem erronous from at least a couple of perspectives:
    1) What would a player do? (leave, possibly slash and burning their empire first)
    2) What would a corporeal leader do? (bearing in mind they are egotistical, possibly a megalomaniac, possibly psychotic, deranged or deluded, it could be anything)
    3) What would the people of the empire do? (usually surrender, maybe fight to the bitter end)
    4) What would work best for balance? (refuse to surrender anything for peace)

    It's kind of a case where there is no obviously right response, so the AI programmer is just "as long as it's not easily exploited it's good enough".

    Comment


    • #3
      I have a few

      - The Ai shouldn't build bases so close to each other. That is one of the reasons they are so easily invaded. And it's usually (although not always) idiocy to build a bunker next to a base, That's just a sitting duck waiting to be exploited.

      - The Ai ought to recognice that it's poinless to build farms on anything but rainy terrain, (unless there is a nutricient bonus and/or some future codenser planned). And the farm/mine - combination works only in the moonsoon jungle, and there it's still far inferior to forests.

      - An AI-base that is without garrison and in unhappiness keep on making holomovie theatres forever, instead of doing the only sensible to do: Get a defensive unit in there ASAP even if it means starving the population and rushbuilding with your last credits. A garrison has ALWAYS first priority, regardless of whatever priorities the AI may have.

      - If a distant base is doomed to fall in the hands of an enemy then the AI ought to recognice that theres no point keeping the base, it should recycle as much from it as possible and starve it, ( if it's big, make them all specialists and earn some more from it if the enemy is slow). If the U.N charter is off it should simply obliterate the base, keeping it away from the enemy, or give it away to an ally. An evil-genious-AI would give the base away to a powerful ally that their enemy isn't in war with.

      - The golden rule in air-combat. In all combat actually: Every aircraft that is in full or almost full health shall attack something it's well capable of defeating each turn. Not just flying around and attack something once in a while. Every turn it has a good chance of defeating an enemy unit it shall take the chance. This is a no-brainer.

      - Another combat rule: if possible a fast unit should always retreat back to a defended bunker after it's attack, if it has the chance. That goes for slow units aswell. Even if it may slow down movement, it will keep more units alive for a far longer time.

      - In general the Ai-units spend too much time mindlessly wandering around without goal and purpose. It should build a couple of sensors and keep some spare offensive units stationed to defend against surprise visitors, instead of letting a zillion units wander around doing nothing but getting victims for occasional mindworm attacks.

      - Finally, the AI ought to see unhappiness coming before it arrives. The Ai-players would be far more dangerous if they could understand that when population increase unhappiness will arise, it would save itself from alot of anarchy, and earn alot of energy in the long run, if it built happiness facilities in time to meet the rising unhappiness levels.

      Comment


      • #4
        1) Terraforming.

        The AI's terraforming is INCREDIBLY bad, such that even novice players will look good by comparison. More forests, more boreholes, more condensers, fewer mines, fewer solar panels. Also, terraforming appropriate changes over specials, for example, putting a condenser/farm over a nutrient special is a no-brainer that should be easy to program.

        2) Supply Crawlers.

        If the AI could have the sense to crawl large single factor squares instead of working them, that would be a huge benefit. Crawling the afforementioned nutrient special would yield huge benefits.

        3) Unit management.

        Teach the AI to properly manage its available support/mineral supply. Of course, increasing said supply would go a long way toward that issue, but also preventing the AI from building itself out of available minerals is a good idea.

        4) Pathing.

        Building an algorithm that can move around known obstacles such as fortified hardpoints and look for weak points to attack would help out immensely in making the AI's attacks more imposing.

        That pretty much covers the basics. Also, taking away the restrictions on AI controlled factions that force them to choose their preferred SE settings is also a good idea. Sometimes Dierdre shouldn't use Green Economy, know what I mean?

        Comment


        • #5
          Everything said so far is good, especially about having the AI make its military units do something useful ALL THE TIME.

          - The golden rule in air-combat. In all combat actually: Every aircraft that is in full or almost full health shall attack something it's well capable of defeating each turn. Not just flying around and attack something once in a while. Every turn it has a good chance of defeating an enemy unit it shall take the chance. This is a no-brainer.

          - Another combat rule: if possible a fast unit should always retreat back to a defended bunker after it's attack, if it has the chance. That goes for slow units aswell. Even if it may slow down movement, it will keep more units alive for a far longer time.

          - In general the Ai-units spend too much time mindlessly wandering around without goal and purpose. It should build a couple of sensors and keep some spare offensive units stationed to defend against surprise visitors, instead of letting a zillion units wander around doing nothing but getting victims for occasional mindworm attacks.
          Yes! Yes! YES!!!

          Military tactics and military strategy. If the AI knew how to take advantage of terrain, use combined-arms attacks (with groups of units greater than 2 or 3), and make its attacks into DYNAMIC thrusts to be truly feared and prepared for, it would make playing against the AI so much more interesting. You'd actually have dilemmas over, "Should I build this research hospital? Hmmm...but what if the AI invades? I won't be prepared! They will run right over me with my defenses as they currently are, and they will tear through my territory so quickly, I won't have enough time to prepare!" As it is now, such thoughts almost never cross my mind. Just think: could an AI faction ever be expected to organize something like Operation Golden Dawn from the ACDG3, an attack launched by over 30 units on the same turn? Not by a long shot! But it SHOULD! It's not a question of the AI lacking the resources to build 30+ spare units (the AI does that all the time!). It's a question of coordinating those units.

          There should be several clearly-defined functions that units should be assigned to at all times:
          1. Attacking SPECIFIC objectives (preferably MASSED attacking. The "trickle-in" tactic does NO good and is actually worse than never having built those units in the first place...a unit should never venture into enemy territory unless it has at least 4 other units within two squares of itself with similar objectives).
          2. Defending SPECIFIC objectives
          3. Mind-worm hunting.
          And the AI should be able to figure out when one takes precedence over another (i.e. don't have half of your units wandering around mind-worm hunting (or just wandering around aimlessly) while your empire is getting reduced to rubble. Send units TO THE FRONT (aside from keeping a small 1-2 unit garrison in interior cities)--i.e. to the cities that have the most enemy units in closest proximity. All this should be straightforward to program.

          Another tactic for the AI to learn: ACTIVE defense. Use offensive rovers, needlejets, or other offensive units to take out whatever units can be safely taken out before those units get a chance to attack. SIMPLE! Just a matter of calculating when an offensive strike is likely to win. Bottom line: a 6-1-2 rover should always attack a 6-3-1 missle squad parked right next to the base. Even if the missile rover doesn't manage to kill the missile squad, the rover isn't going to do any good any other way!


          Terraforming:
          1. Fix the forest bug. From what I understand, the AI was programmed to use forests when forests still yielded something really crappy like 0-2-1 or something. Later, after the value for forests was changed, the associated AI programming for forests was left standing, so the AI still plays "as if" forests yielded 0-2-1. Fix this.
          2. It seems like the AI doesn't even know that boreholes exist. I have NEVER seen an AI build one. It's as if boreholes were just tacked on to the game after the rest of the AI terraforming programming had been finished.
          3. Either remove the -1 nutrient penalty of mines in alphaX.txt, or make sure that the farm+mine scheme almost never happens (the only time I can ever see it being of use is with a rolling/rainy square with a mineral bonus, but even that has a pretty low resource yield per # of terraforming turns expended on it).
          4. Matching terraforming to resource bonuses so that the bonuses are accentuated.

          Regarding crawlers, I have witnessed COUNTLESS examples of the AI cleverly harvesting resources with crawlers...when the AI is in the lead. The AI will also build tree farms, hybrid forests, fusion labs, satellites, and all kinds of cool stuff when it feels safe enough to do so. The AI is just too paranoid most of the time...but in reality, it could build half the units it usually does and have twice the defensive security if the AI would just use its existing units more intelligently.
          Civ IV is digital crack. If you are a college student in the middle of the semester, don't touch it with a 10-foot pole. I'm serious.

          Comment


          • #6
            2. It seems like the AI doesn't even know that boreholes exist. I have NEVER seen an AI build one. It's as if boreholes were just tacked on to the game after the rest of the AI terraforming programming had been finished.
            I played a challenge game (did I mention this before?) where you switch factions after 100 turns. My beautiful Morganite empire's boreholes were handed over to the AI, and within just a few turns, the AI had rolled in all its nutrient crawler, filled in the boreholes (probably with all their artists and scientists and other smart people), and plunked down its sad mixture of farms and mines.

            Comment


            • #7
              In SMAC?

              Get Yang to USE his airforce and not just bomb condensers and the human player would be in trouble.

              Sparta? Build planet busters only in cities that will actually finish.

              REMOVE datalinks, this is such an advantage to the human and so nothing is a surprise.

              As others have said, no more of this trickle rubbish in nonsense, if you attack, attack you mean it.

              Comment


              • #8
                Ughhhh...I am once again finding how clumsy the AI can be...

                I was playing with my latest alphax.txt refinement, and although the AI challenge was only marginally improved, this game was possibly one of the most well-balanced and ELEGANT that I have ever played---finally I feel like I've reached a point where every aspect of the game, every facility, tech path, unit ability, social engineering setting, terraforming, etc. HAS ITS PLACE at some potential point or another--where one is constantly presented with endless dilemmas over how to progress one's faction most quickly, where there are no cut-and-dried strategies that one can rely on in any situation, where gazing over the state of the game at any point seemed like looking at a work of art.

                So if SMAC was a Sim-City-esque single-player game that was just concerned with building up one's empire in the most powerful and elegant way, I'd be satisfied. But it's meant to be more than that! And as it is right now, I've given up on trying to improve the competitive aspect of the game. Because there are two main problems with the AI competition:

                1. AI power tends strongly towards divergence rather than convergence with the human player as the game progresses. Here's what I mean:

                To make the AI the most competitive, fun, and dynamic, there should be gameplay tendencies (not artificial ones via cheating) to keep the AI competitive with the human throughout a large part of the game, except in cases of particular human brilliance (not just steadily diligent micromanagement) where the human actually deserves to pull out far ahead. For instance, the AI should have a stronger tendency to put aside differences and gang up against the human player in intelligent ways (through research sharing, prototype sharing, and joint military efforts when needed) when the human player pulls out a little bit ahead. The costs for being the lead, groundbreaking researcher should be higher (as is the case in the real world--where developing countries are better able to leapfrog and acquire existing technology more easily and catch up).

                There should be more costs for conquest, such as more costs and especially risks involved in pacification--it should not be allowed to starve cities, for instance--workers should only be convertible to specialists if there is enough food to prevent starvation that next turn. In any case of starvation where the population accidentally drops, there should be automatic drone riots. These occupation drone riots should occasionally destroy whole units or facilities, or even lead to revolt of the city and either subversion or destruction of the units stationed within. There should be fragmentary tendencies in a large empire to partially offset the exponential tendencies of strengthening (as in the real world)...for instance, there should be "waves of revolutionary activity" somewhat like other random events (this could be disabled along with other random events)---you could get a pop-up saying,

                "Social tensions erupt in Manufacturing Warrens! Drones increased by half of base's population in this base and all other bases within a radius of half the base's population for the next 10 years!"

                Or...

                "Social tensions erupt in Manufacturing Warrens! All psych and drone control facilities except for punishment spheres lose their effect at this base and at all other bases within a radius of half the base's population for the next 10 years!"

                This can be one of those really bad random events that only happen perhaps once or twice or thrice per game, and that disproportionately have the tendency to happen to the stronger factions.

                Since starving the cities is no longer possible and/or helpful, and since those bases will be experiencing continual drone riots preventing you from ameliorating the problem using the resources of those bases (as in real life), you are faced with the prospect of either trucking in food with supply crawlers, sending in more police units, or abandoning the cities (to prevent subversion or destruction of units). Also, you should be unable to sell off facilities during drone riots since, ostensibly, those facilities have been more or less occupied by rebellious drones who will prevent you from doing so. In the case of outright revolt of these cities, there should be the possibility of a new faction being loaded (or existing defeated faction reloaded) into the game to assume control of those bases (this is in addition to the possibility that the cities will just revolt to a nearby neighbor or former controlling faction). This could include the possibility of allowing more than 7 factions at a time in SMAC (which would require reprogramming of the source code or something, I know...When are we gonna get our hands on that??? How could we make that happen???)

                The AI has a problem with divergence in the other direction too---if you keep on increasing the bonuses and cheats that the AI gets to use, before you know it you come to a point where the AI just takes off exponentially without any hope of catching up with its brute power, despite its stupidity. In other words, because the AI relies so heavily on brute power rather than clever strategy and diplomacy to remain competitive with humans, the AI's competitiveness with humans has a very strong and unpleasant divergent character to it.

                2. When you actually do manage to get that balancing act just right, and when the AI actually is being competitive for a stretch of the game, the strategies that the human player is forced to rely on in order to win are dumb and unimaginative.
                *Beating the AI in tactical military terms.
                *Concentrating one's meager forces against the AI's pitifully and idiotically spread out forces.
                *Micromanaging better than the AI.

                In other words, the AI just also needs to be more intelligent in many different ways that have been explained many times before.

                But yeah, basically, these changes are what it would take to make single-player SMAC/X playable for me again.
                Last edited by Zeiter; January 17, 2008, 00:05.
                Civ IV is digital crack. If you are a college student in the middle of the semester, don't touch it with a 10-foot pole. I'm serious.

                Comment


                • #9
                  I've seen significant better AI responses in the SMAniaC mod. Terraforming is improved by disabling mines, forcing the AI toward more prudent behavior. As a result there are LOTS more forests and fewer brain dead mines+farm combos, among other things.

                  It may be just me but the AIs do better in SMANiaC mod, too. This may be because of better resource utilization, which if done poorly in the early game can be absolutely crippling. Also, the mod gives the AI a bump with cheap (1 row mins) fungicidal formers from the start, along with enhanced probes. The AI now actually builds foil probes, among other things - sea bases beware!

                  The tech tree was overhauled, too, to remove some of the more common exploits.

                  In the last few years SMAniaC is all I've used for MP, if for nothing else than to relearn parts of the game.

                  Hydro

                  Comment


                  • #10
                    To make the AI the most competitive, fun, and dynamic, there should be gameplay tendencies (not artificial ones via cheating) to keep the AI competitive with the human throughout a large part of the game
                    IMO, this is a terrible idea. CivIII and later versions of the franchise added this so-called feature, and the only noticable effect was to dumb down the game such that the AI was impossible to outwit, because the gameplay had been simplified to the point where superior forces were simply meaningless. Retrogressive game mechanics frankly take the fun out of the game, hobbling momentum play, and turning the whole thing into one big exercise in economy management, with no real point behind military action at all.

                    Moreover, subverting the game mechanics to hobble human players in the face of the AI is terrible for multiplayer. Building a large military in lieu of infrastructure is an enormous risk, and a well prepared defender can stymie huge assaults.

                    So breaking game mechanics to get around a feeble AI is just poor game design. What needs to be done is to program an AI that knows how to terraform its territory, properly divide its attention between military and infrastructure, and prune obsolete units to keep its mineral upkeep in check.

                    With that in mind, there are some changes that should be made to the core mechanics of SMAX:

                    1) Specialists are far too effective. Their total lack of unrest combined with their high, corruption-immune output makes them far too effective compared to actually working tiles. The end effect is to make the control of territory only relevant for food production.

                    2) Crawlers need to cost upkeep while they're working tiles, and there need to be scaling limits to their payload, increasing the mount a single crawler can harvest as you advance in technology.

                    3) Finally, the eco-damage mechanics need to be fixed to block the clean mineral exploit.

                    Those three game features are what allows large, burgeoning empires to virtually ignore the negative side effects in inefficiency and waste.

                    Comment


                    • #11
                      Originally posted by CEO Aaron
                      3) Finally, the eco-damage mechanics need to be fixed to block the clean mineral exploit.
                      Here! Here!

                      This is one of the most obnoxious 'features' of SMAC: you cause ecological damage through wanton polution, get a immune-style reaction from Planet, and then get rewarded by being able to rip more minerals from the ground! The algorithm here is flawed. I suspect that someone neglected a negative sign.

                      Hydro

                      Comment


                      • #12
                        Actually, I think the eco-damage formula may have been tweaked to keep the AI from drowning the planet when it starts to do well. I really doubt the clean mineral formula was intended to decrement, that would rapidly result in drowning from even a modest sized faction with a little eco-damage.

                        Were I to completely re-vamp the eco-damage mechanics, I'd do a few things. First of all, there would be no trance units, and secret projects which increase your psi on attack. Second of all, I'd allow the 8th faction to achieve levels of morale higher than those which can be achieved by the other 7 factions. Third, I'd have a threshold in the fungal pop progression at which the 8th faction's units can immediately move and attack after a fungal pop. Fourth, I'd set the formula such that only active facilities in a base can increase the clean mineral limit for that base, scrapping the facility would lose the bonus. Finally, I'd get rid of global warming altogether.

                        The bottom line would would be that managing your relationship with the third faction would progress from a minor nuisance to a major headache if eco-damage is left unchecked. By beefing up the levels of power that the 8th faction can achieve, and giving them the initiative to cause havok before a player can react, the planet's promise to 'prune some bases' will become a reality.

                        All of this would require serious re-tooling of the kinds of effects pollution management facilities can offer, of course.

                        Comment


                        • #13
                          Finally, I'd get rid of global warming altogether.
                          Spoken like a true capitalist. Why bother with such pesky details....

                          Hah, I'm just joshing you. In reality, I set the global warming ratio to 1/4 in my alphax mod. I always thought it was unrealistic when sea levels were going up by 1500 meters and whatnot. A planet would have to have truly MASSIVE icecaps for that to happen. There should be a cap at 999 meters, which would be annoying enough, especially if you have increased the cost of pressure domes as I have and moved them (along with sea bases) later into the game (super tensile solids, I think...which makes sense, no?) And I've upped the cost on the colony pod equipment in general so that there's no reverse engineering---you either have to use the pre-designed colony pod and sea pod units, or else you pay like 400 minerals for your reverse-engineered sea pod unit. Same thing with the probe equipment---the only three probe units that you can practically build are the regular probe teams (this time with deep radar and SAM capabilities), cruiser probe teams (with same abilities and cheapened beyond what one would normally pay for such a fission-reactor unit), and fusion probe teams, possibly with the algorithmic enhancement special ability---but only if you want to pay about thrice what you pay otherwise.

                          Anyways, back on topic....yeah, enabling native unit pops to attack right away would make ALL THE DIFFERENCE. That would be simply devastating, especially if you gave those popping units that are "being directed by a higher conscience" or whatnot the equivalent of trance and empath and having the two PSI SP's --- +100% attack and defense. That would rock, in my opinion.

                          Another question that I want to ask is: if the source code for SMAC/X were released, we could change these sorts of things, right? These things aren't more hardwired than that, are they? (I'm not sure if there is such a thing as being more hardwired than the source code, but just making sure...and that alone is enough to tell you that unless the source code is as straightforward as alphax.txt or whatnot, I won't be able to contribute much hands-on help to any reprogramming, unfortunately).
                          Last edited by Zeiter; January 18, 2008, 21:18.
                          Civ IV is digital crack. If you are a college student in the middle of the semester, don't touch it with a 10-foot pole. I'm serious.

                          Comment


                          • #14
                            Originally posted by Zeiter
                            Another question that I want to ask is: if the source code for SMAC/X were released, we could change these sorts of things, right? These things aren't more hardwired than that, are they? (I'm not sure if there is such a thing as being more hardwired than the source code, but just making sure...and that alone is enough to tell you that unless the source code is as straightforward as alphax.txt or whatnot, I won't be able to contribute much hands-on help to any reprogramming, unfortunately).
                            With the source code, you'd still be limited by the hardware. E.g. no matter what you did to the source code, you would not get lightening quick responses on a super-large map late in the game unless you really dumbed down the game.

                            For the changes you mentioned (immediate attacks by popping units, enhanced attack and defense for the popping units), those would be reasonably straightforward changes.

                            Making the AI more intelligent would be a lot harder ...

                            Could you post your latest alphax.txt refinements in the AC-Creation forum?
                            Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                            Comment


                            • #15
                              Originally posted by CEO Aaron
                              Finally, I'd get rid of global warming altogether.
                              As it stands, global warming on Planet doesn't make much sense - there simply can't be enough ice to completely inundate so much land.

                              But then other areas don't make sense either. Consider raising and lowering land. Where does the land come from or go? Think of the mass needed to raise or lower an entire sector (whatever area that is) by 1000 meters!! Even assuming some advanced technology the amount of energy and effort needed staggers the mind, and that doesn’t even consider the tiny little problem that the whole idea violates the conservation of matter.

                              Another pet peeve is drill to aquifer. Re-sculpting the land to allow groundwater to form a river or increase drainage where one doesn't already exist is a truly massive undertaking. You can't just drill a hole in the ground and expect enough water to come out to form a river. Moreover, there would be severe ecological and environmental consequences to create the river – the water’s got to come from somewhere, so you’d take it from some other part of the ecosystem.

                              We've put aside these little bits of creativity and flexibility with reality to enhance game play. I'd put global warming in the same category.

                              Hydro

                              Comment

                              Working...
                              X