Announcement

Collapse
No announcement yet.

SMAC 444 (AI experiment)

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

  • #76
    Originally posted by weirwood View Post
    The labs/economy boni you get from them are not subject to inefficiency, and a base where everyone is a specialist won't have drones.
    Yes, but this is a game bug, no? Exploit surely.

    For now, we should focus on the basics. If the AI can get some good balance in early terraforming, that would already be of great help.
    Great. No more crawlers at this point.
    I liked some of your suggestions re:terraforming, as I wrote on codex. I will certainly look into that sensor = no condenser issue you mentioned. That is invaluable point by itself, I wasn't aware of the problem. Please keep making these all important small points and notes on possible AI amendments. My general strategy = lots of nudges to the AI leading to a visible overall improvement.

    One other thing: from the same game I mentioned earlier: Lal was stuck on a small island, barely large enough for 3 bases. But after some attempts to expand were defeated, (he lost a city he had built on the mainland), all he did was build scout rovers - so many that he didn't have and mineral production left due to upkeep.
    There are several hard coded date thresholds, so maybe Lal did cross some of them. No mineral production left is a TOP AI problem on my list. I have located it and I will improve it, be sure.

    HELP list (for those who wish to contribute)
    ----------
    a) Advance terraforming choice algorithm
    b) faction social engineering, short list with ideas for each faction (early, midgame, late game, War options)

    Comment


    • #77
      Probably just a typo on your part, but it's not sensors = no condenser, it's solars.

      One thing that would be important: Can the former check what the surrounding tiles look like? That'd be of great help for some of the terraforming options, especially echelon mirrors, but also aquifiers and boreholes.

      For echelon mirrors, a check would look something like: If 3 or more solars in the surrounding squares, and no more than 1 echelon mirror, build an echelon mirror. Only build them after Environmental Economics have been researched. Raise terrain would also make sense in that location.

      As I said on the codex, I'm not sure if the AI has the same restrictions for constructing boreholes as the player; either way, a check that there is no existing borehole in an adjacent square, and no borehole is currently constructed in one, would be a good idea. The same goes for drill aquifier.

      For the really early terraforming, an important check would be the base's nutrient situation - if there is +3 (or more) nuts, (first worker is on a rainy square, or a nut special) the first terraforming choice should be a forest on an eligable square. If not, it should build a farm on a moist square.

      Solar collectors should have low priority at the beginning. The early game is about minerals and nutrients.

      I think you haven't touched ocean shelf squares. The AI builds a lot of mining platforms, which aren't very efficient. I would restrict construction of those until Advanced Ecological Engineering has been researched. Two kelp/harness squares for every one kelp/platform square sounds like a decent distribution.
      Last edited by weirwood; February 28, 2012, 21:38.

      Comment


      • #78
        Wow I haven't downloaded the improved ai yet but this discussion looks awesome!

        First of all, here's a good link to previous discussion about the poor AI:

        Posts by Ned and Blake(he later would work on civ4 AI modding but has since disappeared from the civ scene) are especially good starting at about post #11.


        I've been interested in improving the AI in SMAC but have nowhere near the programming skills to do this(you're using hex editing to make the changes right?). A few years ago I made a mod using alphax.txt changes and watched a lot of games where the AI plays against itself. My goal was to mod SMACX so that the game's best strategies were the ones that the AI played by. I couldn't change the AI but I could change the game so that the AI's strategies were better. It didn't really work though haha. The best change I made for making the AI better was adding 2 custom units available at the start of the game. Rover Formers with Clean and super former special abilities that cost 1 row and rover colony pods that cost one row. Now the AI expands like crazy and will terraform everything! Its actually kinda tuff to keep up with this AI as long as the player doesn't use these custom units.


        Biggest AI problem, in my opinion: AI too easily goes to war and stays at war for a LONG time. The AI build ques become dominated with military units at the expense of formers and infrastructure buildings. SMAC is about snowballing your economic growth into a huge tech, energy and production lead and the AI just can't keep up with an effective player who sits back while the AI fight among themselves.

        There are HUGE benefits to being friendly with other factions because of the commerce income. I once made a game where I changed every faction to pacifist(like Deidre and Morgan). Every faction ended up friends or pacted and had MASSIVE commerce income. They were getting techs every 3-4 turns unlike my normal games where the AI techs at a rate of every 10-12 turns. Sadly they were too peaceful and never went to war which I guess makes sense for pacifists. In normal games, the AI goes to war and it just builds units and more units. Rarely does it build any infrastructure. I think if you were able to make the AI more peaceful it might take breaks from its never ending wars to build up some infrastructure. Because in the normal game its too easy to develop a tech lead and annihilate the AI's old tech.

        Regarding terraforming: I think the AI's biggest problem in this area is it doesn't construct enough terraformers. Sometimes AI's will go 50 turns without researching centauri ecology too. I'm glad you increased the importance of that tech to the AI already. When the AI does build formers, it only constructs 2-3 formers per base max. Maybe there's a hardcoded limit or a decreasing probability to build a former depending on how many formers the city already has? If the AI were more likely to build formers depending on the number of unimproved tiles it were working I think that would help. Again, if the AI were at peace more often they would make more formers instead of military units.

        Sometimes I'll play a game where the AI has access to Rover Formers with the upgrades Super Former and Clean Reactor that cost 1 row of minerals at the start of the game. The AI terraforms a TON more and builds a few formers per base but not the 100s I make in some of my games. Anyway,

        Regarding forests, if you change the yields of forests to 9/9/9 instead of 1/2/1 the AI will get the picture and ONLY build forests. The AI will respond to the yields of the terrain. I guess what you need to do is tell the AI that forests are amazing early game(highest minerals, and 2 energy with free market). Maybe increase the importance of minerals and energy and decrease nutrients to the AI?

        Regarding boreholes: The AI will build boreholes but only about 1 per city. Rarely they'll build 2 or 3 in a cities radius but they never do the common human strategy of building them in every possible terrain section like this: o=borehole, x= other improvements
        oxoxoxo
        xxxxxxx
        oxoxoxo
        I made a game once where I disabled all terrain improvements but boreholes and gave each city base square +99 nutrients so that food was never a concern. The AI still only built about 1 borehole per city. They also built roads between cities despite my never giving them the road building tech/ability. Thats another subpar strategy the AI does. They prioritize building roads between their cities very early before almost any tile improvements. Sometimes they put their cities very far apart so thats a lot of wasted time moving and building those roads. The AI is missing out on valuable early tile improvements. Maybe add a delay of 10 turns before building those roads so at least a few tile improvements could be made? These small early game changes could turn out to have huge effects on the rest of the game.

        RE Echelon mirrors: I've never seen the AI build a mirror. I don't think they were ever programmed to build them! Maybe teach the AI to make energy farms? Thats a section of territory where there are no cities with improvements like this: E= echelelon mirror, S= solar collector

        EEEEEEEE
        SSSSSSS
        EEEEEEEE

        The bolded solar collectors are making 7 energy per turn assuming no free market and elevation of 0-1000. These are VERY efficient tiles to crawl.

        Or how about: tell the AI to value the option of making a echelon mirror as producing not just the 4 energy but also the energy it adds to the surrounding tiles. If the AI sees that making an echelon mirror in a square is worth 7 energy instead of 4 because there are 3 solar collectors adjacent to the tile maybe it will build it? You could also use this same code to evaluate the effectiveness of building a condenser.


        To answer your 2 requests more directly: This is how I terraform when I play.
        a) Advanced terraforming choice algorithm
        For nutrient specials- Build a forest on the tile. If you have tech for condensers build a farm+ condenser(7 nutrients before soil enrichers -High Priority).
        For Mineral specials- If rocky build a mine on it(7 minerals- VERY HIGH Priority), else just build a forest. If I'm playing with the rule change in alpha.txt that removes the nutrient decrease in mine squares I might build a farm+mine on a rolling square that has a mineral special.
        For Energy specials- I usually don't treat them any differently than normal tiles and I just forest on them. Although maybe I should reconsider if its 3000+ elevation.

        For the early game I want to do everything I can to work 2/2/2 tiles since there are the restrictions on tile yield. Once those restrictions are gone I usually build Boreholes in every possible spot like I listed above. In between the boreholes I'll have forests along with the 2 forest improving buildings in every base(tree farm and hybrid forests). If I'm not feeling lazy I'll turn every forest into a farm+ condenser +soil enricher. If I build bases every other tile like this: B= borehole, F=farm, X=base
        XFXFXFXF
        FBFBFBFB
        XFXFXFXF

        This is super efficient in terms of space. I can get bases up to 15 population with this-(3+6+6)*2 for satellites =30 food. Pop cap is 16 before hab domes anyway with the Ascetic Virtues SP. I crawl the farms and turn every population but the borehole worker into engineers. Each farm supports 6 population in this base which is 6 engineers so each farm is making you 12 science and 18 income before modifiers! That's a very efficient tile!

        Satellites-
        These are ridiculously powerful! I've seen the AI build these on their own but they don't exploit them like humans do. I will beeline nutrient satellites after fusion power and then build as many as my pop cap is ASAP. They DOUBLE the value of nutrients up to the population cap.


        TLDR: Satellites-
        IF # of satellites < Average population of cities THEN satellites = VERY VERY HIGH PRIORITY
        IF # of satellites > Average Population of cities AND # of satellites < Pop Cap THEN satellites=High Priority
        IF # of Satelites > Pop Cap THEN satellites = Very Very Low Priority


        b) faction social engineering, short list with ideas for each faction (early, midgame, late game, War options)

        Generally:

        Peace- Democracy, Free Market, Wealth/Knowledge, Cybernetic/Eudamonia
        War- Police State/Fundamentalist, Anything but Free Market, Power/Wealth(wealth can be okay because of the +1 industry means more units)

        Do not combine Police State and Planned economy unless the faction is the Hive(they ignore the -4 efficiency) ever. -4 efficiency is too much and it cripples your economy and research. A human can get around it by using a specialist economy and crawlers but the AI will probably never be this smart.

        Some special cases

        Hive: Police State,Planned,Wealth : Yang should be using this all the time essentially. Its great for war or building.
        Morgan Industries: War: Police State, Green, Wealth Peace: Democracy, Green, Wealth or Democracy, Free Market, Wealth/knowledge

        The AI does really bad with Free market in war. Also I don't know if the AI knows this but ALL air units count as military units that are out of your territory under -4/5 police.

        ~~~
        I'm sorry this is so long but this is a lot of fun

        Comment


        • #79
          Thank you, Kyrub! I appreciate your efforts. This is good work on AI terraforming. My constructive criticism is this: too many transport foils are produced by Miriam. She built 60 transport foils, dwarfing her combat units 3:1. I will play more games to see if it was a fluke thing. Maybe it had nothing to do with your patch.

          Thanks again. I bet that there are many who care about SMAC for 2013 and beyond, they just don't post here.

          Comment


          • #80
            Originally posted by kyrub View Post
            I think I have found the Talent-facility bug as well. Will be harder to correct, that's sure.
            I know this goes back in the thread a ways, but what is this "Talent-facility bug"?

            (sent you a PM, kyrub)
            Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. - Ben Franklin
            Iain Banks missed deadline due to Civ | The eyes are the groin of the head. - Dwight Schrute.
            One more turn .... One more turn .... | WWTSD

            Comment


            • #81
              Originally posted by TarMinyatur View Post
              Thanks again. I bet that there are many who care about SMAC for 2013 and beyond, they just don't post here.
              Yes, there are. kyrub, any chance you could resume your work? You have an audience at alphacentauri2.info. I PMed you about that.

              Comment


              • #82
                Whoa! Some activity here.

                Originally posted by TarMinyatur View Post
                Thank you, Kyrub! I appreciate your efforts. This is good work on AI terraforming. My constructive criticism is this: too many transport foils are produced by Miriam. She built 60 transport foils, dwarfing her combat units 3:1. I will play more games to see if it was a fluke thing. Maybe it had nothing to do with your patch.
                Hi, TarMinyatur, thanks for your point. Many boats for Miriam are almost certainly an unwanted fruit of the patch. I did try to increase AI see activity. It was relying on AI having naval bases - first I tried to make the production more independent on it, than I found out about the overall inefficiency in naval bases building and I massively improved it. This bumped naval production up. Plus, IIRC, believers have got a special race incline to boats. This combined could have caused the result you have seen.

                There are more than the one side-effect, I am afraid. The most problematic is the "probe-boom". I mechanically increased the likelihood of building speedy units (AI in vanilla massively favors infantry), but I overlooked that probes use the speeder chassis. AIs now overproduce probes, really not nice.

                --------------

                Avalon, Kirov from ac2: thanks for PMs and appreciation for my modest patch.
                First the question:

                Originally posted by Lord Avalon View Post
                I know this goes back in the thread a ways, but what is this "Talent-facility bug"?
                1. The existence of the bug is unsure.
                2. Description of the occurence: you have a facility that adds a talent in the base. Under some special conditions (unknown), the facility seems to fail to add the talent. The bug is VISIBLE on the "detailed psych" display in a city (police, support, psych analysis). Typically, the last two line shows one normal citizen and two normal drones, and no talent is created even when it should occur (as with HG or Paradise garden etc.). I think it was once referred to as Human Genome bug as well.
                3. There are other people who have experienced it, same as me. There was an excellent description of the bug with screenshots on some game forum in a thread named something like "need help with psych". I cannot seem to google it now. That was an excellent example, probably got deleted. Very bad, sorry.
                4. (like 1.) The bug is confusing and its occurrence is erratic. It may be all some type of mismatch. I tried to find it in the code, I thought I had it at the time... now I have zilch, I am not even sure about the existence. I'd need a save with it to put any new effort in it.

                ----

                Then the extra work on the patch and the future:
                Realistically, I don't know. It's been a long time, I have my notes burried on an old computer. To be honest, my motivation is not very strong: I have a nice, nostalgic relation to SMAC, I loved to play the game. But its mechanics are not very original compared to Civ games and some of the new ones are (arguably) very overpowered (free crawlers, choppers, some SPs) or somewhat underwhelming and devoid of real content (psi combat, what a shame).

                My only interest was/is to look at the AI, not the bugs (but only a few people believed there was a real change for good).
                If there is an ongoing interest of bigger group of players to improve SMAC / SMAX AI, I may try to find some time space during next year and make one more attempt. Since SMAC AI is a massive chunk of code, it'd certainly need some assistance in creating new AI conceptions on paper and a lot of patience, before some real fruits occur. This is a bit tempting. -- (Then again, if you google "kyrub", you'll find my name stickied to a number of projects that are *not* progressing. My real life is winning everything lately, the sad truth.)

                Comment


                • #83
                  Reality is a rotten place to be.

                  - from some old hippie movie I saw on late night TV when I was a kid


                  Well, glad you checked in, kyrub.
                  Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. - Ben Franklin
                  Iain Banks missed deadline due to Civ | The eyes are the groin of the head. - Dwight Schrute.
                  One more turn .... One more turn .... | WWTSD

                  Comment


                  • #84
                    Kind of unfair to expect just one person to work on a game if there's not much interest. On that note though, someone has added your patch kyrub to theirs over here alphacentauri2.info/index.php?action=downloads;sa=view;down=121

                    Their forums seem active over the game too alphacentauri2.info/index.php?board=13.0

                    Comment


                    • #85
                      Originally posted by MegaTurtleRex View Post
                      Kind of unfair to expect just one person to work on a game if there's not much interest. On that note though, someone has added your patch kyrub to theirs over here alphacentauri2.info/index.php?action=downloads;sa=view;down=121

                      Their forums seem active over the game too alphacentauri2.info/index.php?board=13.0
                      It would be unfair, which is why I specified that there is pretty big interest (well, as big as you can get for SMAC in 2013) over ac2, along with help from other players and modders.

                      Comment


                      • #86
                        I suppose though, a bit of nerve stapling might be ok

                        Comment


                        • #87
                          I find it odd that people seem to care less about the AI enhancement. Everybody is gung ho about new modding variants and "tons of" new content, usually. When it comes to: "Does the game represent bigger challenge for me?", silence.

                          I have had even negative reactions to Master of Magic patch, that clearly raises the game level of AI, some people dislike the extra challenge and they are reluctant to turn down the game difficulty level ("come on, I have always beaten it on impossible"). We laugh at bad AIs, but in fact, we need them to feel like the big winners at the end.
                          Really strange.

                          Comment


                          • #88
                            Originally posted by kyrub View Post
                            I find it odd that people seem to care less about the AI enhancement. Everybody is gung ho about new modding variants and "tons of" new content, usually. When it comes to: "Does the game represent bigger challenge for me?", silence.
                            I hear you because for me it's the contrary. I stopped playing SMAC somewhere in 2007, when everybody move to Civ4 and I was soo bored with AI. You think for hours about how to give the AI something that pretends to be a sliver of chance just for a couple of turns. One city challenge, self-imposed limitations, pre-made scenarios, switch side challenges... Nothing really works, AI is always bound to lose. Well, of course you can't really win the switch side challenge, but when you play it and you switch for the second time like in 2200 to Hive or Miriam and they have 1 (!) base, the other colony pod is stuck somewhere helplessly in fungus, no Centauri Ecology is researched, the HQ support is stuck by several laser squad units... It makes me cry.

                            Comment


                            • #89
                              Crawlers

                              Originally posted by kyrub View Post

                              Great. No more crawlers at this point.

                              ...My general strategy = lots of nudges to the AI leading to a visible overall improvement.

                              HELP list (for those who wish to contribute)
                              ----------
                              a) Advance terraforming choice algorithm
                              b) faction social engineering, short list with ideas for each faction (early, midgame, late game, War options)
                              The game is more challenging without crawlers. But I do like the idea of convoying resources...

                              Could each crawler require a specialist citizen ("convoy engineer")?

                              If there's a great tile outside of my city, I think I should be able to harvest it if I make appropriate investments in equipment and labor.

                              I'm thinking that each city might have one or two crawlers, not dozens.

                              This might be really tough to code...just an idea. I'd love to see Yang come into my territory with an escorted crawler and begin harvesting "my" farms for the good of his collective.

                              Comment


                              • #90
                                Originally posted by TarMinyatur View Post
                                I'm thinking that each city might have one or two crawlers, not dozens.
                                The AI actually has an internal cap on crawlers, max 1 per city. This would be doable and it's a very simple and good idea, IMO. But I am not specialized in modding. Go to ac2 forum and ask Yitzi, he could help you.

                                Comment

                                Working...
                                X