Announcement

Collapse
No announcement yet.

AU mod: How to help the AI with research choices

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

  • #46
    I did some simple tests to get a feel for the effect of flavors on the AI trade value.

    A tech that is traded to the AI for 241g without flavors, is traded for the following amounts with flavors:
    Code:
    Flavor  Gold
     100%    334
      99%    238
      98%    234
      97%    230
      50%    102
      40%     85
      30%     73
      29%     72
      25%     67
    So here are some observations from my tests:
    • 99% is very close to the trade value without flavors.
    • When there are multiple civ/tech relationships in effect, the trade value depends on the maximum of those relationships.
    • A tech cannot be traded when either civ has a maximum flavor relationship to the tech of under 25%.


    Given these observations, I think it's not a good idea to give a tech a low or high priority to all civs using flavors, but it is still possible to use flavors to take advantage of civ traits.

    Giving a Warrior Code a low priority, for example, would reduce its trade value in the eyes of the AI, but the AI would still pursue that tech often because it allows archers. Humans would then just wait to get that tech from the AI for cheap.

    But giving Alphabet a high priority (100%) for scientific civs, for example, I think would be fine. The scientific AI would then pay big bucks (well, 40% more gold) to get Alphabet, but that money would be well spent, I think, as it would bring them closer to libraries. From another test I did, the 100% flavor relationship is enough to make a big difference in AI research preferences, compared to no flavor, or a 99% flavor relationship.

    The incentive for all AI civs to research a given tech more often would have to be done as we did with the PTW version of the mod, or by similar means, such as adding resources with zero appearance ratio.

    Unless someone wants to give it a shot before me, I will try to come up with and test a new proposal regarding ancient age AI research priorities next week when I return from vacation. It will probably involve giving Religious civs a 100% relationship to Mysticism, Polytheism, and Monarchy, Scientific civs a 100% relationship to Alphabet, Writing, and Literature, Seafaring civs a 100% relationship to Writing, Pottery, and Map Making, Militaristic civs a 100% relationship with Iron Working, the Wheel, Horseback Riding, and every flavor a 99% relationship to every other flavor except itself. I'm also thinking we should increase the research value of currency, literature, and horseback riding for all civs by adding three new never-appearing resources that have those techs as a prerequisite.

    Comment


    • #47
      alexman, I am a little confused... how does this interact with your earlier suggestions?

      This *strengthens* the previous results?

      If that is the case, I am not sure we should go so far yet. Let's try one or the other approach first, see how it works, and then tweak some more.

      My thinking is that we don;t want to completely lock AI civs into research patterns, for two reasons:

      * Randomness of environement and thus flexibility is required.

      * Prediction, boredom, and possible exploits on the part of players.
      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


      • #48
        I agree that we want more unpredictable AI research choices, but this is not possible to do with flavors.

        So without any testing, I'm not sure if the latest proposal (well, it's not a proposal yet) strengthens or weakens the previous results, but it's the only option if we want to use flavors and keep the AI trade value for trait non-beeline techs more or less what it is in stock C3C.

        Comment


        • #49
          It is possible if you're willing to use the 'not tradeable' flag. I am doing this for my own purposes, but i wouldn't be surprised if you found it too radical for AU.

          (Imagine..... the ai beelining for replaceable parts.... researching medicine and sanitation.... steampower then industrialization.... a world without hate... but only sometimes...)

          Comment


          • #50
            Another ancient age proposal

            I did some more testing and I have come up with the following proposal for the ancient age, which affects the AI trade value of each tech as little as possible.

            The following 5 flavors are added: Generic, Religious, Scientific, Militaristic, Seafaring.
            • All civ flavors have a 99% relationship with a the tech flavor 'generic'. This ensures that the AI trade value for a generic technology remains almost the same as with stock C3C.
            • A civ with the Generic flavor has a 99% relationship with all technology flavors.
            • A civ with the Religious/Scientific/Militaristic/Seafaring trait has a 100% relationship with itself, and a 99% relationship with all other traits. A side effect of this is that Religious civs will offer about 40% more gold for a Religious technology, a Scientific civ 40% more gold for a Scientific tech, and so on.
            • A technology with a 99% flavor relationship has a AI higher research priority than if it had no flavor, even though the AI trade value is almost the same as if it had no flavor. This is why some techs have the generic flavor and some don't have any flavor at all.
            • Dummy resources with a zero appearance ratio are added to give a higher research priority when needed.


            Proposed changes to Ancient Age Technologies:
            Masonry: Generic
            Alphabet: Scientific, Naval Transport
            Pottery: Seafaring
            The Wheel: Militaristic
            Ceremonial Burial: Religious
            Writing: Scientific, Seafaring
            Mathematics: Generic
            Philosophy: Generic, Optional , Dummy resource
            Code of Laws: Generic, Military Alliances, Dummy resource
            Literature: Scientific, Military Alliances, Dummy resource
            Horseback Riding: Militaristic
            Polytheism: Religious, Dummy resource
            Currency: Generic, 2 Dummy resources
            The Republic: Generic, Military Alliances
            Monarchy: Religious
            Construction: Generic

            I didn't give Map Making a Seafaring flavor because this technology already has a high AI priority and we want to keep some unpredictability. Similarly for Iron Working and the Militaristic trait.

            In order to see the effect of the above changes, I ran tests, and the results can be seen in the attached table. I took four snapshots of the tech tree: Bronze working known, all first level techs known, all second level techs known, and all but the last tech in each branch known. The research choices for an AI of each flavor are shown in terms of percentages. Each percentage in the table is based on only 150 tests, so it is not exact. It gives a good idea of the real percentage though.
            Attached Files

            Comment


            • #51
              So what do you think? Should I continue for the rest of the ages? There is quite a bit of testing involved, so I'd rather not do it if something along those lines is not going to make it in the mod.

              Perhaps we can mark the ancient age proposal as under consideration, and if voted in, we can see how it plays out in the first AU game before continuing for the rest of the ages.

              By the way, I suspect that a 100% flavor relationship, as proposed above, will help influence the AI with build preferences. Not sure how to test that though.

              Comment


              • #52
                It would probably be a good idea to try out the Ancient age as proposed prior to putting in the effort for the other ages. That way if we hate it, you won't have wasted your time.

                As for the changes, they look interesting, but I'm having a hard time conceptualizing how they will actually impact a game. I guess I'd like to try a game with the changes and see how it plays.
                "Stuie has the right idea" - Japher
                "I trust Stuie and all involved." - SlowwHand
                "Stuie is right...." - Guynemer

                Comment


                • #53
                  Full proposal

                  Well, I had some time on my hands, so I finished the proposal for AI build priorities for the rest of the ages.

                  As previously mentioned, the goal is to make AI research selection more unpredictable, but at the same time more likely to benefit from their traits. The value that an AI civilization offers for a technology should be approximately the same as with stock Civ3. An exception is that AI civs are willing to offer about 40% more gold for techs that match their traits, and similarly charge 40% more gold to trade a tech to a civ with traits that match the technology flavor.

                  To maintain unpredictability, I tried to avoid giving flavors to heavily favored AI technologies. For example, Astronomy was not given the seafaring flavor, and Invention was not given the Militaristic flavor, even though these technologies would clearly benefit those specific traits.

                  In order to balance the AI research values, it was necessary to add to some technologies extra properties and a number of dummy (banana) strategic resources, which have an occurrence ratio of zero. These do not influence map generation or game play in any way.

                  So here is the proposal, which I would like to place under consideration (only changes to technologies are listed):
                  Attached Files

                  Comment


                  • #54
                    Medieval Age

                    It was not possible to balance the high AI value of Feudalism, Invention, Gunpowder, and Astronomy. The AI will still research these technologies as soon as it is able to do so. In order to balance the rest of the technologies, I took four slices of the tech tree, one of which is not a real slice, because it includes technologies that are prerequisites of each other. I did this just to compare the AI research values, even though it’s not possible for the AI to choose among those techs.

                    The Militaristic trait is encouraged to take the Cavalry beeline.

                    The seafaring trait is encouraged to research Navigation, as this technology will enable them to sell their no-doubt significant contacts and become rich. This trait is also encouraged to research Physics when given the chance, so that they get to Magnetism earlier. Magnetism and Astronomy are not given the seafaring trait, because these technologies already have a high value for all the AI civilizations.

                    Scientific civilizations are encouraged to beeline to Education to get Universities.

                    Religious civilizations are encouraged to get Monotheism for early Cathedrals.
                    Attached Files

                    Comment


                    • #55
                      Industrial Age

                      Most technologies in this era were given a higher value, so that Communism and Fascism are much less commonly researched by the AI. Nationalism and Replaceable Parts have such a high AI value that no attempt was made to discourage the AI from researching them as soon as possible.

                      The seafaring trait is encouraged to sometimes research ironclads, which most other traits ignore. It is also encouraged to research Combustion, which allows many new ships. Mass production also allows ships, but it was not given the seafaring flavor as it has a high value for all traits.

                      The militaristic trait is encouraged to research Motorized Transportation, which allows Tanks. Advanced Flight is also given a higher weight, so that this technology is researched by some AI, but not all of them waste their time on an optional technology that provides no significant benefit.

                      As with the first slice of the Medieval age, the last slice of the Industrial age includes technologies that are prerequisites of each other, for comparison reasons.
                      Attached Files

                      Comment


                      • #56
                        Modern Age

                        This age was balanced assuming that Spaceship and Diplomatic victory conditions are enabled.

                        In C3C Rocketry was given such an increase in value from the addition of the Mobile SAM and the TOW Infantry that no attempt was made to prevent the AI from choosing this technology as their initial research project of the age.

                        Scientific civilizations are encouraged to research Computers that allow cheap Research labs.

                        It was assumed that Militaristic civilizations aim for a military victory and not so much a spaceship victory. This may not be the best approach in all cases, but it gives the AI some extra variety in research, which makes it more difficult for the human to research some technologies that are ignored by the AI. Therefore, militaristic civs are encouraged to research Synthetic Fibers that allow Modern Armor. Stealth is also a priority, which is a low priority item for other civilizations.

                        Seafaring civilizations are encouraged to research Miniaturization, which allows offshore platforms. They also have Robotics at a high priority, which allows AEGIS cruisers.

                        The Agricultural trait is given priority to Ecology, to take advantage of cheaper Solar plants, and to put some weight to the upper branch of the tech tree. They also sometimes research Recycling (cheaper Recycling centers) which is a very low priority item for other civilizations.

                        As with the first slice of the medieval age and the last slice of the industrial age, the last slice of the Modern Age includes technologies that are prerequisites of each other, for comparison reasons.
                        Attached Files

                        Comment


                        • #57
                          Has anyone played a game or two with these flavors yet to see how they work out?

                          Comment


                          • #58
                            What do you mean by 'work out'?

                            I think the above tables show very well how the AI research choices will be influenced. And if you look back a few posts, you will see how the AI trading will be influenced.

                            Comment


                            • #59
                              Ok, I went back and looked over the tables and stuff and read your posts more thoroughly and yeah, it looks like it will all work out in theory.

                              Anyway, just wanted to see if it works well in practice from peoples opinions, and yours would surely do Alex, have you played a game and seen that the AI perform well with these research options, and that trade value and all that work out? It's not just that I'd like to see them research with more variety, but also that that variety aids in thier development as a Civ and in turn as a threat to my domination.

                              Ok, I want to try this out regardless, but I am not sure exactly how to implement this in the editor. Under Civ Advance/Building Flavor I make the catagories you have made up, and then associate the techs with that flavour, and add the additional attributes to the techs you have done. Then for Civ flavors make the same names.

                              This is where I get kinda confused, what are the % relationships you used between the traits? Like Seafaring tech flavor has 100% to Seafaring Civ flavour, and then 99% to the rest of the Civ flavours?

                              And how do you go about assigning Civs thier individual flavours, if a Civ is both Religious and Militaristic does it get marked for both those Civ flavours?

                              Is Generic both a tech and civ flavour or just a tech? If it is also a Civ flavour, what are the rules regarding applying to a specific Civ?

                              I see you added Naval Transport to Alpahbet, and I am not seeing how to do that in the editor.

                              And finally I don't understand exactly what you did with the banana resource to assign additional weight to the tech, not why, but how you did it in the editor.

                              Really sorry if I am asking too many questions, or sound dumb, but I want to try this out, and am a bit confused still.

                              Also, I have another question, if I were to remove ToE wonder completely and make Philosphy not give a bonus tech, how much would that affect the work you have laid out here?

                              Comment


                              • #60
                                Originally posted by Rellin
                                This is where I get kinda confused, what are the % relationships you used between the traits? Like Seafaring tech flavor has 100% to Seafaring Civ flavour, and then 99% to the rest of the Civ flavours?
                                Yes, 99% to everything else.

                                And how do you go about assigning Civs thier individual flavours, if a Civ is both Religious and Militaristic does it get marked for both those Civ flavours?
                                Yes, it would get both. It would work, because the relevant flavor relationship would be the maximum of the two for each tech.

                                Is Generic both a tech and civ flavour or just a tech? If it is also a Civ flavour, what are the rules regarding applying to a specific Civ?
                                All civs get the Generic flavor, unless they have two other flavors. If they have just one other flavor, they get the Generic flavor and the other. That's how I did my tests.

                                I see you added Naval Transport to Alpahbet, and I am not seeing how to do that in the editor.
                                You have to modify the Curragh unit to have the AI Naval transport flag in the editor. Check the 'unload' flag first. This change has already been voted in the mod elsewhere.

                                And finally I don't understand exactly what you did with the banana resource to assign additional weight to the tech, not why, but how you did it in the editor.
                                Create a new resource. Give it the GOOD_Bananas civilopedia entry. Check it as a strategic resource with an appearance ratio of zero, and select the required tech. Repeat for each technology that requires a dummy resource.

                                if I were to remove ToE wonder completely and make Philosphy not give a bonus tech, how much would that affect the work you have laid out here?
                                Removing the ToE would affect AI research choices, yes. To get the same AI research priority as with the Wonder, simply flag the 'Allows Bridges' and 'Allows Sea Trade' abilities in the editor for Scientific Method. Removing the free tech from Philosophy would not affect AI research choices.

                                I have not tested these modifications in a real game, but my tests involved playing an actual game with 30 AI civs for about 30 turns, so I expect things to work smoothly. I will post a mod with the above changes so people can test it out before the real AU game.

                                Comment

                                Working...
                                X