Announcement

Collapse
No announcement yet.

AI Stupidity - not quite a bug, but really weak

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

  • AI Stupidity - not quite a bug, but really weak

    We all know about part of this one.
    The AI should never irrigate Bonus Grassland under Despotism. They lose worker turns AND production. Soren fixed this in PtW, and it's mentioned in the bug thread, IIRC, so maybe this will get refixed.

    The other part - well, parts, really, just astound me.
    1) A sole citizen working a 1-food tile. Unless he's in serious hock on a gpt deal to another AI, this is double-plus-ungood. Even then, surely he could find a single gpt somewhere else, no? Switching to one of the roaded, riverside tiles will pick up two of those gold, and had the BG tiles been mined, he would gain 1 food and maintain shields.
    2) Growth to size 2 in 5 turns paired with a settler build complete in 5 turns. This one I've seen in several other games, where the AI is going to finish a settler and have to wait for +10 food to build up for pop-growth. No wonder he's growing so slowly.

    (I would have put this in the bugs thread, but it's not really a bug, per se, just funky AI behavior.)
    Attached Files
    "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

  • #2
    The reason behind the above behavior is that the AI usually wants to maximize shield/commerce output and keep at least a +2 food surplus. That's what it's doing in the example above.

    Given the AI happiness problems, growth at just +2 food is not a bad idea, although in this case (producing a Settler), it sure seems silly!

    Comment


    • #3
      I agree that +2 food is normally more than the AI can handle, happiness-wise, but he's wasting 10 turns here. Also, working a mined BG instead of forested silks, he could grow in 7 instead of 10 since he's Ag. But that's getting rather obscure. The main point is, he'll be doing nothing but collecting food and wasting shields for at least 10 turns after he grows in 5. If he was working on anything besides a settler, I wouldn't even have posted this.

      And he cuould get the same shields and one less commerce if Soren's mining vs. irrigating fix from PtW was pt back in. It seems minor, but when the player can crank out a settler every 4 turns(on this map), an AI wasting 10 turns(and while trying to build the pyramids in another of his cities) is a serious setback for him.
      "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

      Comment


      • #4
        The algorithm that selects the Laborer assignments for a city and the algorithm that select the build items do not communicate. Us humans have the advantage of tailoring our tile output to fit our strategy (production, research, or otherwise), while the AI simply plays out what's best in the average case every time.


        Dominae
        And her eyes have all the seeming of a demon's that is dreaming...

        Comment


        • #5
          Originally posted by Dominae
          The algorithm that selects the Laborer assignments for a city and the algorithm that select the build items do not communicate. Us humans have the advantage of tailoring our tile output to fit our strategy (production, research, or otherwise), while the AI simply plays out what's best in the average case every time.


          Dominae
          But the algorithm for build tasks should check to see that food would be available before building settlers and workers. Look at this, the AI will lose at least 5 turns of production to produce the settler simply waiting for the city to grow to size 3.
          * A true libertarian is an anarchist in denial.
          * If brute force isn't working you are not using enough.
          * The difference between Genius and stupidity is that Genius has a limit.
          * There are Lies, Damned Lies, and The Republican Party.

          Comment


          • #6
            Perhaps Montezuma should read the, "Ducki Does C3C at Emperor" thread on Apolyton. He could then learn all about 'pumps' and be able to give those pesky Japanese to his NothWest a real hurtin'.

            As it is (even w/o the Oracle), I forsee a probability of Samurai in Tenochtitlan and Teotihuacan in the next age.

            Steven
            Last edited by steven8r; January 12, 2004, 14:26.
            "...Every Right implies a certain Responsibility; Every Opportunity, an Obligation; Every Possession, a Duty." --J.D. Rockerfeller, Jr.

            Comment


            • #7
              simply waiting for the city to grow to size 3.
              MB - Actually, he's going to lose 10 turns if I've calculated correctly. The town is currently size 1 and the settler will finish shield-wise the same turn the town hits size 2. He's running +2fpt, and let's assume he'll keep it at +2fpt once he hits size 2 in 5 turns - which leaves him 10 turns away from size 3 when the settler can finally complete.

              Doing some quick mental math, it seems like the AI is trading 40 gold for 40 shields with the "maximize commerce and production" orders - he gets 40 extra gold from start to finish and wastes 40 shields(not to mention precious time). Is my math correct?
              If so, is 40 gold worth 40 shields?


              Edit: An AI that can 4-turn pump? Eek! Scary! I'd be happy if they mined Bonus Grassland under despotism and didn't spin their wheels on settlers when short on pop units like this. No wonder I'm covering him like kudzu, and yes, he's going to learn not to like the Samurai as soon as Chivalry comes online. Until them, I'll let him live and perhaps build me a wonder and some roads.
              "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

              Comment


              • #8
                Interesting discussion.

                I think a limitaiton here though is that if these algorithms must communicate, they must do so for every AI city every turn. Performance could take a hit.

                A solution might be a staggered system where only say 10% of the cities do this and it rolls through the list, effectively giving AI cities a 'review' of its food/shield allocation every few turns.

                Alternatively, I was thinking a new set of strategies should be programmed into the AI so that the AI can shoot for a shield city, or a food city and stick with it, based on some calculation of the terrain features when a city is first plopped down. But im not sure how feasable this is.
                AI:C3C Debug Game Report (Part1) :C3C Debug Game Report (Part2)
                Strategy:The Machiavellian Doctrine
                Visit my WebsiteMonkey Dew

                Comment


                • #9
                  I don't think there would be that much of a CPU hit if the build queue algorithm did something like
                  if(city_size < 2 && build_queue = 'Settler') {
                  ChangeBuildQueueFromSettler();
                  }

                  I'm not looking for complex decisionmaking that would enable a settler pump. I'm looking for the AI to say "am I wasting shields/turns? how many?" and if it's above a given threshold, change the queue.

                  There doesn't need to be two-way communication.
                  Let the governor continue to assign tiles like he does, just make him check the estimated build time against the estimated time-to-growth-to-build-pop-cost +1.

                  No MM, no tile-assignment mods.
                  Just minimize wasted turns and wasted shields beyond a given threshold. Even I will waste a turn or two on occasion, but never more than 2.

                  At a time when growth is so important, 10 (wasted) turns is an eternity even without a human using a pump.
                  "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

                  Comment

                  Working...
                  X