Power-based pricing available (r1284)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    Power-based pricing available (r1284)

    Hi all,

    I've been playing around with the randart power algorithm, turning it into a more general power algorithm for all wearable objects, and using it in a pricing formula. Takkaria suggested that before I go any further I post some results here and see what people think (with apologies to Eddie, who thinks this whole direction is misguided...).

    The original power algorithm used damage as its basis, so one power point equated to one point of damage. When trying to extend this to cover everyday wearables I found that it didn't allow for enough distinction at the lower end: lots of base weapons and armour items ended up with identical power ratings and therefore costs.

    So I've doubled the scale: one point of power now represents half a point of damage (per blow). This just about allows enough separation, but please bear in mind that plain weapons with identical damage dice and plain armour items with identical base AC will always come out the same, no matter how long the scale! (But see my to-do list below.)

    Here is a list of sample items and their new prices, using a quadratic pricing curve (price = a * power^2 + b * power, using a=2 and b=3):

    Code:
    Power Cost 
      1      5  armour[1,0] 
      3     27  armour[2,0] or weapon(1d2)(+0,+0)
      4     44  armour[3,0] or weapon(1d3)(+0,+0)
      7    119  armour[5,0] or weapon(1d6)(+0,+0)
      9    189  armour[6,0] or weapon(1d8)(+0,+0)
     12    324  armour[8,0] or weapon(2d5)(+0,+0) or shortbow(x2)(+0,+0)
     19    779  armour(-2)[14,0] or lightXbow(x3)(+0,+0) or boots of speed[2,+10](+1)
     33   2277  armour(-3)[24,0] or boots of speed[2,+10](+3)
     39   3159  armour(-3)[28,0]
     40   3320  weapon(8d4)(+0,+0) or longbow(x3)(+9,+9)
     50   5150  armour(-3)[35,0] or weapon(1d4)(+15,+15)
     55   6215  longbow(x3)(+15,+15) or boots of speed[2,+10](+5)
     85  14705  weapon(8d4)(+15,+15) or boots of speed[2,+10](+7)
    103  21527  weapon of westernesse(2d5)(+15,+15)(+1) or boots of speed[2,+10](+8)
    121  29645  armour of elvenkind(-1)[28,+15](+3 to stealth){rpois}
    123  30627  weapon of westernesse(2d5)(+15,+15)(+2) or boots of speed[2,+10](+9)
    154  47894  weapon (Holy Avenger)(8d4)(+15,+15)(+4)
    If anyone is interested, I've put a spreadsheet at http://www.terminalarrogance.com/object_pricing.xls which allows you to mess with the power rating on one tab and the pricing formula on another. Post here if you have any problems with it and I'll try to help.

    Looking at the table above, there are slightly greater price increases between low- and high-damage weapons than was previously the case. Non-magical weapons are generally a little dearer, and launchers are also a little more expensive (but this seems fair, given their power in V-combat). Minor slays like orc and troll on low-damage weapons are now much cheaper (since they are not actually worth much).

    Boots of speed stand out as underpriced. This is one of a small number of items with hard-coded prices which bear no relation to how any formula prices them:

    - heavy armours (mithril and adamantite plate - there is a huge jump from ribbed plate to these)

    - armour/shields of resistance (currently costed at 5x the total cost of the four individual resist egos - a saner multiplier would be no more than 3x)

    - boots of speed and elvenkind (isn't there an extra zero on the cost of the latter??)

    - headgear of telepathy

    (- robes of permanence, shields of preservation - these are less out of whack, but still about double what they should cost)

    It's quite possible that speed and telepathy are still undervalued in the power algorithm, and it's likely that I need to add an extra power term for multiple resists/sustains (akin to the one already used for multiple pval attributes) - but it's also possible that these things were historically overpriced quite deliberately. Moving to power-based pricing would require dealing with that (either by abandoning it or by hard-coding exceptions).

    Obviously this is not a finished piece of work and I welcome people's views on improving it. My current to-do list (apart from continuing to improve the ratings of various powers) is:

    1. Add power ratings for activatable effects
    2. Add an extra power term for multiple resists
    3. Adjust the power for AC to reflect an item's weight (the same AC is worth more on a lighter item)
    4. Calculate the power value of resists and sustains by reference to monster attacks, rather than using hard-coded values.
    5. Find some way of reflecting critical hits in weapon power (but I might wait until criticals are re-vamped!).

    One final note: it is not possible to calculate the power of the new elemental rings. If your weapon already has that brand, it's worth nothing on the ring. If your weapon is a 1d4 dagger, it's worth a tiny amount. If your weapon is the Glaive of Pain, it's worth a huge amount! (I guess we will have to base the cost of said rings on branding an "average" weapon, like 2d5 or so).

    Power-based pricing is now available in trunk. To try it, check out r1284 (or later) and uncomment the line "#define POWER_PRICING" in src/config.h before compiling. Let me know of any prices which stand out as either too high or too low.

    CC.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles
  • Atarlost
    Swordsman
    • Apr 2007
    • 441

    #2
    You mention in the future having armor pricing take weight into account. I think weapon pricing should do the same, possibly to a greater degree. Light weapons not only encumber you less they also give more blows.
    One Ring to rule them all. One Ring to bind them.
    One Ring to bring them all and in the darkness interrupt the movie.

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 5110

      #3
      Originally posted by Atarlost
      You mention in the future having armor pricing take weight into account. I think weapon pricing should do the same, possibly to a greater degree. Light weapons not only encumber you less they also give more blows.
      But they get fewer criticals, and the tradeoff between blows and criticals is nearly impossible to calculate.

      Both blows and criticals have been discussed in the not too distant past as candidates for overhauling. Given the difficulty of calculating the effect of non-standard weight on a weapon's damage, I'm inclined to wait until either or both of these things happen.
      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

      Comment

      • buzzkill
        Prophet
        • May 2008
        • 2939

        #4
        Originally posted by Magnate
        One final note: it is not possible to calculate the power of the new elemental rings. If your weapon already has that brand, it's worth nothing on the ring. If your weapon is a 1d4 dagger, it's worth a tiny amount. If your weapon is the Glaive of Pain, it's worth a huge amount! (I guess we will have to base the cost of said rings on branding an "average" weapon, like 2d5 or so).
        Better it be priced too high rather than too low. Buying, is but an option, and one can always be found. Base it on a better than average weapon, or an even better weapon than that.
        www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
        My banding life on Buzzkill's ladder.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          (On the value of branded rings ...
          Originally posted by buzzkill
          Better it be priced too high rather than too low. Buying, is but an option, and one can always be found. Base it on a better than average weapon, or an even better weapon than that.
          Hmm. I'm interested in views on this. Branding only affects base damage dice, so uber-weapons with huge plusses benefit no more than plain (+0,+0) weapons with the same dice. Furthermore, any other brands and slays on the weapon actually detract from the value of the brand on the ring, as there are fewer cases where the ring's brand will provide the best multiplier. This is why Pain is the ultimate example - it has colossal base damage and no competing brands or slays. (It is theoretically possible that the randart generator could make a 9d8 Lochaber Axe or even a 9d9 Quarterstaff, but it's so unlikely that we can consider Pain the limiting case.)

          So what base weapon damage is a sensible value to use? Bearing in mind that we assume +9 ammo when calculating the power of launchers, should we aim for the higher end, like 3d5 or 3d6?
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Atarlost
            Swordsman
            • Apr 2007
            • 441

            #6
            Given that it loses value when other brands are on the weapon I'd use the biggest dice weapon that can be routinely bought in town. I'm not sure what that is now. I don't think you see 3d6 or 3d5, but aren't bastard swords 3d4? I think I've seen them in the weaponsmith. On the other hand extra blows mean the same thing as more dice. If you can get two blows with a broadsword and only one with an executioner's sword they're both doing 4d5 brand boosted damage per turn. That may mean you should go by the heavy weapons since the lighter weapons get more blows and wind up benefiting nearly as much from the brand. That's with the current blows calculation. A shallower blows-weight curve would mean that the more common mid-weight weapons aren't catching up with the heavy weapons for dice/turn and so they should be the standard.

            I think it's better to undervalue it than overvalue it unless it's available from a non-BM shop. Stuff that's only available from the BM is more likely to be sold than bought I expect.
            One Ring to rule them all. One Ring to bind them.
            One Ring to bring them all and in the darkness interrupt the movie.

            Comment

            • andrewdoull
              Unangband maintainer
              • Apr 2007
              • 872

              #7
              Originally posted by Magnate
              Hi all,

              I've been playing around with the randart power algorithm, turning it into a more general power algorithm for all wearable objects, and using it in a pricing formula. Takkaria suggested that before I go any further I post some results here and see what people think (with apologies to Eddie, who thinks this whole direction is misguided...).
              This worked well for me in Unangband - I'll have to look to see how well this compares.

              One issue I had was how to price cursed items with good abilities. I believe curses should allow more powerful items to appear at lower levels, but the curse should only partially be taken into account when computing the price.

              Andrew
              The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
              In UnAngband, the level dives you.
              ASCII Dreams: http://roguelikedeveloper.blogspot.com
              Unangband: http://unangband.blogspot.com

              Comment

              • Magnate
                Angband Devteam member
                • May 2007
                • 5110

                #8
                Originally posted by andrewdoull
                This worked well for me in Unangband - I'll have to look to see how well this compares.
                Hi Andrew, good to hear from you. I'd be very interested to hear what you did differently.
                One issue I had was how to price cursed items with good abilities. I believe curses should allow more powerful items to appear at lower levels, but the curse should only partially be taken into account when computing the price.
                Does this mean that you use your power rating in the item generation routines to influence what is dropped at a given depth?

                To be honest I don't handle curses in a very sophisticated way (as befits current V!). Negative abilities (xp drain, random teleportation, aggravation) have a negative value, as do light and heavy curses. Minuses to hit/dam/ac/pval also reduce the item's power. So you can end up with negative power for 'bad' items, or very low power for 'cursed items with good abilities'. In a sense this meets your requirement for "only partially" taking the curse into account - previously the presence of a curse meant an automatic assignment of zero value. But there is scope for great improvement in the variety and effects of curses (per Nick's recent thread in the Dev forum), so their effect on power would need revising.

                Cheers,

                Chris
                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                Comment

                • andrewdoull
                  Unangband maintainer
                  • Apr 2007
                  • 872

                  #9
                  Originally posted by Magnate
                  Hi Andrew, good to hear from you. I'd be very interested to hear what you did differently.
                  Does this mean that you use your power rating in the item generation routines to influence what is dropped at a given depth?
                  Yes. In particular, I keep trying to randomly boost an ego item by adding to-hit, to-dam, to-ac, pval or choosing a new random ability until it meets a minimum for the level it is generated at.

                  This attempts to make ego items always useful when dropped.

                  Andrew
                  The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
                  In UnAngband, the level dives you.
                  ASCII Dreams: http://roguelikedeveloper.blogspot.com
                  Unangband: http://unangband.blogspot.com

                  Comment

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

                    #10
                    Statistical approach

                    I've actually considered doing this same thing, albeit with a statistical approach in mind. From the (stated) costs of items in the pricing guide, attempt to determine what their cost is. I think at some point, I assumed a linear approach to cost. Either that or some super-additive function that I had yet to determine. In any case, I figured that using the starting prices as a guide for the "power" of an item and doing some statistical analysis would be fun starting point. I'd elaborate, but it's just an idea in the back of my head that I've never actually implemented.
                    a chunk of Bronze {These look tastier than they are. !E}
                    3 blank Parchments (Vellum) {No french novels please.}

                    Comment

                    • Magnate
                      Angband Devteam member
                      • May 2007
                      • 5110

                      #11
                      Originally posted by camlost
                      I've actually considered doing this same thing, albeit with a statistical approach in mind. From the (stated) costs of items in the pricing guide, attempt to determine what their cost is. I think at some point, I assumed a linear approach to cost. Either that or some super-additive function that I had yet to determine. In any case, I figured that using the starting prices as a guide for the "power" of an item and doing some statistical analysis would be fun starting point. I'd elaborate, but it's just an idea in the back of my head that I've never actually implemented.
                      I'm not sure what you mean by "starting prices" or "(stated) costs".

                      If you mean the prices as given in object.txt (and ego-item.txt and artifact.txt), I think that's absolutely the wrong starting point. Those prices are completely arbitrary, and bear no relation to an item's desirability (power, whatever) - they weren't even set by a single person or functional group of people.

                      If you mean something else from which to start, I'm very interested.

                      CC
                      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                      Comment

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

                        #12
                        I meant the prices in object.txt and artifact.txt and ego.txt (or whatever they're called). Sure, some items are way overpriced, but if you include Thranduil, DorLomin, etc. the price effect on Telepathy is reduced compared to just considering 'of Telepathy'. I think that ANOVA is the tool that one would want to use. If necessary, one could add any number of pseudo-parameters to account for the pricing, like "Brands past the first" (negatively correlated) or "Speed squared". Obviously, such a formula would be subject to change and/or tweaking after being determined. But it would be interesting to see what price the game thinks abilities are.

                        Another way to do this would actually to mine character dumps and compare their equipment to the stuff, say, in the home and try to determine some sort of utility for each item or item ability, and then generate a price formula that represents the sort of pricing that one is interested in. This sounds like a lot of work, though.
                        a chunk of Bronze {These look tastier than they are. !E}
                        3 blank Parchments (Vellum) {No french novels please.}

                        Comment

                        • Magnate
                          Angband Devteam member
                          • May 2007
                          • 5110

                          #13
                          Originally posted by camlost
                          I meant the prices in object.txt and artifact.txt and ego.txt (or whatever they're called). Sure, some items are way overpriced, but if you include Thranduil, DorLomin, etc. the price effect on Telepathy is reduced compared to just considering 'of Telepathy'. I think that ANOVA is the tool that one would want to use. If necessary, one could add any number of pseudo-parameters to account for the pricing, like "Brands past the first" (negatively correlated) or "Speed squared". Obviously, such a formula would be subject to change and/or tweaking after being determined. But it would be interesting to see what price the game thinks abilities are.
                          Wow. I'm no slouch with maths or stats, but I don't understand this at all. Are you suggesting some sort of iterative method to arrive at the "true" value of an item (which would mean it doesn't really matter what figure you start from)? Sorry to be dim, but can you give a step-by-step example of deriving the true value of a single item (anything you like), starting from an arbitrary price in a text file?

                          Another way to do this would actually to mine character dumps and compare their equipment to the stuff, say, in the home and try to determine some sort of utility for each item or item ability, and then generate a price formula that represents the sort of pricing that one is interested in. This sounds like a lot of work, though.
                          Right. This one I can understand - an empirical approach rather than a theoretical one. As you say, would be a lot of work (and would need a lot of dumps of the same version).

                          CC
                          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                          Comment

                          • zaimoni
                            Knight
                            • Apr 2007
                            • 590

                            #14
                            Originally posted by Magnate
                            Wow. I'm no slouch with maths or stats, but I don't understand this at all. Are you suggesting some sort of iterative method to arrive at the "true" value of an item (which would mean it doesn't really matter what figure you start from)?
                            I think so. It could be somewhat automated with an appropriate borg. (Each stage would be a least-squares fit, followed by a "survivability check stage".)
                            Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                            Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                            Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                            Comment

                            • PowerDiver
                              Prophet
                              • Mar 2008
                              • 2820

                              #15
                              How do you plan to get "true value" when, not only are you not dealing with a total order, but a pair of items can change drastically in comparative value?

                              E.g., I would always choose a ring of speed +5 over a ring of acid in the early game. And I would nearly always choose a ring of acid over a ring of speed +5 in the late game. How can any of your automated methods cope with that?

                              Comment

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