Insane stealth

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fizzix
    Prophet
    • Aug 2009
    • 3025

    #16
    Originally posted by Derakon
    Thus a naked hobbit rogue has about an 8% chance of disturbing a monster each turn.
    Ah the importance of context. Without context...this quote is pretty amazing.

    Comment

    • camlost
      Sangband 1.x Maintainer
      • Apr 2007
      • 523

      #17
      What would people think about subtracting (speed - 3) / 3 from stealth, to balance this out? Note that this would *not* make fast characters less stealthy, it would merely prevent them becoming more stealthy.
      A couple thoughts.
      • Perhaps the better part of stealth is speed?
      • If we had exponential speed (+10 speed = double speed), then the formula would be more or less perfect. This penalizes faster players more than necessary to compensate for the energy-per-turn formula.
      • I like it.


      I think you might want an integer-based equivalent to:
      Code:
      3 * log(energy_per_turn / energy_per_turn_speed_0) / log(2)
      If you just want the results to cancel out.

      That they are less likely to wake up because you spend less time near them seems entirely appropriate.
      Or perhaps you make exactly as much racket as before, just in less time, resulting in no change.
      Last edited by camlost; March 29, 2011, 21:57.
      a chunk of Bronze {These look tastier than they are. !E}
      3 blank Parchments (Vellum) {No french novels please.}

      Comment

      • PowerDiver
        Prophet
        • Mar 2008
        • 2820

        #18
        Originally posted by camlost
        Or perhaps you make exactly as much racket as before, just in less time, resulting in no change.
        Hmm, in that case, I'd think they should be more likely to wake up, resulting in a change in the other direction.

        In the game as it is now, stealth is an anti-ESP measure. All monsters have ESP, not hearing. Monsters detect you just as well through 100' of solid rock as if you are in the same large open room with them. My earlier remark makes sense in this context, but I see that it doesn't apply if you are talking about noise made by footsteps etc.

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #19
          We could, if we really wanted to, implement sound flows, such that sound wouldn't pass through stone (or only at a greatly reduced rate) and would decay properly with distance (i.e. the player not being equally loud when standing 2 tiles away with a wall in the middle as without). The main side-effect that I'd see would be that it'd become significantly more possible to crack open a vault without everything in it being awake. And of course sound processing would get more expensive, though I doubt it'd be a serious source of slowdown in this day and age.

          Once the monster is awake, it could trace down the sound flow instead of chasing the player. This would have the side-effect of probably fixing monster pathing when there's a wall in the way, since they'd automatically be following the shortest open-space route to the player.

          And now I'm imagining a zoomed-in minimap of the player, say, 5x5, showing how much noise is coming from each direction in the form of color-coded letters. E.g. white for barely any noise, deep red for lots of noise, using letters to indicate the monster type if known and *s otherwise...heck, that might just help fix the whole detection problem. The only remaining issue would be wallwalkers and walleaters, which, depending on sound flow rules, would be completely silent until they burst through.

          Comment

          • camlost
            Sangband 1.x Maintainer
            • Apr 2007
            • 523

            #20
            In the game as it is now, stealth is an anti-ESP measure. All monsters have ESP, not hearing. Monsters detect you just as well through 100' of solid rock as if you are in the same large open room with them. My earlier remark makes sense in this context, but I see that it doesn't apply if you are talking about noise made by footsteps etc.
            I guess I've always assumed that it was noise, and the fact that walls don't matter was a computational complexity issue, not a design decision.

            Once the monster is awake, it could trace down the sound flow instead of chasing the player. This would have the side-effect of probably fixing monster pathing when there's a wall in the way, since they'd automatically be following the shortest open-space route to the player.
            Wasn't there a flow_by_sound option at some point in the past?
            a chunk of Bronze {These look tastier than they are. !E}
            3 blank Parchments (Vellum) {No french novels please.}

            Comment

            • Max Stats
              Swordsman
              • Jun 2010
              • 324

              #21
              Originally posted by camlost
              Wasn't there a flow_by_sound option at some point in the past?
              The "Monsters chase current location" birth option is called "birth_ai_sound" so the option is there, just by a different name.
              If beauty is in the eye of the beholder, then why are beholders so freaking ugly?

              Comment

              • Mars
                Scout
                • Apr 2007
                • 31

                #22
                Originally posted by fizzix
                Ah the importance of context. Without context...this quote is pretty amazing.
                Nice catch
                Mostly retired Angband player. I just don't have the time .

                Comment

                • camlost
                  Sangband 1.x Maintainer
                  • Apr 2007
                  • 523

                  #23
                  Originally posted by Derakon
                  We could, if we really wanted to, implement sound flows, such that sound wouldn't pass through stone (or only at a greatly reduced rate) and would decay properly with distance (i.e. the player not being equally loud when standing 2 tiles away with a wall in the middle as without). The main side-effect that I'd see would be that it'd become significantly more possible to crack open a vault without everything in it being awake. And of course sound processing would get more expensive, though I doubt it'd be a serious source of slowdown in this day and age.
                  How does this scale? How much of the dungeon should we process? Remember, just because we restrict monster processing to a certain number of squares (20?), doesn't mean that the sound getting to monsters closer than that could flow beyond and back.

                  Algorithmically, I'm guessing that we should just count stone as 5 blocks or something along those lines when calculating transmission of sound. Closed doors as 2.

                  ----------------

                  Of course, this we might need to tweak the formula. If we want to keep net sneakiness the same, we'll want to make it harder to sneak by monsters in LOS.
                  a chunk of Bronze {These look tastier than they are. !E}
                  3 blank Parchments (Vellum) {No french novels please.}

                  Comment

                  • Zyphyr
                    Adept
                    • Jan 2008
                    • 135

                    #24
                    Originally posted by camlost
                    How does this scale? How much of the dungeon should we process? Remember, just because we restrict monster processing to a certain number of squares (20?), doesn't mean that the sound getting to monsters closer than that could flow beyond and back.
                    Initially assume a noise value of zero in all locations.

                    Start at @ and work outward with a base Noise level at @ determined by Stealth rating (possibly modified for certain action types - louder for digging/fighting, lower for resting). Each new ring gets the value of the highest adjacent cell, minus a number based on what the current cell is (something like 1 for empty space, 2 for a closed door, 5 for a wall). Cells with a value of zero don't have enough sound to cause a disturbance. Once a ring of all zeros is generated, do a second pass.

                    The second pass is to allow for cases where there is an open path that loops out and back while the direct paths have obstructions and therefore lower noise levels.


                    After the second pass, check for disturbance of the monsters.

                    For completeness, more passes to deal with highly convoluted paths could be done but from a practical standpoint only the least stealthy characters will be making enough noise for it to matter.

                    The resulting array can also be used for monster pathfinding (move towards the higher sound value to get to @).

                    Recalculate after each player turn. Use the most recent value in the array whenever a monster needs the info.

                    Comment

                    • camlost
                      Sangband 1.x Maintainer
                      • Apr 2007
                      • 523

                      #25
                      Code:
                      #####
                      #   #
                      # # #
                      # # #
                      # # #
                      #p# #
                        #@#
                      Code:
                      #########
                      #   #   #
                      # # # # #
                      # # # # #
                      # # # # #
                      #p# # # #
                        # # # @

                      I'm pretty sure the algorithm you suggest there fails miserably in these example. If you do (n-1) iterations of that, you might get a decent approximation (where n is the distance out you go). I'm also not sure how a path *along* a ring is calculated/weighted.

                      If we want sound to pass through stone, I'm not sure we can use it for pathfinding. I think something more like a breadth-first search along passageways/doors would be more suitable, at least for pathfinding.
                      a chunk of Bronze {These look tastier than they are. !E}
                      3 blank Parchments (Vellum) {No french novels please.}

                      Comment

                      • kingvictory2003
                        Scout
                        • Oct 2009
                        • 37

                        #26
                        Originally posted by Derakon
                        Thus a naked hobbit rogue has about an 8% chance of disturbing a monster each turn.
                        Originally posted by fizzix
                        Ah the importance of context. Without context...this quote is pretty amazing.

                        AHAHAHAHAHAHAHAHAHAHAAAAAHAHAHAHAHA!!!

                        Thanks, I needed that

                        Comment

                        • ulrichvonbek
                          Apprentice
                          • Mar 2011
                          • 82

                          #27
                          I like this discussion, it leads to lots of interesting ideas.

                          I'm sure the code would get very complex in a hurry, and would require rebalancing, but I could see where mining, bashing, spiking a door, and certain spells, like ice storm, and lightning bolt are high noise activities. Fighting and opening doors are medium noise activities, and simply moving around the dungeon are low noise activities.

                          You could even change searching mode to stealth mode and make everything you do less noisy than usual. You could also boost the chances of getting a good/great hit in while fighting in this mode to compensate for the fact that you're going to get pounded on twice as often fighting that way.

                          I'm not sure that a focus on sound, and deciding between a high noise/low noise aproach would actually make for a fun experience, but it's fun to think about.

                          Comment

                          • Zyphyr
                            Adept
                            • Jan 2008
                            • 135

                            #28
                            When checking these two by hand, I made the assumption of everything not otherwise mentioned being a #, as an empty row below the mentioned sections makes it work much better. Also, I used the 1/2/5 example values.

                            Originally posted by camlost
                            Code:
                            #####
                            #   #
                            # # #
                            # # #
                            # # #
                            #p# #
                              #@#
                            Works almost perfectly with a 2-pass. The only potential issue would be in using it for pathfinding - both spaces above and below the 'p' have the same sound value. Disturbance values are as would be expected from manually checking everything. If the row below @ is empty instead of a wall, p will hear and move South then South-east, then straight East (assuming @ stays in place)

                            Code:
                            #########
                            #   #   #
                            # # # # #
                            # # # # #
                            # # # # #
                            #p# # # #
                              # # # @
                            The sound reaching p would be correct. Pathfinding has the same minor issue.
                            Also, on this one I assumed that the bottom # in the central column was supposed to be empty.... Otherwise p wouldn't be able to reach @ anyway, rendering the issue irrelevant (baring passwall).



                            I'm pretty sure the algorithm you suggest there fails miserably in these example. If you do (n-1) iterations of that, you might get a decent approximation (where n is the distance out you go). I'm also not sure how a path *along* a ring is calculated/weighted.
                            I did fail to mention the intended order of calculation when writing it out, though I did have it in mind. I intended for it to be : For 'ring' N, start N spaces North, calculate clockwise (start at (@,@+n), move to (@+n, @+n), then to (@+n, @-n), etc). Doing an actual circle would be a waste of computational time, especially since the game considers a diagonal move the same as one along a major axis.

                            23-24-09-10-11
                            22-08-01-02-12
                            21-07-.@-03-13
                            20-06-05-04-14
                            19-18-17-16-15


                            Something along these lines :

                            Code:
                            ################
                            #            #@#
                            # ########## # #
                            # #          # #
                            # # ########## #
                            #p#            #
                            ################
                            would have issues with particularly noisy characters.

                            If we want sound to pass through stone, I'm not sure we can use it for pathfinding. I think something more like a breadth-first search along passageways/doors would be more suitable, at least for pathfinding.
                            Setting the Stone value sufficiently high will turn off sound passing through walls, or if you use 1/2 of the worst case value it will potentially pass through a single wall, but never more than that (and even then only when relatively close to a fairly non-stealthy character).

                            If you want perfect results, just repeat passes until you get one where nothing changes.

                            As a note, I used this basic algorithm ~20 years ago to solve a maze chase problem.

                            Comment

                            • Timo Pietilä
                              Prophet
                              • Apr 2007
                              • 4096

                              #29
                              Originally posted by Magnate
                              Thank you. So the answer to Timo's earlier question is that the limit of useful stealth is 30, including the intrinsic racial and class stealth. It is also worth noting that +1 is added to the race and class stealth numbers in birth.txt, so the maximum useful stealth for a hobbit or kobold rogue is +20. Still a way to go then Timo ...
                              Hmm...+4 from defender, +4 from Trickery, +4 from bodyarmor, +4 from cloak, +5 from elvenkind boots = +21. Definitely possible. What I lack currently is that defender and boots (using Dal-i-Thalion and other weapons).

                              In fact you can add in rings of mouse (I used two +4 ones adding +8 to initial stealth in early game, they gave me so many blows/turn more that 3d5 branded katana I had made more damage with them and gloves of slaying than they subtracted from damage). I think I have seen Elven cloaks of Aman/Stealth with +5 PVAL (+2 from base object +3 from ego-type). That adds +9 to that 21 making +30 as max you can get from items, with randarts possibly even more.

                              So you can go to max stealth. Even early game I had two mouse rings, elvenkind bodyarmor and stealth boots so it doesn't even take very long to get close to max with hobbit rogue.

                              Comment

                              • Psi
                                Knight
                                • Apr 2007
                                • 870

                                #30
                                Originally posted by Derakon
                                Thus a naked hobbit rogue has about an 8% chance of disturbing a monster each turn.
                                I keep sniggering at this. It is pretty embarrassing in an open plan office. Not quite sure how to explain the cause of my childish giggles to my colleagues.

                                So just how disturbing is a naked hobbit?

                                Comment

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