Announcement

Collapse
No announcement yet.

AU mod: How to help the AI with research choices

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

  • AU mod: How to help the AI with research choices

    The Problem:

    While the AI’s research priorities are not terrible, there is some room for improvement, and they are certainly predictable. As an example of a better research choice, the AI could benefit from researching Scientific Method at a higher priority. But the real problem is that the human can bet on the fact that the AI is very likely to research certain technologies (e.g. Bronze Working) so that he can research other technologies left by the AI until late in the era (e.g. Polytheism), in order to get maximum trade value from his research.

    The good news is that it’s possible to use the editor to make the AI emphasize different technologies than it already does. And now, in C3C, it’s possible to use flavors to influence different civilizations to research different technologies. This not only can encourage AI civilizations to take better advantage of their traits, it can also make the AI less predictable in its research.

    Possible Solutions

    The PTW version of the AU mod used technology properties of prerequisites in order to increase the AI value of Code of Laws, Literature, Republic, Electricity, Atomic Theory, Radio, Nuclear Power, Electricity, Polytheism, and Medicine.

    For C3C, as a start, I suggest the use of prerequisite properties (e.g. giving military alliances to the Republic) and flavors to increase the value of these technologies:

    Literature, Republic, Currency, Engineering, Medicine, Electricity, Scientific Method, Atomic Theory, Electronics, Sanitation, Fission, Ecology

    Technologies that require a decrease in AI value might be:

    Replaceable parts, Communism, Fascism, Espionage

    In addition, we can use flavors to make the AI diversify its research, and take advantage of its traits:

    Scientific flavor: All scientific civilizations. Beelining for Literature in Ancient age, and for Education in Medieval Age. Scientific flavor techs:
    - Alphabet
    - Writing
    - Literature
    - Monotheism
    - Theology
    - Education
    - Computers

    Religious Flavor: All Religious civilizations. Beeline for Monarchy in Ancient Age, since with Ceremonial Burial they need one fewer tech to reach it, and they can quickly switch out of it once they eventually obtain the Republic. Give the Oracle a Religious flavor so other civs don't go after it so eagerly. Beeline for Theology in Medieval Age. Religious flavor techs:
    - Mysticism
    - Polytheism
    - Monarchy
    - Monotheism
    - Theology
    Religious flavor building:
    - The Oracle

    Seafaring Flavor: All Seafaring civs. Aim for techs that allow new ships and coastal installations. Seafaring flavor techs:
    - Writing
    - Pottery
    - Map Making
    - Monotheism
    - Theology
    - Education
    - Astronomy
    - Navigation
    - Magnetism
    - Steam Power
    - Ironclads
    - Mass Production
    - Computers
    - Miniaturization

    Militaristic Flavor: All militaristic civs. Emphasize Chivalry and beeline for Military Tradition. Flight for cheap airports. Map Making is already a high AI priority, and so are the techs that allow ancient units. Militaristic flavor techs:
    - Feudalism
    - Chivalry
    - Engineering
    - Invention
    - Gunpowder
    - Chemistry
    - Metallurgy
    - Mil. Tradition
    - Flight
    - Ecology
    - Synthetic Fibers

    Generic Flavor: Since we can't make techs and buildings more valuable, the thing to do would be to create a 'generic' flavor, which would be assigned to every civ that doesn't have any of the other flavors. This flavor would also be assigned to all techs, even those that already have an assigned flavor. The relationship of the generic flavor to all other flavors, including itself should be 50%. If all techs have 50% less value, they will all actually have the same chance of being researched as before, so that makes it possible to give non-generic flavor techs an extra value (anything above 50%) to non-generic flavor civs.

    High Priority Flavor
    Sometimes, the prerequisite property approach is not enough to make the AI emphasize a technology or branch enough. We can use this ‘high priority’ flavor, which will have a higher relationship than 50% to all other flavors, and will be used instead of the ‘generic’ flavor for technologies that we deem necessary for an AI value increase.

    Low Priority Flavor
    Similarly, we can use a ‘low priority’ flavor, which will have a lower relationship than 50% to all other flavors, and will be used instead of the ‘generic’ flavor for technologies that we deem necessary for an AI value reduction.

    Please comment on the above, and provide your own ideas or areas where the AI research choices need improvement!

  • #2
    Background Information

    Originally posted deep inside another thread in the Strategy Forum

    The AI places a value on each technology it can research next. The values depend on the various things allowed by each technology, as well as on the turns needed by that AI civ to complete the research. The higher the value, the more likely it is for the AI to research that technology. Here are the values:

    SS Component: 261/turns
    Government: 259/turns
    Conscription: 259/turns
    Mobilization: 259/turns
    Defender (resource reqd): 198
    No trade: 149/turns
    Attacker: 134
    Defender (no resource reqd): 70
    Naval Transport: 34
    Resource (lux, strat, bonus): 16
    Double Worker Speed: 8
    Allows Diplomats: 8
    MPPs: 8
    ROPs: 8
    Alliances: 8
    Embargoes: 8
    Trade Over Ocean: 8
    Wonder: 6
    Irrigation: 4
    No Disease: 4
    Trade Over Sea: 4
    Bridges: 2
    Double Wealth: 2
    Map Trades: 2
    Communications Trade: 2
    Small Wonder: 2
    Specialist: 2
    Unit (no A/D/NT): 2
    Improvement: 2
    Recycling: 1
    Prec. Bombing: 1
    Worker Job: 1
    Other Tech: 1
    Bonus Tech: 0
    Reveal Map: 0
    Sacrifices: 0
    Empty Tech Cost: 256/turns
    Optional: divide by 1.5

    These values are cumulative. For example, Iron Working allows swordsmen and iron, so it has a value of 22 more than if it were just an empty tech. Furthermore, for the Romans who build Legionaries (attacker and defender), Iron Working is worth an additional 70 points!

    When playing the game, you don't know exactly the value of each technology because you don't know how many turns it would take the AI to complete it. However, you can often estimate that number based on your own research.
    Last edited by alexman; December 12, 2003, 11:21.

    Comment


    • #3
      Oh man, where to start... First of all, thanks for finally opening up this thread, Alexman! I've been waiting for it for quite a while.

      Do you happen to have the values calculated for every tech in a spreadsheet somewhere that you could share with me? I was going to create my own spreadsheet but thought it would be *much* faster if you already had one and could post it in this thread or e-mail it to me. I'd be happy to help iron out the specific numbers to get the civs to do what we want them to do when the time comes for their "tweaking."

      Comment


      • #4
        If only we could modify those values...

        The flavors thing. From what I understand, everything can be assigned one or more flavors (including civs). Each flavor has some % associated with it. Civs that don't have Flavor A are % times as likely to research a tech with Flavor A flagged. AFAIK, no one is quite sure how flavors stack. I suggest that each trait except one (I don't know which) get a flavor - the "not this trait" flavor. Every civ that isn't Seafaring, for example, is flagged with the "Not Seafaring" flavor. All of techs that AREN'T what a seafaring civ wants to research (or aren't units it wants to build) are flagged with this Flavor. Thus, it only affects Seafaring civs and doesn't accidentally overlap with something else to produce strange results.

        Comment


        • #5
          I see no problem with the AI prioritizing Replaceable Parts. That's the one tech you do not want it to get in the Industrial era.

          I understand that it's "secondary" to the Theory of Evolution beeline, but it should still rank up there as a must-have for the AI.


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

          Comment


          • #6
            Re: AU mod: How to help the AI with research choices

            Originally posted by alexman
            The Problem:

            Possible Solutions

            The PTW version of the AU mod used technology properties of prerequisites in order to increase the AI value of Code of Laws, Literature, Republic, Electricity, Atomic Theory, Radio, Nuclear Power, Electricity, Polytheism, and Medicine.

            For C3C, as a start, I suggest the use of prerequisite properties (e.g. giving military alliances to the Republic) and flavors to increase the value of these technologies:

            Literature, Republic, Currency, Engineering, Medicine, Electricity, Scientific Method, Atomic Theory, Electronics, Sanitation, Fission, Ecology
            Literature - I can see the value in increasing this, but only significantly for scientific tribes. Once they get it first, they'll probably trade it away to everybody else eventually so this would provide them with a slight jump start on libraries and The Great Library.

            Currency - Same argument, but for commercial tribes.

            Engineering, Fission - Is this just to stimulate the AI into researching techs down this branch once the more important techs are out of the way? If so, then I'm all for that. Just make sure that they don't take priority over Monotheism/Feudalism, Rocketry/Recycling/Computers, since those techs shouldn't take priority over these necessarily, but they should provide a good choice between researching, say, theology before engineering every game.

            Medicine, Scientific Method, Atomic Theory, Electronics, Sanitation - It looks like the problems with these techs might be addressed by changes in other threads (Giving Longevity to Sanitation) or by other means (devaluing Communism/Espianoge/Fascism) so we may not need to actually increase these techs as it may be taken care of by other fixes.

            Technologies that require a decrease in AI value might be:

            Replaceable parts, Communism, Fascism, Espionage
            What am I missing that makes it not a good thing to research Replaceable Parts at high priority? Is it soley the ToE --> Hoover bee-line or am I missing something else?

            Scientific flavor: All scientific civilizations. Beelining for Literature in Ancient age, and for Education in Medieval Age. Scientific flavor techs:
            - Alphabet
            - Writing
            - Literature
            - Monotheism
            - Theology
            - Education
            - Computers
            I don't think that forcing the AI to go to a certain tech is the best idea. I think it would be alright if given a choice they will always research their desired tech (Computers/Education/Writing), but I really only want a slight nudge towards the techs that precede these. 100% AI predictability is an exploit.

            Religious Flavor: All Religious civilizations. Beeline for Monarchy in Ancient Age, since with Ceremonial Burial they need one fewer tech to reach it, and they can quickly switch out of it once they eventually obtain the Republic. Give the Oracle a Religious flavor so other civs don't go after it so eagerly. Beeline for Theology in Medieval Age. Religious flavor techs:
            - Mysticism
            - Polytheism
            - Monarchy
            - Monotheism
            - Theology
            Religious flavor building:
            - The Oracle
            Same argument here as for scientific civs, but I'd like to see a harder push towards monarchy and Theology than just a slight nudge. These are easier to get to than Education, and provide bigger benefits to the tribe than libraries do. Definite good idea with The Oracle as this is overbuilt by all tribes as it is.

            Seafaring Flavor: All Seafaring civs. Aim for techs that allow new ships and coastal installations. Seafaring flavor techs:
            - Writing
            - Pottery
            - Map Making
            - Monotheism
            - Theology
            - Education
            - Astronomy
            - Navigation
            - Magnetism
            - Steam Power
            - Ironclads
            - Mass Production
            - Computers
            - Miniaturization
            This is a lot trickier as seafaring already builds enough ships as it is. I'm leary about making them build more ships as this would take away from ground troops. I'll have to look at this a little bit more in depth as I don't have the time for it at present.

            Militaristic Flavor: All militaristic civs. Emphasize Chivalry and beeline for Military Tradition. Flight for cheap airports. Map Making is already a high AI priority, and so are the techs that allow ancient units. Militaristic flavor techs:
            - Feudalism
            - Chivalry
            - Engineering
            - Invention
            - Gunpowder
            - Chemistry
            - Metallurgy
            - Mil. Tradition
            - Flight
            - Ecology
            - Synthetic Fibers
            These might actually all be good ideas since military civs really *need* these techs to really exploit their trait. Plus, it might make them a lot more competitive as they start to resemble the human. This is the tribe trait that I'm more likely to agree with making them always go this way, but I'm still apprehensive about the AI becoming too predictable.

            Generic Flavor: Since we can't make techs and buildings more valuable, the thing to do would be to create a 'generic' flavor, which would be assigned to every civ that doesn't have any of the other flavors. This flavor would also be assigned to all techs, even those that already have an assigned flavor. The relationship of the generic flavor to all other flavors, including itself should be 50%. If all techs have 50% less value, they will all actually have the same chance of being researched as before, so that makes it possible to give non-generic flavor techs an extra value (anything above 50%) to non-generic flavor civs.

            High Priority Flavor
            Sometimes, the prerequisite property approach is not enough to make the AI emphasize a technology or branch enough. We can use this ‘high priority’ flavor, which will have a higher relationship than 50% to all other flavors, and will be used instead of the ‘generic’ flavor for technologies that we deem necessary for an AI value increase.

            Low Priority Flavor
            Similarly, we can use a ‘low priority’ flavor, which will have a lower relationship than 50% to all other flavors, and will be used instead of the ‘generic’ flavor for technologies that we deem necessary for an AI value reduction.
            These all sound like good ideas and we can tweak some of the numbers and specifics later.

            I'd also like to make it that certain tribes are less likely to trade some of their important techs (Scientific - Literature for example). Maybe there is some trick we could use to make them real pricey to just these tribes so that if they do sell them, they'll get a good deal in return. I don't think that you can flag techs as being untradable just for certain tribes in the editor.

            Comment


            • #7
              Originally posted by skywalker
              If only we could modify those values...

              AFAIK, no one is quite sure how flavors stack.
              All flavor values are averaged when there are multiple flavors involved.

              Comment


              • #8
                Oh.

                Comment


                • #9
                  High, generic (medium), and low... brilliant and elegant.

                  Those will make all of this work.
                  The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

                  Duas uncias in puncta mortalis est.

                  Comment


                  • #10
                    Originally posted by donZappo
                    Do you happen to have the values calculated for every tech in a spreadsheet somewhere that you could share with me?
                    I'm attaching the one I have been using, but I'm warning you that I'm no excel expert.

                    Enter an average number of turns at the top. Every level of the tech tree is assumed to have that average. Obviously, this is not perfect because the ancient age takes in general more turns than the late game, but you can adjust the average and see how the values are affected by era.
                    Attached Files
                    Last edited by alexman; December 9, 2003, 19:07.

                    Comment


                    • #11
                      Originally posted by Dominae
                      I see no problem with the AI prioritizing Replaceable Parts.
                      The only problem is that it's predictable. Replaceable parts have three times the value of Nationalism for the AI? It wouldn't hurt if an AI actually didn't research RP once in a while.

                      Comment


                      • #12
                        Re: Re: AU mod: How to help the AI with research choices

                        Originally posted by donZappo

                        Currency - Same argument, but for commercial tribes.
                        I don't see any reason why Commercial tribes should prioritize currency more than other tribes. Am I missing something?

                        Engineering, Fission - Is this just to stimulate the AI into researching techs down this branch once the more important techs are out of the way? If so, then I'm all for that.
                        Yes, these techs have a much lower AI value than the other 1st level techs of their era.

                        Medicine, Scientific Method, Atomic Theory, Electronics, Sanitation - It looks like the problems with these techs might be addressed by changes in other threads (Giving Longevity to Sanitation) or by other means (devaluing Communism/Espianoge/Fascism) so we may not need to actually increase these techs as it may be taken care of by other fixes.
                        Very true. Flavors should be fine-tuned after all other changes to the mod affecting research choices.

                        Comment


                        • #13
                          I think it's relevant to this thread to mention a huge change that happened with C3C: the AI values techs that give offensive units that require resources much higher now.

                          So Iron Working, the Wheel, Horseback Riding, Chivalry, Gunpowder, Feudalism, Military Tradition, Flight, Motorized Transportation, et cetera, all got huge boosts in value for the AI, compared to PTW.

                          Edit: Nevermind. My test for C3C was flawed. It's as before. No change from PTW.
                          Last edited by alexman; December 9, 2003, 19:08.

                          Comment


                          • #14
                            Originally posted by alexman
                            I think it's relevant to this thread to mention a huge change that happened with C3C: the AI values techs that give units that require resources much higher now.

                            So Iron Working, the Wheel, Horseback Riding, Chivalry, Gunpowder, Feudalism, Military Tradition, Flight, Motorized Transportation, et cetera, all got huge boosts in value for the AI, compared to PTW.
                            Yeah, I was just noticing that. I had put your old numbers in a spreasheet earlier and just noticed how different these values are from the old values! I'm surprised that they changed some things around so much, actually. Thanks for the spreadsheet, by the way. You saved me a good hour (at the very least) of mindless excel FUN!

                            Comment


                            • #15
                              Re: Re: Re: AU mod: How to help the AI with research choices

                              Originally posted by alexman

                              I don't see any reason why Commercial tribes should prioritize currency more than other tribes. Am I missing something?
                              Sorry, my mistake. For some reason when writing that response I thought that commercial got half-cost marketplaces when this obviously not the case. Considering my favorite tribe to play is Korea I can't believe my mind betrayed me like that!

                              Comment

                              Working...
                              X