Announcement

Collapse
No announcement yet.

Exciting AI improvements.

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

  • I played a whole noble game with this mod (well at least to the point where my tech and land lead was a sure victory).

    Here are the things that I've noticed:
    • The AI had a lot more commerce. About 2 to 3 times as much. As result is was a lot less easy to get a tech lead.
    • The AI fought more wars between each other (without me being the cause ) I had aggressive AI turned on. There were 2 situations where an AI practically had beaten another. However it just kept pillaging and pillaging but didn't take any cities. All the other AI had left were city defenders. But instead of bringing in some siege weapons to finish the job, they made peace .
    • An AI nearly pulled of the CS slingshot at 500 bc. It had the code of law and the oracle. It just didn't choose civil service.
    • Nearly no outdated AI units.
    • Automated workers were actually usable.
    • Generally a lot less wonders were build. For example the pyramids were at 1300 ac and the pantheon wasn't even build at all. Grabbing wonders has become a lot easier for the player.
    • No AI ever declared war on me.

    I think that the game would really have gotten interesting if those 2 AI had actually conquered their neighbours and incoporated the new cities into their economy.

    The AI is improved a lot and I'm sure that people will have to step down at least one level to still win. Good work.

    Comment


    • Deleted.
      LandMasses Version 3 Now Available since 18/05/2008.

      Comment


      • Originally posted by ben04
        I played a whole noble game with this mod (well at least to the point where my tech and land lead was a sure victory).

        Here are the things that I've noticed:[list][*]The AI had a lot more commerce. About 2 to 3 times as much. As result is was a lot less easy to get a tech lead.[*]The AI fought more wars between each other (without me being the cause ) I had aggressive AI turned on. There were 2 situations where an AI practically had beaten another. However it just kept pillaging and pillaging but didn't take any cities. All the other AI had left were city defenders. But instead of bringing in some siege weapons to finish the job, they made peace .
        Ah yes the infamous pillaging. Soon my friend I shall teach the AI's not to pillage. heck, maybe I'll just revoke their pillaging rights altogether and see what happens.

        AI: You can't do that! I'm the AI! I *define* myself by my pillaging! If you take away my pillaging I am nothing!

        * Blake writes the code and hits enter (laughing maniacally).

        AI: Noooooooooooooooooooooooooooooooooooo.ASDF



        Note: I might
        [*]An AI nearly pulled of the CS slingshot at 500 bc. It had the code of law and the oracle. It just didn't choose civil service.
        Hmmm AI's don't value CS that highly. I might tweak the "free tech" code to encourage them to choose better things.

        [*]Nearly no outdated AI units.[*]Automated workers were actually usable.
        If you want to share more of your experience with automated workers then feel free to - I've only observed them in the hands of the AI.

        [*]Generally a lot less wonders were build. For example the pyramids were at 1300 ac and the pantheon wasn't even build at all. Grabbing wonders has become a lot easier for the player.
        I believe my new AI governor code introduces a bug of sorts into the wonder-selection code - in short the AI is more prone to build wonders in bad cities - like because it's best city is maxing food to grow to caps, it chooses the *current* best hammer city which might be some lame size 2 city...

        [*]No AI ever declared war on me.
        This might have just been by chance.


        In other News:
        I'm playing a Highlands atm (Monarch difficulty) and am having trouble keeping up in tech - but it seems more natural than vs like an emperor AI, like I catch up but then the AI's pull ahead again.
        I noticed a weird thing with AI Tokugawa not running H.Rule despite the fact it is free to run as such I'm going to tweak the civic selection code.

        The Civic code is a little weird...

        For example. Slavery is valued at a flat "+5" per city, Caste Sytsem is valued at a flat 3 + 1 per City. As such caste system is never more valuable than slavery (hey check it out! The code acutally gives the correct result despite being borderline nonsense!)


        Labor Civics:

        SLAVERY: 6 * City_Count
        SERFDOM: 12.5 * Worker_Count
        CASTE SYSTEM: 3 + City_Count
        EMANCIPATION: 2 * City_Count + 40 * Other_City_Count

        Serfdom is more valuable than Slavery if there are more than about 2.1 workers per city.

        Caste System has such a small value it never gets used.

        Emancipation has such a huge value it always gets used.

        The value of Caste System (if indeed it has any) is really in the synergy with Rep and Merchantalism. The Labor column looks "Good Enough" but I may try to add Caste-Synergy understanding.


        Goverment Civics:

        HRULE: Total_Population * 0.2
        REP: 12 * City_Count (up to max # cities effected) + Total_Population * 0.5
        POLICE: Wartime: 5 * City_Count (Units) + 2.5 * City_Count (WW).
        POLICE: Peacetime: 1.25 * City_Count (Units) + .5 * City_Count (WW).
        US: 3.3 per Town + 8.3 per City_Count (16.7 if avoiding science).

        HRule is valued very, very lowly (really I should add one of those long very very very chains to indicate just how lowly it is valued) - it has the dubious honor of being valued lower than police state in peacetime if cities are smaller than size 9.
        Rep is twice as valuable than HRule just from the specialist effect, the happy effect is smaller - but the value from the happy effect alone means you need a population of 360 for HRule to be more valuable. Rep value is not based on specialists themselves.
        Police State is always worth less than US and usually worth less than Rep. In wartime it's worth more than HRule.
        US is worth more than Rep under most cases and is always worth more than the other two civics.


        The goverment column essentially uses this logic:

        US > Rep > Police State > HRule.
        There are two glaring flaws:
        HRule is less valuable for empires with small cities - in reality it's most useful for small empires (ie should be based on city count rather than population), HRule is so worthless the AI might not see it as worth the Anarchy.
        Police State is always less valuable than US regardless of *anything*.

        On the whole AI leaders choose goverment civics according to hard-coded preference, but clearly those oddballs like Toku and Mansa Musa get to be confused and misled.

        My changes:

        HRULE: City_Count * 8
        REP: 10 * City_Count (up to max # cities effected) + Total_Population * 0.2
        POLICE: Wartime: 5 * City_Count (Units) + 5 * City_Count (WW).
        POLICE: Peacetime: 5 * City_Count (Units) + 1 * City_Count (WW).
        US: 1.1 per Town + 4 per City_Count (8 if avoiding science).

        Now a civ needs to have, on average, at least 4 towns per city for US to beat HRule.
        I intend to add a synergy to Rep for Merchantalism understanding (problem: the AI switching to both at once)
        However HRule is extremely useful to the AI's with thier large garrisons so it doesn't hurt to have it just generally highly rated.

        Comment


        • Originally posted by Blake Ah yes the infamous pillaging. Soon my friend I shall teach the AI's not to pillage. heck, maybe I'll just revoke their pillaging rights altogether and see what happens.
          As far as I'm aware AI goes to pillage mode when he things his forces are too weak for conventional city taking, so he seens guerrila war as best option.

          Maybe just a bit playing with threadsholds will help...

          Comment


          • Curious about the city placement code that you've written - does it affect initial settler placement or is that a seperate function?
            Last edited by Thedrin; October 8, 2006, 03:16.
            LandMasses Version 3 Now Available since 18/05/2008.

            Comment


            • Bug

              Found a bug:
              Load the save game I attached. Found the city on the spot where the only settler is (near the right side of the map). The game will crash to the desktop. By uninstalling your mod the problem does not occure.

              The problem does also occure when using other spots where the city fat cross goes out of the map.

              Probably when you tweaked the empazise buttons you are considering the whole city fatcross and forgot to check if all those fields are on the map and are producing a segmentation fault.
              Attached Files

              Comment


              • heh. I was wondering how long it'd take someone to find that crash. I found it about an hour after uploading the mod *sinister laugh*.

                Here is the very latest version.

                AI Pillaging is disabled in this version! Please observe the AI behaviors in war, especially AI vs AI wars. Something especially interesting would be if one AI can steamroll another. To make it clear - no pillaging at all is just a testing thing, to see what the AI's can do when not getting distracted by the pillage, pillaging will return in a reduced form.

                This version has adjusted the weighting of all civics to hopefully make the AI use them more often and more appropriately. The only one they'll never run is Caste System (since it's useless).

                The AI should be quite a bit happier to run Nationhood and use it as the default over Vassalage once it has it. Unless it has an unusually large empire.

                CIV1.61_IMPAI_0.6t_NoPillage.zip
                NOTE: AI Pillaging is disabled in this version! This is for testing/observation purposes and not a permanent change.

                EDIT: New DLL up. Now 95% crash-free (or your money back).
                Last edited by Blake; October 8, 2006, 16:50.

                Comment


                • Your last version always crashes for me when I finish turn 1.

                  Comment


                  • I added some really simple code to the civics value to compare the value of the capital so the +50% bonus is more accurately assessed. The problem appears to be that it doesn't work too good if there is no capital .

                    Comment


                    • Originally posted by Thedrin
                      Curious about the city placement code that you've written - does it affect initial settler placement or is that a seperate function?
                      I didn't see this earlier.

                      Yes it does, but minimally so. The start position should take into account things like freshwater lakes an will start you on a resource, but I didn't change code which dealt exclusively with start position value.

                      Comment


                      • Continuing to follow this thread for the patch...
                        So what are your changes to the legal column?
                        And are the above changes to the government column the only other civic value changes?

                        Comment


                        • I'm just finishing up a very detailed analysis of all the civics weightings.

                          Comment


                          • Blake - I'm very impressed by your efforts and glad to see that they may be picked up by Fireaxis.

                            I wonder to what extent your improved evaluation functions are "hard wired" in the code - or to what extent they can be modified using parameters in the XML?

                            RJM
                            Fill me with the old familiar juice

                            Comment


                            • I've played about half a dozen games on IMP v0.5 and it seems to have improved the AI hugely. The last game I had a lonely island start and by the time I met the AI around 1000AD, Izzy was on top. This is huge as she generally collapses in the vanilla mid-game.

                              One thing that doesn't seem to be working (but I need to add spies to confirm) is whipping defenders. I had a couple of situations where I'm fairly sure the AI could have whipped a decent defender (Longbow/Axe) and didn't.

                              Comment


                              • This looks like a great mod...

                                I didn't read the whole thread, is it still only avaliable for the last Civ4 patch, or does it work with Warlords?
                                This space is empty... or is it?

                                Comment

                                Working...
                                X