Announcement

Collapse
No announcement yet.

Does the AI learn?

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

  • Does the AI learn?

    There are 3 files in the ai\scripts directory which seem to get updated everytime I play: economic.bho, aibestbuildlibrary.bho, and defensive.bho. The files are in binary format so I can't read them. But I'm wondering what these are used for and why they are updated all the time. Could it be that the AI is somehow keeping track of its best efforts? It seems unlikely, since BHG surely would have been promoting this fact! Can anyone from BHG explain these files?
    Firaxis - please make an updated version of Colonization! That game was the best, even if it was a little un-PC.

  • #2
    I'm curious about this too. Same thing happens here, and that filename 'aibestbuildlibrary' sounds rather suspicious!

    I suspect what's really happening, though, is that the script files in that directory are getting compiled every time the game starts up. Economic, defensive and bestbuildlibrary.bhs are text files.

    Anyone have the real answer? Bueller? Bueller?
    _/\ C
    Sturgeon's Law: 90% of everything is crud.

    Comment


    • #3
      I'd bet Carch is right. They can't make the AI learn between games, because then your games would get progressively harder.

      Comment


      • #4
        Easiest way to find out would be to make a backup of the files, play a game, and then compare the new files with the old ones. (I'd do it myself but I'm still waiting for my game to be delivered )
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #5
          I would guess Carch is right as well. The two files which get updated everytime you play have .bho extensions. There are two files with the same name but .bhs extensions that don't get updates. The .bhs files are plain text file with what looks like a scripting language, while the .bho files are an unreadable binary format. So my guess is that .bhs is "Big Huge Script" while .bho is "Big Huge Object", the compiled version of the script file. And I would guess that the reason they recompile them everytime is to allow for the possibility that the script files changed.

          Locutus, I don't have time to play right now but I just saved out a copy of the .bho files. I'll play tonight and then do the compare, unless someone else does if before me today.

          This does raise some other interesting possibilities. BR has said that the AI follows one of several scripted openings, followed by a more general adaptive approach (unscripted). The second part is probably hard coded, but it looks like we can certainly mod the scripts for the openings. So I'm sure someone will come up with a killer script for an awesome AI rush.
          Firaxis - please make an updated version of Colonization! That game was the best, even if it was a little un-PC.

          Comment


          • #6
            By the way, economic.bhs obviously appears to be the boom script, but defensive.bhs is actually the rush script. It says so in the comments right at the top.
            Firaxis - please make an updated version of Colonization! That game was the best, even if it was a little un-PC.

            Comment


            • #7
              Carch and albie are right. Ilya Kreymer (the bloke who did the language) wrote:

              Scripts files are text files and usually have a .bhs extension. Scripts are compiled to byte-code .bho, which are then loaded by the virtual machine embedded in the game.

              Comment


              • #8
                cool, I want a virtual machine....


                Sorry for the off topic, but an AI that learns is an interesting idea, but for this game would result in AI that would 0wn in single player play unless you share your computer with a bunch of ppl, or use a different strategy every time.

                In football games they use this though, it does make the game more fun, but NOTHING can stop the Green Bay Packers when Metaliturtle has the stick!
                First Master, Banan-Abbot of the Nana-stary, and Arch-Nan of the Order of the Sacred Banana.
                Marathon, the reason my friends and I have been playing the same hotseat game since 2006...

                Comment


                • #9
                  It could be coincidence but…

                  In a quick battle I was playing AI vs. AI (that is AI controlled my units, etc). I was using Russians and played “boom†AI. So quite fast in each age AI reached the commerce limit. I decided to help it, and researched Commerce 2 boxes more than the age. We won this battle.

                  Then I set up similar battle and again played Russians using AI. To my surprise AI researched technologies in exactly the same sequence as I help it to do last time! Of cause, as I said it could be just a coincidence, but it could be that because AI won last time in similar battle (with my little help) it might remember the order of technology research. That could be fantastic!
                  The whole problem with the world is that fools and fanatics are always so
                  certain of themselves, but wiser people so full of doubts.
                  -- Bertrand Russell

                  Comment


                  • #10
                    The AI very well might learn during a game, but the learning is not stored.

                    Comment


                    • #11
                      Umm, this is Off-topic, but...
                      Skywalker, your sig is way too long. It becomes clear in one-lined posts such as the above one. The forum limit is 4 lines at 1024x768, AFAIK.

                      Comment


                      • #12
                        It is four lines. IIRC, the control panel won't even let you have more than four.

                        The thing is, it's determined by number of returns

                        Comment


                        • #13
                          I noticed this as well. Clearly other people share the habit of mooching in the Program Files directory and randomly opening text files

                          Interesting how the three files that update themselves are also the three you can open in the script editor. I thought I had accidently modified them when I was playing with the editor, until I saw they got updated when I didn't use it at all.

                          Comment


                          • #14
                            Originally posted by skywalker
                            The AI very well might learn during a game, but the learning is not stored.
                            But then it is not learning – it is adjustment to situation. Learning needs repeated memorizing.
                            The whole problem with the world is that fools and fanatics are always so
                            certain of themselves, but wiser people so full of doubts.
                            -- Bertrand Russell

                            Comment

                            Working...
                            X