Announcement

Collapse
No announcement yet.

Ideas for a killer AI

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

  • #31
    Re: Ideas for a killer AI

    Nice work alexman! Here are my opinions:

    1. Setters

    Leave them alone. Yes, it's annoying to see the AI build Settlers inefficiently, but is the overall effect really that bad? I think that the bonuses the AI gets more than compensates for this unfortunate side effect.

    2. Growth

    Options 2 and 3 both make a lot of sense, they even work in unison. I've argued in the other thread that I don't like option 1; basically, I think it would change the game significantly, that is, just enough to make me feel like I'm playing a weird hybrid just to get more mileage out of the AI. I wouldn't like that feeling.

    3. Harbors

    I agree that this is a problem, but doesn't marking "trade" for all civs have any side effects? For instance, if we start flagging "trade", "production" and not flagging "culture", etc. we're going to end up with a pretty bland AI. I think the Harbor problem needs to be solved somewhere deeper into the AI than the build preferences.

    4. Factories

    The first part of option 1 is natural, as 95% of the time good players will switch almost all production to Factories once they reach Industrialization, without question. I don't like the idea of removing Culture as a build-often just to get all AI civs to build Factories more often, which would promote the "bland" AI feel again. Option 2 looks promising. Again, I think this problem is best solved by Soren.

    5. Units

    I don't see a problem here. Sure, the AI builds more units than human players do, but that just makes the game more interesting, really. Penalizing players for liking to be the "builder" is not the solution, IMO.

    6. Research

    Ideally you'd want the AI to play a sort of "guessing game" with the AI, where you don't know which tech it's going to research next (I assume this is the way it works in MP). This is really hard. You also want the AI to research the "good" techs, but not too predictably. I think this problem is more complex than we're giving it credit, and playing with the costs may not yield great results. Still, it's worth trying.

    7. Infantry and Guerillas

    Increase Infantry attack to 8, like in AU.

    8. Weird Offense

    Again, the AU solution is fine.

    9. Babylonians and Iroquois

    Yup.

    10. Wealth

    I personally think that building units in productive cities and disbanding them in corrupt cities is an extremely dumb consequence of the game mechanics. Human and AI players alike should build Wealth when "concrete" is worth building. Increasing the value of Wealth is a great solution.

    11. Forbidden Palace

    Yep, this is a big problem, but I really don't like any of the proposed solutions. What we need is some extra code that places the FP efficiently. I expect this out of the AI, and I'm not willing to change anything to mask this weakness (sorry for sounding particularly difficult on this one...).

    12. Communism

    I like a combination of 1 and 3. This probably won't make Communism a viable government, but will go a ways to improving the late-game AI.


    I'll definitely post any solutions that come to mind. Keep up the great work!


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

    Comment


    • #32
      On lots of Airports on the same cotientant:

      It's actually an excelent military idea to build lots of them on your home contientant and one on the other contientant.

      You can only airlift 1 military unit out of each airport a turn, so by building 10 Airports on your home contientant and 1 on the other contientnat, you can move 10 Tanks over there each turn without worrying about Transports being sunk.

      And Airports also repair aircraft, so it's a good idea to have an airport in every city where you have fighters & bombers based when the AI has them as well.
      1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
      Templar Science Minister
      AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

      Comment


      • #33
        ... and my opinions:

        Re 1: This would help the AI in the early game, but not in the late game, therefore I don't like the idea.

        Re 2: Thumbs up for options 2 and 3. As for double-powerful entertainers: yes, it would help the AI a lot, but I'm afraid (like Dominae) that this will make for a rather different game. At the least, 'WLTK'-days will be very easy to get.

        Re 3/4 (build preferences): If every civ builds 'trade' AND 'production' often (which seems to be a good idea), then the maximum number of preferences should be upped to 5.

        Re 4/5 (maintenance costs): If maintenance costs of improvements are significanty increased, then free maintenance for Communism may become too unbalancing again.

        Re 6: While I haven't got any detailed ideas, I'd try to keep the overall research costs for every era constant.

        Re 7: ... and/or make Guerillas somewhat cheaper than Infantry. BTW, has anyone spotted the AI building longbowmen while medieval infantry is available?

        Re 8/10: Already solved in the AU mod.

        Re 9: I agree.

        Re 11: Like Dominae, I think that it is up to Firaxis to tweak the AI in this regard.

        Re 12: Option 3 is a good idea, option 1 won't make a difference IMO, option 2 may be worth a second try. What I'd hate to see is every AI civ switching to Communism because of free maintenance. (And I'm still hoping for a better editor that allows for a tuned-down version of communal corruption.)

        Keep up the good work, alexman!
        "As far as general advice on mod-making: Go slow as far as adding new things to the game until you have the basic game all smoothed out ... Make sure the things you change are really imbalances and not just something that doesn't fit with your particular style of play." - WesW

        Comment


        • #34
          Originally posted by lockstep
          BTW, has anyone spotted the AI building longbowmen while medieval infantry is available?
          Good observation, as it is equivalent to the guerilla/infantry situation.

          I have not seen it happen, but we should definitely look out for the possibility. This is probably not relevant, but whereas the other three units have the draft ability, Longbowmen don't.

          Comment


          • #35
            I did some extra tests, and the AI still builds (7-6-1)Guerillas instead of (8-10-1) infantry for attack. It never builds Longbowmen instead of Med. Infantry.

            I take what I said about draft back too. It makes no difference. I also increased Guerilla cost to 100 and the AI still builds them. Perhaps it goes by the order in the queue (lower=better)? It can't be that simplistic...

            A Mystery...

            [Edit: It seems that offensive units as a build-often pref and defensive units as a build-never pref threw off my experiments. Ignore the above.]

            Comment


            • #36
              I may be out of line, as I don't know exactly how you're testing, but is it at all possible that those Guerilla "builds" are actually Warrior/Swordsman/Med.Inf upgrades - I know I used to still see warriors/swordsmen in the industrial/modern age.

              Perhaps Soren's tweaks included giving a bit more weight to upgrades vs. new builds, therefore it might seem like the AI is favoring Guerilla's over Infantry because it's cheaper to upgrade than it is to build anew.

              Just a thought, and maybe off-base since I don't know how this sort of thing gets tested.

              "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


              • #37
                Ducki, good idea, but that's not the case. All I do it flag everything as build-never, offensive units as build-often, give the AI the needed resources and techs, and start a new game. It immediately builds the offensive unit which comes last in the build queue.

                [Edit: It turns out that flagging offensive units as build-often and everything else as build-never was messing up my experiment. Forget everything I said except the fact that increasing the attack factor of Infantry by 1 doesn't make the AI forget about guerillas.]

                Comment


                • #38
                  Does the AI start out with defenders?

                  If not, is it faster to build a Guerilla than an Infantry?
                  Maybe they are building it first because it's faster and they want a defender(even if it's not a "real" defense unit) as fast as possible while still being "acceptibly" strong?

                  Even if it does start with a defender, if the Guerilla is a faster build than the Infantry, maybe it's in a hurry.
                  I dunno. I'm just throwing out ideas that might have some logic to the AI.
                  "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


                  • #39
                    On the off-chance that Infantry is indeed more expensive, try making the Guerilla cost 1 shield more than the Infantry and see what happens.

                    That is possible with the editor, right?
                    "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


                    • #40
                      Stupid forum ate my post... so here's a watered down version...

                      What if we can make marketplaces fit into more categories than just wealth, trade, and happiness? I'm thinking here of the list of flags at the bottom left of the City Improvments screen. Each improvment has a list of categories it fits into. If we simply add the flag to every option for marketplaces then won't this simply make every AI civ that much more likely to build them?

                      My question about this (and I don't have the game here to check) is... do these flags actually tell the AI which category the buildings go into, or is this where the game decides who gets which buildings half cost? Would marking marketplaces as militaristic cause them to be half price for those civs?

                      If so... then this obviously won't work. I don't know where that information is kept. If these flags don't impact the costs, and do put the improvments into the right Build Often/Never categories, then we should be able to pick a few buildings (marketplaces, harbors) that are extremely desirable to the AI (just like they are to us) without having to add more build often choices to each civ (which just makes them all more and more similar).


                      Now my thoughts on the original twelve points brought up...

                      1. Leave settlers be. This is an annoying trait of the AI, but one we can live with.

                      2. I like option 2. Option three is fine... but if it doesn't have any noticable positive effect we shouldn't touch it... just in case it has some other result that we can't pinpoint or don't notice.

                      3. If what I'm talking about works, we could just make harbors fit into more categories. Either way, trade is something that all civs should emphasize.

                      4. I like the idea of upping the factory costs. Factories are worth the upkeep to the human player, perhaps it will make factories less of a "duh" choice if the civ is cash-strapped, and it provides a subtle benefit to the AI. A very elegant solution.

                      5. Playing PTW with a modified version of AU 1.06 (a few changes to balance the new units with the AU changes, and I always add wheels to settlers) I don't see this as actually being a problem. I haven't played much vanilla PTW yet, so I don't know if the AI is still refusing to build improvments... but my guess is that doing what was done with 1.29 AU 1.06 works fine. And the more units the AI has, the better.

                      6. I don't know the tech tree's intricacies well enough to voice an idea here... if tweaking costs actually helps make AI research paths more random feeling (or sensible) then go for it.

                      7. I see guerillas existing simply to extend the upgrade path of the swordsman/archer units... which means I would be willing to make Geurillas cost so much (1000) that nobody would EVER build them. They would exist only as upgrades.... but since you can't guarantee rubber to the AI (I have no problem forcing the human to use rifles)... and since the AI would probably build them anyway... this solution probably wouldn't work.

                      If the reason the AI builds geurillas is simply that they are lower on the list (please don't let this be it), then is there a way to simply make infantry appear lower? Maybe renaming guerillas to infantry in the editor (and vice versa) and switching their stats? Maybe?

                      Also... I think that in light of the changes to rifles and infantry that geurillas' place in the game need to be discussed at length anyhow.

                      8. You fixed this once before. same solution, infantry and rifles get better attack, MIs get flag removed.

                      9. Okay.

                      10. I agree with Dominae that the human disbanding units is lame. Double wealth.

                      11. I like the idea of giving the AI a special difficulty level that the human can't play at that does little things like increase the OCN. Does this impact the AI's production/food costs and starting units? Or just OCN and happiness?

                      12. What if communisms didn't use forced labor? When the AI goes into a war with a human they draft and whip their cities down to size 1 and their population goes into extreme unhappiness. If they couldn't use forced production then their cities will stay healthier, and an added bonus will be that they have something to spend all of the money we're saving them on unit costs.



                      I hope this posts this time...

                      Comment


                      • #41
                        Fosse, in order to protect myself from that, I copy it into my browser so I can redo it or paste it to notepad.

                        Comment


                        • #42
                          I'm not going to try to comment on every idea, but here goes:

                          1) I don't regard the early game balance as a problem. In fact, helping the AI out in ways that only have a significant effect in the early game would tend to magnify the problem that if you pick a level where you can keep up in the early game, the game gets way too easy later on. Also, even at 30 shields, it can be hard for a city with a granary and 5 surplus food (the ideal settler pump) to build settlers fast enough to keep up with its growth. Add 2.5 shields per turn to the cost of a 4-turn settler and you seriously upset the balance between "settler pump" strategies and other strategies. And that's in addition to the reservations previously stated by others. In other words, leave my settlers alone!

                          2) I certainly think doubling the effects of entertainers would be worth a try to see how we like it in practice. I haven't dug into the mechanics enough to form an opinion of the other options.

                          4) I like the idea of trying to get the AI to build factories more, but increasing maintenance costs is too contrived. Someone said it would make building factories less of a "duh" decision, but as far as I'm concerned, the only thing that shouldn't be a "duh" decision in cities with halfway decent production is whether a couple other things might be worth building first.

                          5) Even aside from my general distaste for sabotaging human strategies to help the AI, increasing maintenance costs in general would upset the balance between Republic/Democracy and other forms of government. The more of a civ's gold has to go to maintenance, the higher the percentage advantage Republic and Democracy have in how much gold is left over after expenses.

                          6) I'm not quite sure how I feel about meddling with tech costs, but I definitely see a couple potential drawbacks. (A) Having one set of costs in the regular game and another in the mod would make it harder to keep track of which techs cost what in a given game. (B) What would adding randomness to AI research do to the quality of AI research choices? For example, Philosophy is absolutely useless except as something to sell or trade unless a civ is trying to get Republic in the near future. As long as a civ has contact with plenty of others, misdirected research wouldn't be too big a deal, but what happens to a civ with little or no outside contact? That's certainly something to watch for in such tinkering.

                          11) Changing the fundamental level the AI plays at would have too many side effects besides the intended effect of reducing corruption. For example, the impact of having an extra happy citizen or two could be quite large. The idea of having the AI play at a special level with a higher optimal number of cities would have far fewer side effects, although I think doubling the optimal number of cities sounds like a bit much. (Especially, consider the impact in the late ancient era when the AI gets that benefit but the human likely hasn't built a FP yet.)

                          12) The big question in my mind regarding improving Communism is how it affects the AI's inclination to switch to and stay in Communism. As long as we don't make Communism attractive enough that the AI ends up using it instead of a better form of government, I like the improvements. But I've seen suspicions raised on the AU Mod thread that the improvements make the AI like to use Communsim more, in which case the changes would at least sometimes be self-defeating.

                          Nathan

                          Comment


                          • #43
                            1.Settlers - Indifferent, tempted to try simply for testing purposes.

                            2.Px2 Entertainers & "Growth" - Try the Px2 Entertainers, see #3 regarding "Growth".
                            As for as Px2 exploitation, I encourage people to *try* to exploit these (especially for WLTKDs). Only if we feel comfortable they cannot be exploited will everyone feel comfortable with this change. If there is a discovered superior exploit than they should be removed.

                            3.Trade & Harbors - I now doubt whether Harbors are considered "Trade". In my current unmodded %60land Archipelago game the Aztecs, Persians, & Germans (all in the top half in size) never established ANY Harbors (and could not trade with anyone) until the middle of the Industrial Age... and Persians are flagged for "Trade". I fear Harbors may only fall under "Growth" (unless Soren said otherwise & I have a weird game). Something should be done to establish Harbors (or sea trade easier for the AI).

                            4 & 5 & 12.Maintenance/Communism - I agree with NBarclay that higher maintenace costs would be more incentive for Democracy. If higher maintenance is implemented to what degree can that be offset in Communism? And also agree making Communism a little better in some aspects, may make the AI like Communism a lot more when it shouldn't. Care should be taken here.

                            6. Tech Costs - I am also uneasy with changes in Tech Costs, but my testing curiousity says try it.

                            7.Guerillas - Increasing their cost or Infantry's attack should work.

                            8 & 9. Indifferent.

                            10. Wealth - Agreed.

                            11.Forbidden Palace - Lowering the AI's corruption is a good idea. Maybe move the Forbidden Palace to be built later, when the AI may build it in a better city. A delayed Forbidden Palace would help the AI. I take it the AI builds it's FP as soon as it gets it now.

                            Comment


                            • #44
                              OK, I've been testing instead of playing again... but I believe I figured out the rules that the AI uses to choose the next technology to research. It took me many hours to figure this out, so bear with me!

                              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 to complete the research. Here are the values:

                              SS Component: 261/turns
                              Government: 259/turns
                              Conscription: 259/turns
                              Mobilization: 259/turns
                              Defender (no resource): 198
                              Attacker (no resource): 134
                              Defender (resource reqd): 70
                              Naval Transport: 34
                              Resource: 16
                              Double Worker Speed: 8
                              Allows Diplomats: 8
                              MPPs: 8
                              ROPs: 8
                              Alliances: 8
                              Embargoes: 8
                              Trade Over Ocean: 8
                              Wonder: 6
                              Attacker (resource reqd): 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
                              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!

                              Notice that AI tech choices are not affected by the following, so it is very difficult to make the AI take advantage of their unique characteristics.
                              • Build preferences.
                              • Unit stats.
                              • Unique units, unless the UU falls in a different value category than the basic unit it replaces
                              • Civ traits, except for the free starting technologies.


                              From plugging the above values into the actual tech tree, it quickly became apparent that it's almost impossible to balance the AI choices using only the technology costs. For example, there is no way the AI will not research Bronze Working first (unless it already knows it).

                              Fortunately, there is another way. Writing gives special abilities like ROPs, Diplomats, Alliances, and Communications trading. If we attach any of these abilities (which are highly valued by the AI) to techs that come after Writing, there will be no difference in gameplay, but we can trick the AI into thinking that those thechs are more important than they really are! For example, we can make the AI research Literature or Republic much earlier than it does.

                              Comment


                              • #45
                                I'm not finding, with PtW, that the AI is dilly-dallying around near as much as in vanilla Civ3.

                                Sometimes, even beelining for Lit, I don't get there first, and I rarely get Republic first.

                                Maybe it's just been the luck of the draw in my recent games, though. Maybe I've (unknowingly) changed my own preferences for tech.

                                I do know that it seems like the AI is getting to both Republic and Monarchy faster than pre-PtW.
                                "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