Borg bugs and feature requests

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • backwardsEric
    Knight
    • Aug 2019
    • 527

    #46
    Originally posted by agoodman
    I can try a couple of things here...
    1) it should explore a new area if it checked and can't dig
    2) it shouldn't make a goal of something it needs to dig if it can't dig
    3) at some point it if it is hungry enough, it should dig.
    Since there is a down staircase there, another option (if playing with connected stairs, without forced descent, and without persistent levels as is the case here), it could take the down stair and immediately come back up to get a completely new dungeon.

    Comment

    • agoodman
      Adept
      • Jan 2011
      • 114

      #47
      Originally posted by backwardsEric
      Since there is a down staircase there, another option (if playing with connected stairs, without forced descent, and without persistent levels as is the case here), it could take the down stair and immediately come back up to get a completely new dungeon.
      Yes, I just don't want him to go down and explore... I might need him to do > < but he might do that automatically since he will get down there and think "Hungry! I gotta get upstairs... hey, I am on stairs!". I will have to check it out. It is going to take some debugging. I will be checking into it this week.

      BTW, merged your pull requests. I am just making a new sandbox to test the code quickly on my machine before I create a pull request to the base code.

      Comment

      • agoodman
        Adept
        • Jan 2011
        • 114

        #48
        ok, I think the immediate fix for this is "don't flow toward veins if you are hungry" which stops the problem of the borg flowing up to the vein then deciding not to dig because he is hungry. (Unfortunately for Alair he then runs into the next room and gets eaten by mice. Stupid borg) I will test this some more but this is probably the first step. I think some checks need to be combined for a single "can't dig" check.
        I think I need to change this code around to not flow to veins when hungry but DO dig if it gets you to where you want to go, even if hungry. That will enter the fix queue. In fact I think the filter for flowing toward a vein is probably "if down to x foods" so the borg doesn't dig around till he is out of food and hungry then stop digging. IIRC, that is what the original change to not dig when hungry was supposed to accomplish.

        Comment

        • backwardsEric
          Knight
          • Aug 2019
          • 527

          #49
          With the latest post-4.2.5 code (last commit is https://github.com/angband/angband/c...150f6c1d929bc2 ), there's cases where the borg repeatedly tries to dig out a granite wall despite the game saying "You chip away futilely at the granite wall." (which means there's no chance for success; for rubble the similar message is "You dig in the rubble with little effect."). I haven't checked if that's because the borg miscalculates the chance of successfully digging or if it proceeds to dig even knowing there's no chance.

          Comment

          • backwardsEric
            Knight
            • Aug 2019
            • 527

            #50
            In the attached save file, the borg playing a blackguard has equipped a ring of searching with the cowardice curse and has managed to be surrounded by the townsfolk. The ring has been fully identified so, at least in my mind, there's absolutely no reason to keep it.
            Attached Files

            Comment

            • agoodman
              Adept
              • Jan 2011
              • 114

              #51
              Originally posted by backwardsEric
              With the latest post-4.2.5 code (last commit is https://github.com/angband/angband/c...150f6c1d929bc2 ), there's cases where the borg repeatedly tries to dig out a granite wall despite the game saying "You chip away futilely at the granite wall." (which means there's no chance for success; for rubble the similar message is "You dig in the rubble with little effect."). I haven't checked if that's because the borg miscalculates the chance of successfully digging or if it proceeds to dig even knowing there's no chance.
              The borg doesn't currently check for the "bad digging" messages. It relies on having calculated the chance of digging right and thinking it can dig. I don't think my recent digging change caused this but... maybe. Either there is a case where he thinks he can dig but he can't or he is desperate to get somewhere and is digging even though he has low chance of success. If you can get a save file of him doing this, I can look into it further, otherwise, I can look at the code but it will be hard to fix.

              Comment

              • agoodman
                Adept
                • Jan 2011
                • 114

                #52
                Originally posted by backwardsEric
                In the attached save file, the borg playing a blackguard has equipped a ring of searching with the cowardice curse and has managed to be surrounded by the townsfolk. The ring has been fully identified so, at least in my mind, there's absolutely no reason to keep it.
                I may not have coded for the cowardice curse. That is a new curse so it is possible I don't have code to avoid it. I will take a look.

                Comment

                • agoodman
                  Adept
                  • Jan 2011
                  • 114

                  #53
                  Originally posted by agoodman
                  I may not have coded for the cowardice curse. That is a new curse so it is possible I don't have code to avoid it. I will take a look.
                  Yep. Looks like it is on the list of curses the borg knows but doesn't yet handle. So far that's been okay because the borg usually will try to uncurse such objects quickly... but it looks like yours got stuck before it could. I will add some checks for the newer curses.

                  Comment

                  • Evilpotatoe
                    Scout
                    • Apr 2010
                    • 31

                    #54
                    Taking a glance at the borg, I notice it loves both digging and carrying a digger in inventory but doesn't seem to get the point of it



                    Savefile, if interested
                    Last edited by Evilpotatoe; October 25, 2023, 19:16.

                    Comment

                    • agoodman
                      Adept
                      • Jan 2011
                      • 114

                      #55
                      @backwardsEric Shouldn't it be auto-switching to use the shovel? Is there something that would prevent this?

                      Comment

                      • backwardsEric
                        Knight
                        • Aug 2019
                        • 527

                        #56
                        Originally posted by agoodman
                        @backwardsEric Shouldn't it be auto-switching to use the shovel? Is there something that would prevent this?
                        I'm not able to load the savefile; is there a chance that it was generated with a modded version? Looking at the code for the tunneling command, the only reason it wouldn't be able to swap for a digger in the inventory is if the currently wielded weapon or the digger has a sticky curse, but there's no weapons or diggers with sticky curses in Vanilla.

                        Comment

                        • agoodman
                          Adept
                          • Jan 2011
                          • 114

                          #57
                          Originally posted by backwardsEric
                          I'm not able to load the savefile; is there a chance that it was generated with a modded version? Looking at the code for the tunneling command, the only reason it wouldn't be able to swap for a digger in the inventory is if the currently wielded weapon or the digger has a sticky curse, but there's no weapons or diggers with sticky curses in Vanilla.
                          I didn't notice the save file. Ya, I am having the same issue. It looks like it is failing when loading the dungeon. I wonder if this is pre-dungeon size fix and we happen to be past that limit on this save.

                          That said, the problem here, IMO, is that it doesn't tell you it used the digger. So it is probably trying the digger and failing to dig. What do you think of changing the messages to say things like
                          You have removed the rubble with your swap digger.
                          when you auto-swap or
                          You have removed the rubble with your weapon.
                          when you don't? Gets slightly wordy when
                          You dig in the rubble {with your swap digger/with your weapon} with little effect.
                          but not too bad. I can put together a quick change around this.

                          Comment

                          • Evilpotatoe
                            Scout
                            • Apr 2010
                            • 31

                            #58
                            File was indeed broken.
                            After several reuploads, it was broken everytime... dunno why. Maybe the hyphen ?
                            I don't remember my filezilla breaking sent file in the past.

                            Anyway, looks fine in a zip (I fixed my link).

                            --
                            I downloaded a fresh Angband 4.2.5 just to test the borg, so there's nothing particular on my version
                            But Is that digging behavior a real new discoverey ?
                            It looked so "obvious" to me I thought it would be a known issue. I'm not even sure I changed one birth option.

                            Comment

                            • agoodman
                              Adept
                              • Jan 2011
                              • 114

                              #59
                              Originally posted by Evilpotatoe
                              File was indeed broken.
                              After several reuploads, it was broken everytime... dunno why. Maybe the hyphen ?
                              I don't remember my filezilla breaking sent file in the past.

                              Anyway, looks fine in a zip (I fixed my link).

                              --
                              I downloaded a fresh Angband 4.2.5 just to test the borg, so there's nothing particular on my version
                              But Is that digging behavior a real new discoverey ?
                              It looked so "obvious" to me I thought it would be a known issue. I'm not even sure I changed one birth option.
                              This zipped save file works for me. With the latest code (including the fix I mentioned doing last time) I see
                              You tunnel into the magma vein with treasure with your swap digger. <100x>
                              so it -is- using the digger. I am now checking if the code has miscalculated the chance of successful digging so it is trying to dig when it shouldn't. I am not confident in the code that calculates the digging chance with swap.

                              As for if this digging behavior is new, I think it is. It is definitely new for the borg to take advantage of it rather than manually swapping to the digger.

                              Comment

                              • agoodman
                                Adept
                                • Jan 2011
                                • 114

                                #60
                                ok, its calculation of the digging chance isn't great (code needs improvement) and additionally this character is on the hairy edge of what the borg considers "acceptable chance of digging". The game calculates the odds at 192 out of 1600
                                okay = (chance > randint0(1600));
                                so it failing over and over seems long odds... if not for a bug where the borg is resetting the random seed on repeated commands! Argh! Time to fix that one.

                                The digging chance calculations will go on my "todo" queue.

                                Comment

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