Borg update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • APWhite
    Adept
    • Jul 2007
    • 244

    Borg update

    The borg has been updated to work with 309B.

    There were some shopping key changes that needed to be addressed, and a few tiny fixes on some other things. There was an issue with my new VS2008 not producing working exe files d/t a dll missing on some machines. That has all be worked out.

    Get your borg Here.

    APWhite
    St George Chiropractor
    Angband Borg Homepage
  • Zikke
    Veteran
    • Jun 2008
    • 1069

    #2
    Could you quickly summarize what this program does? I couldn't find it on the website
    A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
    A/FA W H- D c-- !f PV+++ s? d P++ M+
    C- S+ I- !So B ac++ GHB? SQ? !RQ V F:

    Comment

    • roustk
      Adept
      • Dec 2007
      • 167

      #3
      Originally posted by Zikke
      Could you quickly summarize what this program does? I couldn't find it on the website
      [snark] It proves that Morgoth can be defeated by anyone, if they have enough patience. [/snark]

      Really, it is an automated player of Angband. Some people enjoy tweaking its logic to improve how well it plays. I believe that it has a "screensaver" mode (where it will play in lieu of your screensaver) in addition to a more standard mode (looking like you are playing, but without requiring any keypresses).

      Comment

      • APWhite
        Adept
        • Jul 2007
        • 244

        #4
        Originally posted by roustk
        [snark] It proves that Morgoth can be defeated by anyone, if they have enough patience. [/snark]
        Given enough monkeys and enough typewriters? Borgs win with about 19-35 million turns.
        St George Chiropractor
        Angband Borg Homepage

        Comment

        • Zikke
          Veteran
          • Jun 2008
          • 1069

          #5
          Is playing it on full-screen size not supported? It crashes for me when I try that.


          edit: And it got a warrior up to clvl 31 and then he died from Starvation. -_-


          edit2: Best (and geekiest) screensaver ever ^_^
          Last edited by Zikke; August 13, 2008, 01:58.
          A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
          A/FA W H- D c-- !f PV+++ s? d P++ M+
          C- S+ I- !So B ac++ GHB? SQ? !RQ V F:

          Comment

          • Kadoles
            Apprentice
            • Feb 2008
            • 58

            #6
            [borg-log.txt]

            2/20/08 21:41
            Hareiku the Gnome Mage, Level 50/50
            Exp: 7617799 Gold: 3482621 Turn: 33062444
            Killed on level: 80 (max. 80) by a Nightwalker
            Borg Compile Date: Feb 9 2008

            [/borg-log.txt]

            is there anyway to format the borg log in .csv, or something like that. I want to be able to sort my log by different things like:cl, dl, turns, gold, exp,
            maybe output like

            Name,Race,Class,Current clevel,max clevel,exp,gold,turns,killed on level,deepest level,killed by,birth date,death date,total hours played,

            that way i could import it into excel and run some different sorts on it.

            or...

            does anyone know how ti write a vb script to read the log and reformat it into .csv? I don't think it would be hard to do but i don't know very uch about scripting.
            Current Char

            Comment

            • Zikke
              Veteran
              • Jun 2008
              • 1069

              #7
              2008/08/13 10:53
              Arielle the Half-Elf Ranger, Level 50/50
              Exp: 7222121 Gold: 3405548 Turn: 46380301
              Killed on level: 56 (max. 57) by a Death drake
              Borg Compile Date: Aug 11 2008



              It tried to Teleport Other 3 times and it failed all 3 times
              A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
              A/FA W H- D c-- !f PV+++ s? d P++ M+
              C- S+ I- !So B ac++ GHB? SQ? !RQ V F:

              Comment

              • roustk
                Adept
                • Dec 2007
                • 167

                #8
                I've been playing around with the borg, seeing how it deals with artifactless Half-Troll Mages. It is doing better than I would have thought -- 3 level 40+ mages in the first 90. Looks like one of them died of bad logic, while another of those deaths was essentially unavoidable:
                Code:
                It breathes gravity.
                Gravity warps around you.
                You feel yourself moving slower!
                You have been stunned.
                # SPELL_023:It (+)
                # Invisible monster nearby.
                # Creating a monster 'Kavlax the Many-Headed' at (34,160), danger: 964, HP: 1300
                , Time: 1213, Index: 423
                # Invisible monster nearby.
                # Fearing region (32,160) value 500 because of a non-LOS It
                # SPELL_023:It (5)
                # Loc:32,160 Dep:40 Lev:42 HP:297/497 SP:152/324 Danger:p=1285
                # Protected by Resistance (borg turns:10; game turns:25)
                # Protected by Mystic Shield
                # Protected by PFE
                # Performing defence type 23 with value 10
                # Casting Spear of Light (1,6).
                & Key <m>
                & Key <b>
                & Key <g>
                & Key <8>
                # Illuminating this hallway
                A line of blue shimmering light appears.
                Kavlax the Many-Headed breathes sound.
                Kavlax the Many-Headed breathes frost.
                Kavlax the Many-Headed bites you. <4x>
                You die.
                Three nasty breaths from Kavlax, the first from a darkened hallway. The borg probably should have teleported rather than illuminated, but that is a tough call. It knew that there were impact hounds in the area, so gravity hounds were a reasonable guess.


                The second really deep mage died due to bad logic, however:
                Code:
                # Loc:31,105 Dep:45 Lev:44 HP:290/506 SP:161/344 Danger:p=370
                # Protected by Resistance (borg turns:37; game turns:34)
                # Protected by Mystic Shield
                # Protected by PFE
                # Performing defence type 10 with value 370
                # Targeting Adunaphel the Quiet who has 1608 Hit Points (31,106).
                & Key <*>
                & Key <p>
                & Key <6>
                & Key <5>
                # Logging Spell pathway (31,105).
                # Logging Spell pathway (31,106): Adunaphel the Quiet, danger 295
                # Attempting to cast T.O.
                # Casting Teleport Other (3,1).
                & Key <m>
                & Key <d>
                & Key <b>
                & Key <5>
                Target Selected.
                The Impact hound breathes force.
                You have been stunned.
                Adunaphel the Quiet misses you.
                Adunaphel the Quiet hits you.
                Adunaphel the Quiet misses you.
                Adunaphel the Quiet touches you.
                You feel your life draining away!
                # SPELL_026:The Impact hound (+)
                # Perhaps wall near targetted location (31,106)
                # Guessing wall (31,106) under ghostly target (31,106)
                # SPELL_026:The Impact hound (3)
                The borg repeatedly cast teleport other (six times in the log) on a "ghostly target" it suspected was in a wall. It seems like it should have given up after one or two and switched to stone to mud...

                Fairly good kit, however:
                Code:
                  [Character Equipment]
                a) a Halberd of *Slay Animal* (3d5) (+8,+8) (+2)
                b) a Heavy Crossbow of Extra Shots (x4) (+16,+8) (+1)
                c) a Ring of Intelligence (+3)
                d) a Ring of Intelligence (+4)
                e) an Amulet of ESP (+5)
                f) a Wooden Torch of Brightness (4601 turns)
                g) Green Dragon Scale Mail (-2) [30,+10] (charging)
                h) a Cloak of Aman [1,+16] (+1 to stealth)
                i) a Small Metal Shield of Elvenkind [3,+16] (+2 to stealth)
                j) a Hard Leather Cap of Intelligence [2,+7] (+2)
                k) a Set of Gauntlets of Free Action [2,+14]
                l) a Pair of Metal Shod Boots of Speed [6,+8] (+10)
                I'll have to see if I can convince the borg to inscribe known resistances on its stuff.

                Comment

                • roustk
                  Adept
                  • Dec 2007
                  • 167

                  #9
                  Originally posted by roustk
                  The borg repeatedly cast teleport other (six times in the log) on a "ghostly target" it suspected was in a wall. It seems like it should have given up after one or two and switched to stone to mud...
                  Definite bug.

                  Check around line 9509 of borg6.txt (where the "Logging Spell pathway" notes are generated).

                  The borg should check for walls before it checks for targets, so the correct structure of the ifelse is:
                  Code:
                                  if (!borg_cave_floor_grid(ag))
                                  {
                                          borg_note(format("# Logging Spell pathway (%d,%d): Wall 
                  grid.", n_y, n_x));
                                          break;
                                  }
                                  else if (ag->kill)
                                  {
                                          borg_note(format("# Logging Spell pathway (%d,%d): %s, d
                  anger %d",
                                                    n_y, n_x, (r_name + r_info[kill->r_idx].name),
                                                    borg_danger_aux(c_y,c_x, 1, ag->kill, TRUE)));
                                  }
                                  else
                                  {
                                          borg_note(format("# Logging Spell pathway (%d,%d).", n_y
                  , n_x));
                                  }
                  It lost another level 45 HT Mage to a pack of Dreads, several of whom were protected from TO by this bug. (EDIT: while I was fixing this, another lvl 43 mage died to an Ethereal Dragon in this way.)

                  NOTE: I have not actually tested this yet. I want to double-check what other spells use this particular piece of code -- some (StM against golems?) probably want to check for the target before the wall. APWhite knows this code better, so he may be able to immediately confirm that this is the right fix.
                  Last edited by roustk; August 14, 2008, 14:43.

                  Comment

                  • roustk
                    Adept
                    • Dec 2007
                    • 167

                    #10
                    Originally posted by roustk
                    NOTE: I have not actually tested this yet. I want to double-check what other spells use this particular piece of code -- some (StM against golems?) probably want to check for the target before the wall. APWhite knows this code better, so he may be able to immediately confirm that this is the right fix.
                    Still not tested, but Teleport Other is the only spell that uses this code. Mainly the standard tele other logic, but also the "tele other things that threaten my sea of runes on level 100 when Morgoth is around" logic. The fix should be good.

                    Comment

                    • Zikke
                      Veteran
                      • Jun 2008
                      • 1069

                      #11
                      Yep, that T.O. logic is what killed my 50 ranger with the Death Drake. Are you the author of this? Or just passing it along?
                      A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
                      A/FA W H- D c-- !f PV+++ s? d P++ M+
                      C- S+ I- !So B ac++ GHB? SQ? !RQ V F:

                      Comment

                      • roustk
                        Adept
                        • Dec 2007
                        • 167

                        #12
                        Originally posted by roustk
                        Still not tested, but Teleport Other is the only spell that uses this code. Mainly the standard tele other logic, but also the "tele other things that threaten my sea of runes on level 100 when Morgoth is around" logic. The fix should be good.
                        The fix is not good. The ifelse logic was clearly wrong, but the borg forgets these walls when it updates the map between shots.

                        borg_update_map() in borg5.c needs to be updated, and I'm not quite sure how. The problem is around line 3562, where it marks "old wall/door grids as probably floor grids" when one disappears. As noted in the comment for borg_update_map, this assumption is good "unless the grid contains a monster which can pass through walls".

                        I believe that the correct fix is to check if there is a monster on the space, check if it has RF2_PASS_WALL, and then leave the map unchanged. One example of this logic is around line 4680 in borg5.c, where FEAT_INVIS grids (unknown probable floor) are converted into FEAT_FLOOR (unless a PASS_WALL monster is there).

                        Unfortunately, since I had never looked at the borg code before yesterday, I don't know if there is a way to get borg_kills[] from borg_grids[][] coordinates. I'd rather not loop over all known monsters for every space...

                        [Edited: "forgets" in first paragraph was "doesn't remember".]

                        Comment

                        • roustk
                          Adept
                          • Dec 2007
                          • 167

                          #13
                          Originally posted by roustk
                          The fix is not good. The ifelse logic was clearly wrong, but the borg forgets these walls when it updates the map between shots.
                          To be clear, I added debugging output just before my modified ifelse in borg6.c. The latest level 40 character died with logging like:
                          Code:
                          # Perhaps wall near targetted location (31,91)
                          # Guessing wall (31,91) under ghostly target (31,91)
                          ...
                          # Spell pathway tests: 1, 57, 0
                          # Logging Spell pathway (30,91).
                          # Spell pathway tests: 2, 57, 21
                          # Logging Spell pathway (31,91): Xaren, danger 2000
                          # Attempting to cast T.O.
                          The debugging line is produced by:
                          Code:
                                  borg_note(format("# Spell pathway tests: %d, %d, %d",
                                    ag->feat,ag->info,ag->kill));
                          The borg thinks that the space it is standing on (30,91) is FEAT_FLOOR while the space the Xaren is on (31,91) is FEAT_INVIS (presumed floor), even though it set to FEAT_WALL_SOLID at the "Ghostly wall" comment.

                          (This also answers my question about how to get from grids to kills -- ag->kill.)

                          Comment

                          • APWhite
                            Adept
                            • Jul 2007
                            • 244

                            #14
                            Originally posted by roustk
                            Definite bug.

                            Check around line 9509 of borg6.txt (where the "Logging Spell pathway" notes are generated).

                            The borg should check for walls before it checks for targets, so the correct structure of the ifelse is:
                            Code:
                                            if (!borg_cave_floor_grid(ag))
                                            {
                                                    borg_note(format("# Logging Spell pathway (%d,%d): Wall 
                            grid.", n_y, n_x));
                                                    break;
                                            }
                                            else if (ag->kill)
                                            {
                                                    borg_note(format("# Logging Spell pathway (%d,%d): %s, d
                            anger %d",
                                                              n_y, n_x, (r_name + r_info[kill->r_idx].name),
                                                              borg_danger_aux(c_y,c_x, 1, ag->kill, TRUE)));
                                            }
                                            else
                                            {
                                                    borg_note(format("# Logging Spell pathway (%d,%d).", n_y
                            , n_x));
                                            }
                            It lost another level 45 HT Mage to a pack of Dreads, several of whom were protected from TO by this bug. (EDIT: while I was fixing this, another lvl 43 mage died to an Ethereal Dragon in this way.)

                            NOTE: I have not actually tested this yet. I want to double-check what other spells use this particular piece of code -- some (StM against golems?) probably want to check for the target before the wall. APWhite knows this code better, so he may be able to immediately confirm that this is the right fix.
                            Indeed, this would not be the correct fix for the behavior. This is only a reporting routine. It does not determine the relative value of doing the deed. What you are after is getting him to not shoot at a "ghostly" or PASS_WALL creature unless that critter is on a absolutely known floor grid.

                            The fix will be in borg6.c in borg_launch_bolt_aux_hack() about line 5795 in my version of borg6.c (for 309B). This routine is part of a larger process to assess the relative value of each grid along a pathway. There have been two checks for PASS_WALL creatures in this routine. Somehow these PASS_WALL creatures are making it through.

                            The next place to check would be to catch him in the act and see why he is miss-id'ing the grid. Most likely he is tagging the grid under the PASS_WALL monster as a floor grid. I have investigated that several years ago and made some changes to correct it.

                            It is possible that the problem is related to the type of wall grid that borg is using. Most of the time, he assumes walls are the FEAT_WALL_EXTRA variety (Granite). In a few places, he uses the FEAT_WALL_SOLID (another granite). I will go through and replace the FEAT_WALL_SOLIDs with _EXTRAs but I am not fully convinced it will solve this issue. Look for the update on the webpage.

                            I will also try to catch the borg targetting ghostly critters and see if I can track it down.
                            APWhite
                            St George Chiropractor
                            Angband Borg Homepage

                            Comment

                            • APWhite
                              Adept
                              • Jul 2007
                              • 244

                              #15
                              Originally posted by roustk
                              To be clear, I added debugging output just before my modified ifelse in borg6.c. The latest level 40 character died with logging like:
                              Code:
                              # Perhaps wall near targetted location (31,91)
                              # Guessing wall (31,91) under ghostly target (31,91)
                              ...
                              # Spell pathway tests: 1, 57, 0
                              # Logging Spell pathway (30,91).
                              # Spell pathway tests: 2, 57, 21
                              # Logging Spell pathway (31,91): Xaren, danger 2000
                              # Attempting to cast T.O.
                              The debugging line is produced by:
                              Code:
                                      borg_note(format("# Spell pathway tests: %d, %d, %d",
                                        ag->feat,ag->info,ag->kill));
                              The borg thinks that the space it is standing on (30,91) is FEAT_FLOOR while the space the Xaren is on (31,91) is FEAT_INVIS (presumed floor), even though it set to FEAT_WALL_SOLID at the "Ghostly wall" comment.

                              (This also answers my question about how to get from grids to kills -- ag->kill.)


                              This is very useful information. He is really not supposed to target FEAT_INVIS grids, as seen in my post earlier (borg_launch_bolt_aux_hack()). But clearly, it is doing so in this instance. It is not from Offset Targetting either, I stopped that long ago. I will see if I can catch him and step him through the process.

                              BTW, how old is the borg code that you are working with. It is updated every few weeks.

                              APWhite
                              St George Chiropractor
                              Angband Borg Homepage

                              Comment

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