Borg update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • s0be
    Apprentice
    • Jan 2008
    • 96

    #61
    I don't know if this will be of any help to you, but...

    Over the past few days, I've been running into a 'hung' borg (not amnesiac, not disconnected). I just ran into it now, attached gdb, and here's the relevent spot:
    Code:
    borg_danger_aux (y=7, x=116, c=1, i=22, average=true, full_damage=true) at borg4.c:7074
    7074	    for (k = 0; k < 32; k++)
    When I get these, I just kill (not kill -9 btw) the pid and then restart it and it continues fine.

    if I get any other amnesiac disconnects, I'll send you the save file.

    [edit] I see a new borg popped on the 24th... I'm upping my borg code, I have a save file that's suffering from this right now, so I'll make a backup and send it if it persists[/edit]
    [edit2]E-Mail sent[/edit2]
    Last edited by s0be; October 25, 2008, 21:57.

    Comment

    • APWhite
      Adept
      • Jul 2007
      • 244

      #62
      Anytime you get a freaky borg, send the savefile to my email.

      The hang above is going to be a problem. Any idea what type of monster he was fighting at the time?

      The update on the 24th is a pretty important one. I screwed up and forgot a couple of important lines of code in a previous update. That slip was having him rest adjacent to molds and such.

      PS, thanks for the notes on the leather gloves [+1, -1]. I was able to track down the cause and correct it properly. The problem only surfaced when he had a deep recall depth. All my tests were with shallow borgs.
      St George Chiropractor
      Angband Borg Homepage

      Comment

      • APWhite
        Adept
        • Jul 2007
        • 244

        #63
        Originally posted by s0be
        I don't know if this will be of any help to you, but...

        Over the past few days, I've been running into a 'hung' borg (not amnesiac, not disconnected). I just ran into it now, attached gdb, and here's the relevent spot:
        Code:
        borg_danger_aux (y=7, x=116, c=1, i=22, average=true, full_damage=true) at borg4.c:7074
        7074	    for (k = 0; k < 32; k++)
        When I get these, I just kill (not kill -9 btw) the pid and then restart it and it continues fine.

        if I get any other amnesiac disconnects, I'll send you the save file.

        [edit] I see a new borg popped on the 24th... I'm upping my borg code, I have a save file that's suffering from this right now, so I'll make a backup and send it if it persists[/edit]
        [edit2]E-Mail sent[/edit2]

        Great savefile. I was able to find the problem immediately. The fix took about 2 minutes and then about 10-15 more to test and retest it. Update made. Problem was in borg6.c in the borg_caution() routine wherein he looks at strategically retreating if surrounded. Your borg had 322 grids that he was considering. He was stuck calculating the total danger that each of the 6 monsters was imposing onto each possible pathway to each of those 322 grids. In the process, he could (and did) attempt to test every possible pathway to a grid very far from his current position. This was slowing him down. In reality, he would not have retreated to a grid very far from him. He usually retreats about 1 to 5 grids, rarely 6 grids. The fix was applied by limited the depth of the retreating.
        St George Chiropractor
        Angband Borg Homepage

        Comment

        • s0be
          Apprentice
          • Jan 2008
          • 96

          #64
          Originally posted by APWhite
          Great savefile. I was able to find the problem immediately. The fix took about 2 minutes and then about 10-15 more to test and retest it. Update made. Problem was in borg6.c in the borg_caution() routine wherein he looks at strategically retreating if surrounded. Your borg had 322 grids that he was considering. He was stuck calculating the total danger that each of the 6 monsters was imposing onto each possible pathway to each of those 322 grids. In the process, he could (and did) attempt to test every possible pathway to a grid very far from his current position. This was slowing him down. In reality, he would not have retreated to a grid very far from him. He usually retreats about 1 to 5 grids, rarely 6 grids. The fix was applied by limited the depth of the retreating.
          I can confirm this fix worked. I just ran into it again, re-upped the borg and BAM, it works. Sooner or later, I'll get around to sending you my borg.dat... 4292 and counting... haha

          Comment

          • s0be
            Apprentice
            • Jan 2008
            • 96

            #65
            I may tackle this tomorrow night if you don't have time to look at it (or see this post before then). Any chance you'd add a reason for money scumming to the borg screen? Also, the code that updates the 'unique on level line' doesn't clear out what's there before updating to a new unique (when multiple are seen). This can leave partial names and parenthesis around, which is ugly. Finally, I'm seeing crashes during money scumming. I haven't had time to check a dump of what's happening though.

            Comment

            • APWhite
              Adept
              • Jul 2007
              • 244

              #66
              Originally posted by s0be
              I may tackle this tomorrow night if you don't have time to look at it (or see this post before then). Any chance you'd add a reason for money scumming to the borg screen? Also, the code that updates the 'unique on level line' doesn't clear out what's there before updating to a new unique (when multiple are seen). This can leave partial names and parenthesis around, which is ugly. Finally, I'm seeing crashes during money scumming. I haven't had time to check a dump of what's happening though.
              Money scumming crashes are usually happening at night when there are lots of monsters in town. It might be a game crash. I have not been able to get the borg to crash for me while scumming, so its hard to know for sure. But I am sure they happen at night. If the borg sees a town monster he will track it down. He is resting 5 rounds each time, and allowing the denizens to breed, but they don't show up in his lighted area so he can't break the rest-cycle and hunt them down. What would help him is not resting 5 rounds at night. Forcing him to make a random movement each round would get him encountering monsters sooner, thus keeping their population manageable.

              I know what your saying about the borg status screen. I need to repair the deep heal stuff too.

              APWhite
              St George Chiropractor
              Angband Borg Homepage

              Comment

              • s0be
                Apprentice
                • Jan 2008
                • 96

                #67
                I have a hack fix for the scary guy on level problem. I'll clean it up and send it your way shortly.

                The gist of it is:

                Code:
                int foo;
                for(foo=56; foo < angband_term[j]->wid; foo++)
                  Term_write(2,56,null,something that sets the color, " ");
                right before you do the conditional scary guy write. I plan to just make a helper function that is like Term_clear_range(start,end)
                or something like that...

                Comment

                • s0be
                  Apprentice
                  • Jan 2008
                  • 96

                  #68
                  Originally posted by APWhite
                  Money scumming crashes are usually happening at night when there are lots of monsters in town. It might be a game crash. I have not been able to get the borg to crash for me while scumming, so its hard to know for sure. But I am sure they happen at night. If the borg sees a town monster he will track it down. He is resting 5 rounds each time, and allowing the denizens to breed, but they don't show up in his lighted area so he can't break the rest-cycle and hunt them down. What would help him is not resting 5 rounds at night. Forcing him to make a random movement each round would get him encountering monsters sooner, thus keeping their population manageable.
                  I just got one, have the save file from immediately after (pity, it's from after and not before), and the crash happened during day.

                  Comment

                  • s0be
                    Apprentice
                    • Jan 2008
                    • 96

                    #69
                    Code:
                    --- angborg-virgin/src/borg9.c	2008-10-27 10:38:22.000000000 -0400
                    +++ angborg/src/borg9.c	2008-10-30 20:15:14.000000000 -0400
                    @@ -6125,10 +6125,14 @@
                     
                        if (unique_on_level) attr = TERM_WHITE;
                        else attr = TERM_SLATE;
                    +
                    +   int foo;
                    +   for(foo=58; foo < angband_term[j]->wid; foo++)
                    +       Term_putstr(foo,2,-1,attr," ");
                    +
                        Term_putstr(42, 2, -1, attr, "Unique on level");
                        if (unique_on_level) Term_putstr(58, 2, -1, attr, format("(%s)",
                                            r_name + r_info[unique_on_level].name));
                    -   else Term_putstr(58, 2, -1, attr, "                                   ");
                     
                        if (scaryguy_on_level) attr = TERM_WHITE;
                        else attr = TERM_SLATE;

                    Comment

                    • takkaria
                      Veteran
                      • Apr 2007
                      • 1951

                      #70
                      Originally posted by s0be
                      Code:
                      --- angborg-virgin/src/borg9.c	2008-10-27 10:38:22.000000000 -0400
                      +++ angborg/src/borg9.c	2008-10-30 20:15:14.000000000 -0400
                      @@ -6125,10 +6125,14 @@
                       
                          if (unique_on_level) attr = TERM_WHITE;
                          else attr = TERM_SLATE;
                      +
                      +   int foo;
                      +   for(foo=58; foo < angband_term[j]->wid; foo++)
                      +       Term_putstr(foo,2,-1,attr," ");
                      +
                          Term_putstr(42, 2, -1, attr, "Unique on level");
                          if (unique_on_level) Term_putstr(58, 2, -1, attr, format("(%s)",
                                              r_name + r_info[unique_on_level].name));
                      -   else Term_putstr(58, 2, -1, attr, "                                   ");
                       
                          if (scaryguy_on_level) attr = TERM_WHITE;
                          else attr = TERM_SLATE;
                      You can make things easier for yourself by doing: Term_erase(58, 2, 255), or something along those lines.
                      takkaria whispers something about options. -more-

                      Comment

                      • s0be
                        Apprentice
                        • Jan 2008
                        • 96

                        #71
                        Originally posted by takkaria
                        You can make things easier for yourself by doing: Term_erase(58, 2, 255), or something along those lines.
                        Thanks, I was planning on digging deeper into the term handling code first. In actuality, the borg redraws all statuses every time, so a term clear function first thing in the function would have sufficed, which was what I was planning on looking into.

                        Comment

                        • chem
                          Adept
                          • Sep 2007
                          • 150

                          #72
                          Is there any news on the borg and [V] 3.1.x? I am interested in testing the borg for that version. In fact, I am hoping the borg can be merged as a patch, to be a feature of [V] (but that's a different thread).

                          Comment

                          • takkaria
                            Veteran
                            • Apr 2007
                            • 1951

                            #73
                            Originally posted by chem
                            Is there any news on the borg and [V] 3.1.x? I am interested in testing the borg for that version. In fact, I am hoping the borg can be merged as a patch, to be a feature of [V] (but that's a different thread).
                            I don't recommend changing to accommodate 3.1 until there's a version not marked "beta" out. I don't think it'd be worth anyone's time.
                            takkaria whispers something about options. -more-

                            Comment

                            • APWhite
                              Adept
                              • Jul 2007
                              • 244

                              #74
                              I will take care of the 3.1.X as soon as it is done. It won't take me too long to make the update.

                              It will go much faster If I get a detailed change-log. Stuff like "I added a few more ego items" is a lot less helpful than "Added Ego rings of Bad Breath, Ego Sword of Breakage"

                              Tracking down shop/store layout changes takes a while. But I should be able to get through it.

                              If you don't mind, the borg does need to have some changes made to the game code in order to work a bit more efficiently. Usually is stuff like Extern'ing an function and little stuff like that. Most of the game code changes I need are found in the borg source code zipfile. Open the games source code and search for APW and you will find them. The files are birth.c
                              cmd0.c, externs.h, main-win.c, store.c, util.c, variable.c

                              Do you need me to detail the changes in a post?


                              APWhite
                              St George Chiropractor
                              Angband Borg Homepage

                              Comment

                              • takkaria
                                Veteran
                                • Apr 2007
                                • 1951

                                #75
                                Originally posted by APWhite
                                I will take care of the 3.1.X as soon as it is done. It won't take me too long to make the update.

                                It will go much faster If I get a detailed change-log. Stuff like "I added a few more ego items" is a lot less helpful than "Added Ego rings of Bad Breath, Ego Sword of Breakage"

                                Tracking down shop/store layout changes takes a while. But I should be able to get through it.

                                If you don't mind, the borg does need to have some changes made to the game code in order to work a bit more efficiently. Usually is stuff like Extern'ing an function and little stuff like that. Most of the game code changes I need are found in the borg source code zipfile. Open the games source code and search for APW and you will find them. The files are birth.c
                                cmd0.c, externs.h, main-win.c, store.c, util.c, variable.c

                                Do you need me to detail the changes in a post?
                                I'll take a look.

                                For V 3.1, it's very hard to give an exact changelog, since so much has changed, but I will try to get one done for the first non-beta. You'll be glad to hear I've not done anything with the stores.
                                takkaria whispers something about options. -more-

                                Comment

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