Announcement

Collapse
No announcement yet.

Blake: On BtS AI Programming...?

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

  • #16
    .
    Last edited by ZEE; April 22, 2011, 07:08.
    The Wizard of AAHZ

    Comment


    • #17
      Originally posted by frenzyfol
      I've always wanted an option in the game setup to define how long the AI can take to have it's turn.
      Personally I wouldn't mind 10X the length of time between turns if it meant the AI didn't act like a complete moron half the time.
      In which case you'd essentially be writing 2 different AIs. It's not as though there's some mythical "Take longer and be smarter" switch that just needs to be flicked somewhere deep, deeeep in the code.

      Jon

      Comment


      • #18
        Well you could just have a list of search depths (for the various calculations) for each mode, and swap them out.

        Comment


        • #19
          Originally posted by Kuciwalker
          Well you could just have a list of search depths (for the various calculations) for each mode, and swap them out.
          You could, but you're more likely to end up with a better AI if you design it in a specific way, rather than making it "uber smart" and super-slow at one level, with the option of "stupifying" it to make it run at a reasonable speed for how 95% of players will want to play. It's not a hard-and-fast rule, but when available time and resources is your main consideration it's better to focus your efforts on the best payoff.

          Jon

          Comment


          • #20
            I have noticed that on Prince level, with agg AI turned on, the AI seems to fall behind in tech more than it used to in Warlords.

            Granted, there is more danger for me in the early going, as I might get pounced on. I've had a couple of games wherein I did an early rush to take out a neighbor, and other neighbors promptly attacked me and I was basically screwed. So major bravo there. If I survive the early game in decent shape, though, it's totally over.

            This is somewhat different than Warlords prince level. I'd have an easier time early, but the late-game utter dominance I'm seing in BtS wasn't there. The bonuses were reduced, IIRC, so maybe that's it. Or maybe it's espionage spending?

            I've been playing Darius, so having a tech edge isn't unexpected - he's great for that. It's the magnitude of it that has surprised me.

            I will have to step it up to Monarch. Or maybe try some different civs and see if it's just Darius being such a badass...

            -Arrian
            Last edited by Arrian; August 27, 2007, 09:03.
            grog want tank...Grog Want Tank... GROG WANT TANK!

            The trick isn't to break some eggs to make an omelette, it's convincing the eggs to break themselves in order to aspire to omelettehood.

            Comment


            • #21
              Originally posted by Jon Shafer
              You could, but you're more likely to end up with a better AI if you design it in a specific way, rather than making it "uber smart" and super-slow at one level, with the option of "stupifying" it to make it run at a reasonable speed for how 95% of players will want to play. It's not a hard-and-fast rule, but when available time and resources is your main consideration it's better to focus your efforts on the best payoff.


              That's true. Plus, the way the search works a 10x increase in time would not give a corresponding increase in intelligence (however you measure that).

              Comment


              • #22
                Originally posted by Jon Shafer

                You could, but you're more likely to end up with a better AI if you design it in a specific way, rather than making it "uber smart" and super-slow at one level, with the option of "stupifying" it to make it run at a reasonable speed for how 95% of players will want to play. It's not a hard-and-fast rule, but when available time and resources is your main consideration it's better to focus your efforts on the best payoff.

                Jon
                At the very least some sort of slider function that increased the clock-cycles used for just unit movement would be good. Basically in stages so that the more clock-cycles you allow it for unit movement, the smaller the stacks are and therefore the more efficient the AI is with units, even with the same AI.

                Even that would be a huge boon.

                Me.

                Comment


                • #23
                  Asmodeous, the point is that if you were willing to give more clock cycles to unit movement, you should recode the unit AI to be global not unit based.

                  IOW right now, with the accepted limited AI processing time, each unit moves individually (or as part of a stack moving individually), and only limitedly takes into account other units around it. Montezuma, say, does not have a 'global unit moving AI' that takes into consideration where all of the units are that he controls. This is where most of the poor AI moves come from - the lack of 'big picture'. Increasing clock cycles for this wouldn't help much. Coding a new, 'big picture' AI that would be processor intensive and probably be used by <5% of all players would take a long time, require a lot of testing, and ... not be used by 95+% of players. Not worth it...
                  <Reverend> IRC is just multiplayer notepad.
                  I like your SNOOPY POSTER! - While you Wait quote.

                  Comment


                  • #24
                    But my point is that adding a function that allows the person to increase the clock cycles used to use the same AI it has now but lower the stack size would enable the AI to use the units in general more effectively and, although not having the level of impact that your suggestion offers (which is optimal), it would have a rather noticeable impact in and of itself, and would take far less effort/work/bugtesting on the part of the programmers.

                    As you said, it's not worth the effort for the vast sweeping change you suggest.

                    Would you then say it's not worth a minor amount of effort for a minor improvement?



                    Me.

                    Comment


                    • #25
                      Originally posted by snoopy369
                      Asmodeous, the point is that if you were willing to give more clock cycles to unit movement, you should recode the unit AI to be global not unit based.

                      IOW right now, with the accepted limited AI processing time, each unit moves individually (or as part of a stack moving individually), and only limitedly takes into account other units around it. Montezuma, say, does not have a 'global unit moving AI' that takes into consideration where all of the units are that he controls. This is where most of the poor AI moves come from - the lack of 'big picture'. Increasing clock cycles for this wouldn't help much. Coding a new, 'big picture' AI that would be processor intensive and probably be used by <5% of all players would take a long time, require a lot of testing, and ... not be used by 95+% of players. Not worth it...
                      Unit movement isn't the best example. A better example would be a memory and predictive patterns. Remember movements of rival troops for the past several turns, and try to predict where they will move next, such as to figure out a threatened city and so on.

                      That'd truly require much more CPU usage (so would only be really feasible on multi-core machines and annoying otherwise), more memory and substantial changes to coding.

                      AI awareness of other units when moving units isn't bad - this is one of the key improvements areas by Blake, in fact. The AI does, for example, know whether it has any other stacks nearby with the same assault goal, or where it has defenders, etc.
                      Solver, WePlayCiv Co-Administrator
                      Contact: solver-at-weplayciv-dot-com
                      I can kill you whenever I please... but not today. - The Cigarette Smoking Man

                      Comment


                      • #26
                        Originally posted by Asmodeous
                        But my point is that adding a function that allows the person to increase the clock cycles used to use the same AI it has now but lower the stack size would enable the AI to use the units in general more effectively and, although not having the level of impact that your suggestion offers (which is optimal), it would have a rather noticeable impact in and of itself, and would take far less effort/work/bugtesting on the part of the programmers.

                        As you said, it's not worth the effort for the vast sweeping change you suggest.

                        Would you then say it's not worth a minor amount of effort for a minor improvement?



                        Me.
                        That wouldn't do anything though. The AI is optomized for few clock cycles; giving it more wouldn't do much more to it at all, as Jon said above. It's not like Chess where you can just tell it to look deeper and deeper into the game; because Civ is so complex, the AI isn't written to look deep into the game at all, but instead to look at the current picture. It has plenty of clock cycles to look at the current picture; to give it more depth of current field would not help.

                        You would need to code it to look forward (and/or backward) in time, which would take a lot of work indeed...
                        <Reverend> IRC is just multiplayer notepad.
                        I like your SNOOPY POSTER! - While you Wait quote.

                        Comment


                        • #27
                          .
                          Last edited by ZEE; April 22, 2011, 07:08.
                          The Wizard of AAHZ

                          Comment


                          • #28
                            Due to lack of demand...

                            People buy games because they want to PLAY them, not because they want to sit around waiting.

                            Only a very small minority of players would actually be willing to sit around waiting for longer. I certainly wouldn't (which would make testing an interesting challenge...)

                            Comment


                            • #29
                              Firaxis did cunningly include a lot of multi-player options for people who want to play against intelligent opposition.
                              Jon Miller: MikeH speaks the truth
                              Jon Miller: MikeH is a shockingly revolting dolt and a masturbatory urine-reeking sideshow freak whose word is as valuable as an aging cow paddy.
                              We've got both kinds

                              Comment


                              • #30
                                I am not a programmer at all and i also mentioned this like two years ago. Also this is not to insult anyone or complain to anyone in specfic, BUT: I just wonder how on earth this chess-program on my C64 ("Grandmaster"), consisting of 8 KBytes of code (graphics included) and running on a 0.97 Mhz 8-bit-processor, managed to beat my ass pretty quickly (1 or 2 minutes per move IIRC) every single time for years... i actually never managed to beat it - and it didnt get any bonuses AFAIK ...

                                Yeahyeah - i know: It´s probably because i am a really poor chess player - but i am not (tho not a exactly a "grand-master" neither)...

                                Comment

                                Working...
                                X