Borg Issues with the latest nightly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aodhlin
    Scout
    • Jul 2024
    • 26

    Borg Issues with the latest nightly

    I've been running the borg in the latest release on Github, and it's encountering some issues. In this example, it keeps trying to cast Single Combat without a valid target.

    I've also noticed that it sometimes forgets to retrieve ammo and other floor items before recalling back, even if it's not in any danger.
    Attached Files
  • Aodhlin
    Scout
    • Jul 2024
    • 26

    #2
    Here's another example where it gets stuck trying to decide which weapon to use.
    Attached Files

    Comment

    • Aodhlin
      Scout
      • Jul 2024
      • 26

      #3
      Two quick notes about this borg --

      1. Why is it hoarding Identify Rune scrolls? It should know them all by now.
      2. Why is it hanging on to the lantern of shadows?
      Attached Files

      Comment

      • agoodman
        Adept
        • Jan 2011
        • 114

        #4
        Taking a look.

        it keeps trying to cast Single Combat without a valid target..
        Single combat is new... I will need to put it on the "do not test/cast this spell" list until I know how to code for it.
        (Just added that change to my queued borg pull request)

        I've also noticed that it sometimes forgets to retrieve ammo and other floor items before recalling back, even if it's not in any danger.
        ​​​The "exploring" code needs work and is very complex. It frequently leaves good stuff lying around while it chases around to explore. At some point someone coded arrows (and all fired objects) to be very low priority with a comment about the borg spending all its time shooting then chasing down ammo. Not sure why that was the wrong thing for the borg to do... Probably won't get to a fix for that for a while

        Here's another example where it gets stuck trying to decide which weapon to use.
        ​Hmmm, my guess is it is messing up knowing when the weapon is "bad" for priests or paladins. I can check into it. This is based on power calculations. I can look into what it will take to fix this. It is worth noting that the borg does eventually kick free and move on.
        There are a lot of cases like this where the borg thinks item A is better then, once it has it, decides it was wrong and item B was better. I squish them when I can.

        1. Why is it hoarding Identify Rune scrolls? It should know them all by now..
        there isn't a check for "know all the runes" so late in the game the borg tends to hoard ID scrolls unnecessarily. Not sure how to add a "know all runes" check but I am thinking of adding a "if above level 45, only carry ID scrolls if you are carrying something that needs ID" check...

        2. Why is it hanging on to the lantern of shadows?

        I would need to debug into it. My guess is it thinks there is some resist it can swap that in to get.

        Comment

        • agoodman
          Adept
          • Jan 2011
          • 114

          #5
          Originally posted by Aodhlin
          Here's another example where it gets stuck trying to decide which weapon to use.
          Okay, this problem is much worse than I mentioned above and is a known bug. You will notice this only happens in the home. In the home, the borg does a much more complicated "what is best to wear" calculation. The borg thinks it should optimize its inventory and equipment by making multiple swaps (like "if I change weapons and this armor and ring, I am more powerful") but the borg code is state based so it makes the first change, discovers "hey, I am less powerful with this different weapon" (not keeping the "I had future plans" part) and switches back.... repeat till the anti-loop code kicks in. It is an area that needs a full rewrite. Not only does it need to "keep in mind" several steps to get the best inventory and equipment and home inventory but it needs to do it more efficiently than it currently does... currently it does a whole lot of memory copies of structures where it could be written to just shift pointers around.
          This is on my "todo" list but lately I have been chasing an issue where the borg seems to be getting keypresses queue messed up giving "unexpected request for direction" or error bells sounding.

          Comment

          • agoodman
            Adept
            • Jan 2011
            • 114

            #6
            Originally posted by Aodhlin
            2. Why is it hanging on to the lantern of shadows?
            Yup, this is giving coverage in the home for "resist light" which is not covered anywhere else... never mind that it will never be a good enough swap to actually use. The calculations on "what is best to keep at home" are pretty complicated and involve trying to keep swaps for each resist in case they ever come in handy later. Frequently things that are obvious to humans aren't so easy to code for.

            Comment

            • Aodhlin
              Scout
              • Jul 2024
              • 26

              #7
              Originally posted by agoodman
              Taking a look.


              Single combat is new... I will need to put it on the "do not test/cast this spell" list until I know how to code for it.
              (Just added that change to my queued borg pull request)
              Great! That should be a useful fix!

              Originally posted by agoodman
              ​​​The "exploring" code needs work and is very complex. It frequently leaves good stuff lying around while it chases around to explore. At some point someone coded arrows (and all fired objects) to be very low priority with a comment about the borg spending all its time shooting then chasing down ammo. Not sure why that was the wrong thing for the borg to do... Probably won't get to a fix for that for a while
              That makes sense. Now the borg spends all its time enchanting ammo at home though of course.

              Regarding the other issues, thanks for the response! I'll keep running it and submitting reports as I can!

              Comment

              • agoodman
                Adept
                • Jan 2011
                • 114

                #8
                Originally posted by Aodhlin
                Regarding the other issues, thanks for the response! I'll keep running it and submitting reports as I can!
                I appreciate the bug reports. Let me know what you find.
                I tend to prioritize "It crashes" or "it locks up/repeats commands forever" over "it is behaves non-optimally" ... because the borg is very stupid and there is a long list of optimizations it needs. See https://github.com/agoodman00/angband/discussions/21 for some.

                Comment

                • agoodman
                  Adept
                  • Jan 2011
                  • 114

                  #9
                  Originally posted by Aodhlin
                  Great! That should be a useful fix!
                  Should now be in the nightly

                  Comment

                  • Aodhlin
                    Scout
                    • Jul 2024
                    • 26

                    #10
                    In this example (from the previous nightly), the borg is trying and failing to sell a ring, and gets stuck.

                    Attached Files

                    Comment

                    • agoodman
                      Adept
                      • Jan 2011
                      • 114

                      #11
                      Originally posted by Aodhlin
                      In this example (from the previous nightly), the borg is trying and failing to sell a ring, and gets stuck.
                      gotta fix the check for that being unsellable. Must have some check messed up. I thought there was a "if (x, y) is negative, don't give a value" and "objects with a negative value can't be sold".

                      Comment

                      • Aodhlin
                        Scout
                        • Jul 2024
                        • 26

                        #12
                        OK!

                        I noticed that if you have borg cheat death enabled, the borg will sometimes panic after dying and stop running. I don't have a save file to easily reproduce it, but if you experiment with different option combinations, it should come up.

                        Comment

                        • agoodman
                          Adept
                          • Jan 2011
                          • 114

                          #13
                          Originally posted by Aodhlin
                          OK!
                          I noticed that if you have borg cheat death enabled, the borg will sometimes panic after dying and stop running. I don't have a save file to easily reproduce it, but if you experiment with different option combinations, it should come up.
                          Hmmm, I thought I fixed most of those in the more recent versions. When I have caught those they are caused by the borg getting messages with leading blanks sometimes when the borg cheats death. I think, unlike a "-more" issue I have a post about, the leading blanks issues are caused by the way the borg interacts with the game and not something the user will ever see... but I could be wrong. If I can ever catch the game giving leading blanks when cheating death during manual play I will write up a bug and try to figure out what is going on. Either way, I thought I cleaned it up... I will need to see if I can get it to fail again and track it down.

                          Comment

                          • Aodhlin
                            Scout
                            • Jul 2024
                            • 26

                            #14
                            Originally posted by agoodman

                            Hmmm, I thought I fixed most of those in the more recent versions. When I have caught those they are caused by the borg getting messages with leading blanks sometimes when the borg cheats death. I think, unlike a "-more" issue I have a post about, the leading blanks issues are caused by the way the borg interacts with the game and not something the user will ever see... but I could be wrong. If I can ever catch the game giving leading blanks when cheating death during manual play I will write up a bug and try to figure out what is going on. Either way, I thought I cleaned it up... I will need to see if I can get it to fail again and track it down.
                            In order to catch more of these, we're going to have to doom the borg to an endless cycle for death and rebirth. Awesome!

                            Here's a save from the latest nightly build where the borg seems to be struggling with swaps/stores.
                            Attached Files

                            Comment

                            • Aodhlin
                              Scout
                              • Jul 2024
                              • 26

                              #15
                              This borg froze up due to fear/hallucination.

                              Attached Files

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎