Announcement

Collapse
No announcement yet.

A Better AI.

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

  • Originally posted by Virdrago
    Hey Harrier; I think Snoopy meant this:

    He took a city, which hasn't gained any (or little) culture yet, while enemy units are guarding a resource that isn't inside culture anymore (having lost the nearby city). They are about to die, and can't go anywhere, so instead of guarding the resource (which will go to Snoopy once the city isn't in disorder and gains culture), or uselessly waiting to get smoked, they could be programmed to destroy the road and/or mine (or whatever), instead of sitting waiting to give 1xp to a unit. Excuse the run-on sentence.

    Of course, I could be wrong.
    Well from Snoopy's post after yours - you are not wrong. Just my incorrect reading of the orriginal post.

    But I think what I said is still valid, as I was thinking of the late game -when if you captured a city - once it came out of revolt - all surrounding tiles are still in the opponent AIs' control (even if you use a GA as a culture bomb).

    I therefore presume you are refering to the early game - when tiles go out of any civ control due to low culture.

    Well that could be factored into my proposal quite easly :-

    As I said in the above post - EXCEPT: - If tile no longer in your cultural influence - pillage and when finished (if still alive) retreat to your own nearest territory.

    What do you think?
    "What if somebody gave a war and nobody came?" Allen Ginsberg

    "Opinions are like arses, everyone has one." Anon

    Comment


    • I refer to squares not in the AI's cultural boundaries - ie neutral squares. Thus the AI would have to differentiate between them...

      So yes, the "except" is the whole point of my suggestion
      <Reverend> IRC is just multiplayer notepad.
      I like your SNOOPY POSTER! - While you Wait quote.

      Comment


      • I am going to have to bring up again the issue of stack attack with the latest AI release. If I take the .dll out, stack attack works as it used to. If I put the .dll back in, then stack attack does not work. I have to attack unit by unit. Is there anyone else who is having this kind of issue? Now that the AI is more economically efficient, I find that are huge stacks to be found and fought every now and then. Doing it one unit at a time is a throwback to older Civ interfaces, one that I do not relish at all.

        Again, does the new .dll have this affect on anybody? As far as I know I have a plain installation other than the Blue Marble graphics.
        If you aren't confused,
        You don't understand.

        Comment


        • Does the AI pick a city location based on the total food/production/commerce score of every tile in the fat cross, or does it consider individual squares in the order they would be worked?

          By that I mean, does it consider a site that is all tundra to have a similar score to one that is half grassland and half desert (I'm ignoring possible improvements and resources)? A site that is half awesome and half awful tends to be a better city location than one that is merely okay in all respects, since you can pick the good squares first and build the city.

          Something like "consider city location and any single square within range until population changes, then consider city location and any two squares within range until population changes," and so on. Continue until population limit is reached or 2050. You could tell the AI to maximize food, hammers, or gold (or some combination) over its entire lifetime. There would have to be some simplification -- it doesn't matter which of two identical squares you pick first, and you should always pick a square that is better in one respect if it's no worse in any other respect -- because otherwise the calculations would be prohibitive. You might use it as a second step to evaluate sites after some other step reduces the number of locations to look at.

          /Standard disclaimer goes here --I've oversimplified things, it may already be implemented, or have some flaw I don't know about.

          Comment


          • From Blake over at Civfanatics.

            Originally posted by Blake
            I just made it look for any resource within 4 tiles (in a 9x9 block minuse the fat city cross), for each resource found in that block, it tries to find a place it can found a city, if it can't find such a place it'll recognize the bonus as being unaccessable (this happens sometimes due to "fish off mountain island" or other players culture), for each possible city site it checks to see if the potential new city will block that site, if it can't find a non-blocked site then it returns the number of blocked resources.
            The foundvalue for a polt is then divided by 1 + the number of blocked resources, so if a site blocks 1 resource the value is halved... this massive penalty will tend to mean that non-blocking sites score more highly.
            The only potentially problematic case is the lesser of two evils case - where you're going to block a resource regardless, in that case the AI will still pick one of the blocking sites sooner or later but it may take longer than it should. However the "lesser of two evils" case is very, very rare and any site with resources (even blocking) will tend to out-value a site without resources.
            "What if somebody gave a war and nobody came?" Allen Ginsberg

            "Opinions are like arses, everyone has one." Anon

            Comment


            • Originally posted by eris
              I am going to have to bring up again the issue of stack attack with the latest AI release. If I take the .dll out, stack attack works as it used to. If I put the .dll back in, then stack attack does not work. I have to attack unit by unit. Is there anyone else who is having this kind of issue? Now that the AI is more economically efficient, I find that are huge stacks to be found and fought every now and then. Doing it one unit at a time is a throwback to older Civ interfaces, one that I do not relish at all.

              Again, does the new .dll have this affect on anybody?
              It indeed was broken by Better AI. It will be fixed in the next build. Sorry about this. (Stack attacks were changed so that they choose a sacrifice unit if the best unit has bad odds. The AI uses this logic, now humans get it as well).

              -Iustus

              Comment


              • Yipes.

                I just got gang-banged on Noble with the Improved AI... this is a whole new kettle of fish.

                Blake
                "My nation is the world, and my religion is to do good." --Thomas Paine
                "The subject of onanism is inexhaustable." --Sigmund Freud

                Comment


                • Originally posted by Iustus


                  It indeed was broken by Better AI. It will be fixed in the next build. Sorry about this. (Stack attacks were changed so that they choose a sacrifice unit if the best unit has bad odds. The AI uses this logic, now humans get it as well).

                  -Iustus
                  Thank you for your response.

                  Thank you for making the game harder.

                  (Did I just say that?!?!?)
                  If you aren't confused,
                  You don't understand.

                  Comment


                  • Downloaded last night - should get chance to try it out this week.

                    I have to say top effort Blake - I'm really impressed with what you have been able to achieve with this project, and I'm not easily impressed with anything civwise.

                    One quick question (doesn't need to be for Blake necessarily as I didn't read all the pages): is the whipping bugfix included in the 1.61 release? I know this is about AI but fixing such a glaring bug, one that has been fixed in Warlords already, would probably be a good idea.

                    Comment


                    • I tried a OCC on noble over the weekend to try out the latest AI. I was doing fairly well with the world divided between 4 AI civs, all of whom hated Tokugawa, disliked each other, and kinda liked me. The Egyptians were the furthest from me, a little backward technologically, but were also my closest friends. I used them to keep the other two strong civs, Germany and America, in wars. The UN got built, but no one could get enough votes to become leader, so the UN was even less useful than real life . It was quite annoying though because every 5 turns there was another election and another failed vote.

                      I had founded 6 religions in my city, and was making good progress on a spaceship when I noticed that one of the Egyptian cities had achieved legendary culture. I thought that was kinda weird seeing as I had never spread 4 of the worlds religions. I guess there were a lot of wonders there...

                      Then a second Egyptian city went legendary. WHAT! How can this be. I scroll through the logs and see that Egypt has been producing a large number of great artists lately.

                      And then it happened. The Egyptians won a Cultural victory. It was so sudden and unexpected. I had been figuring how to beat the Germans into space and was convinced it could be done. I was just coasting into my victory when it was snatched away.


                      Well done, Blake.

                      I don't know a lot of people who could win a cultural victory without a lot of religions. It must take a huge amount of concentration of strategy. I had been watching the Egyptian technology level slowly stagnate but it didn't even occur to me why. Your crafty AI has pulled another trick from it's sleeve.

                      Comment


                      • Your crafty AI has pulled another trick from it's sleeve.

                        What?! That's cheating! I understand it could get you killed in a poker game.

                        Comment


                        • For those of you who don't follow the CFC thread (I admit I post slightly more there because it's more active). I've decided to upgrade and tweak the start point code - basically to fix it. Problems including seafood madness, start clumping, bizzare ice starts and so on. All of these have been fixed.

                          Here's basically what I've done:
                          1) I've increased the weighting of land - basically any site with less than 12 land tiles starts getting penalized.
                          2) I've added a penalty for bad tiles in the greater fat cross - if there's A LOT of such tiles the site will get penalized. Jungle is technically bad but only counts half because it can be cleared.
                          3) I've added a bonus based on distance to other starts, if the site is more distant it scores more highly. VERY close sites should score very lowly and thus not get chosen (you'd think this component would be in the original code... but no...), this component does not factor into the start point normalizer.
                          4) The capital site probably wont deadlock any resources, when this happens it's "unfun" and it messes with the AI, so I greatly discourage it.
                          5) I've simply forced it to not add more than 2 coast seafood and 2 ocean seafood. I hope you don't miss the quad-crabs.
                          6) I've buffed up the "Remove bad Terrain" and "Remove bad Features" normalizers to do more than just the fat cross, a little love for the polar starts and also reducing the amount of stuff which needs to get crammed into the fat cross.

                          Here's a couple of extreme examples... I created these by doing standard cold continents with 12 civs (normal is 7), it's fairly reluctant to put civs in the cold normally.

                          I call this the "Greenland Effect":



                          What you get in effect is a green coast with some cleared coastal water, instead of having the fat cross alone cleared. I think this looks less silly than the fat cross alone and should allow a polar start to get a good capital and a couple of half-decent cities on each side.

                          The same thing here:

                          This isn't an extreme example, but before the normalizer this site would've been more icey.


                          Because I've changed the terrain upgrading code to sometimes turn Tundra -> Grassland you can end up with starts like this:



                          Grassland forest furs imba? Possibly...
                          Is it a bad thing that a polar start can be good? I could specifically prevent this case from occurring then again it's not like this start is better than a river rice 2 river gems and bananas type start... or a double pigs plus plentiful hills type start...

                          Anyway nothing has changed in the most recently uploaded build (last weeks), with this stuff it's really easy to see trends which don't exist.

                          Comment


                          • Originally posted by Blake
                            For those of you who don't follow the CFC thread (I admit I post slightly more there because it's more active). I've decided to upgrade and tweak the start point code - basically to fix it. Problems including seafood madness, start clumping, bizzare ice starts and so on. All of these have been fixed.
                            Can I make you my deity Blake? I don't know how many times I've restarted my games because of these very same conditions, and now you're telling us you've fixed them? I think I've died and gone to heaven!! Did you also by chance fix the issue where sometimes you would have another civ start 2-3 squares away from you? Or even as much as 10. On a Huge map, that's still way too close IMO.

                            So where do we get this update anyway, I don't see any file link in your MSG.

                            Comment


                            • Originally posted by Willem


                              Can I make you my deity Blake? I don't know how many times I've restarted my games because of these very same conditions, and now you're telling us you've fixed them? I think I've died and gone to heaven!!
                              Now THAT's getting quoted somewhere.

                              Did you also by chance fix the issue where sometimes you would have another civ start 2-3 squares away from you? Or even as much as 10. On a Huge map, that's still way too close IMO.
                              I have taken reasonable measures to prevent this. I can't outright forbid it from happening because people might use weird map settings, but the start point code will make a reasonable effort to avoid it.

                              So where do we get this update anyway, I don't see any file link in your MSG.
                              Once the stack attack issues are ironed out. ASAP, because there's lot of stuff I want tested/feedback on.

                              Comment


                              • Thank you, I've played less in the last month or two because of this issue. I've been looking at making an alternative code that could be added to map scripts but was having trouble with some of the functions. Are you making the changes to the city start code in the SDK or elsewhere?
                                LandMasses Version 3 Now Available since 18/05/2008.

                                Comment

                                Working...
                                X