1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

Pricing model of equipment according to stats

Discussion in 'Programming' started by Gabriel Seng, Aug 9, 2021.

  1. Gabriel Seng
    Offline

    Gabriel Seng Blue Snail

    4
    1
    3
    Jun 27, 2021
    Male
    9:30 AM
    xhamster
    Bishop
    123
    This game has not been invaded by quants yet, I assume. In this thread, I will attempt to derive a general idea of a pricing model for eqs with respect to their stats.

    In this game, the types of scrolls are:
    • 100% scrolls, which are absolute junk most of the time
    • 60/70% scrolls, which give the same average stats
    • 10/30% scrolls, which gives amazing stats
    • chaos, ws and css, which complicates everything a little bit
    The idea is that we can form equations of value relating stats of eqs and their price. Let f(x, s) be a function of the price of our desired eq, and x is the stat/stats that affect the price of an eq the most, and s is the number of slots left. Also, let p(pct) be the price of a scroll usable to the eq, e.g. p(60% wand ma) = 200k. Let t and t* be the amount of added x when a 60/70% and 10/30% scroll passes respectively. To give an example:

    If we are interested in the price of a wand, it is determined by its tma:
    • f(x, s) where x = tma
    • p(60%) = price of wand ma 60% = 200k, p(10%) = 600k etc
    • t = 3, t* = 8, as passing each 60/70% and 10/30% scroll increases tma by 3 and 8 respectively
    Then, whenever possible, we can form the following equations:
    • f(x, s) + p(60%) = 0.6*f(x+t, s-1) + 0.4*f(x, s-1)
    • f(x, s) + p(70%) = 0.7*f(x+t, s-1) + 0.15*f(x, s-1)
    • f(x, s) + p(10%) = 0.1*f(x+t*, s-1) + 0.9*f(x, s-1)
    • f(x, s) + p(30%) = 0.3*f(x+t*, s-1) + 0.35*f(x, s-1)
    And they are for the most basic 60/70/10/30% scrolls. More equations can be formed with the other scrolls. Note that for a piece of stat, there can be many implied prices. I propose that, as a rational maplelegends player, the price of a scrolled equipment would be such that it is the minimum price out of all implied prices:

    f(x, s) = min for all scrolling possibilities of f(x, s)

    Yea, so that's the basic idea. I do have a spreadsheet made for this, but it's not very complete. Also, a condition for comonotonicity of stats/slots should exist somehow which I do not know of (because I'm getting negative values in my spreadsheet).

    Very useful assumptions/extensions when using this model:
    • Assume prices as the lowest price such that item sells instantly, and then put a premium on top of scrolled item prices.
    • Assume that the prices of scrolls/equipments stay constant and you don't affect the market in any way, or just assume that you do affect the market and input a higher price of the scrolls
    • Sometimes prices of equipment are determined by more than 1 stat e.g. dex and luk, a higher dimensional table might be needed, if you're such a nerd like me :)
    That's it for this post, I hope it has a good balance between length/depth (that's what she sa...). Feel free to reach out to me if you have any questions/ideas!
     
    • Great Work Great Work x 4
    • Like Like x 1
    • Disagree Disagree x 1
  2. kiln
    Offline

    kiln Pink Teddy

    79
    21
    93
    Jan 2, 2021
    4:30 AM
    Pepperspray
    Corsair
    Elite
  3. geospiza
    Offline

    geospiza Web Developer Staff Member Web Developer

    212
    449
    215
    Apr 16, 2020
    1:30 AM
    geospiza
    Dark Knight
    146
    Funk
    How much data for a single item do you need to estimate the relationship between price and stats f(x, s)? I once made a spreadsheet of bathrobe prices alongside their stats, it might be a useful source of data, albeit out of date. I had some help from some automated screenshot transcription, but I still had to do the manual step of entering stat information. It probably took me an hour to go through one owl's worth of data. Collecting the data is not an easy task, I'd be interested in hearing your take on how much data is needed. Also, what approach would you use to estimate f(x, s)?

    There's also the problem that you can get the same stat on an item using different combination of scrolls. I've used a constraint solver in the past to figure out all the possible combination of scrolls, but I stopped before putting together a cohesive pricing model. It looks like here, it's solved by assuming "f(x, s) = min for all scrolling possibilities of f(x, s)", which seems reasonable.

    Great post, it'd be cool to see a concrete implementation of a pricing model :)
     
  4. xiaoyaoz
    Offline

    xiaoyaoz Balance Team Staff Member Balance Team

    201
    133
    215
    Jul 17, 2020
    Male
    9:30 AM
    I'm not sure this post is suggesting a pricing model that can describe the market price or are you trying to encourage players to follow your pricing model for selling stuffs?
    If it is the former, it would be nice to see examples where the formula is applied on certain stuff and see how reliable it is in recovering the current market price for those stuffs. At least, show a proof of concept where the model works. And if it works well, the next thing can look at how well the model scale to all the other stuffs as well.
    If it is the latter, I don't think a free market will ever follow a pricing model because humans will just act on their own desire.

    p.s.: cool post anyway :D
     
    • Agree Agree x 1
  5. OP
    OP
    Gabriel Seng
    Offline

    Gabriel Seng Blue Snail

    4
    1
    3
    Jun 27, 2021
    Male
    9:30 AM
    xhamster
    Bishop
    123
    Well, my guess of the simplest approach would be to obtain market prices of clean/scrolled low stats eqs, and then project the price for high stat eqs. This is purely because there are more lower stats items (and scrolls) out there, which means more data points and data reliability. I would then only look into the better eqs for cheap buys. I think your approach is the reverse, which can be feasible but definitely more work is needed.

    As for the case of bath robes, a failed first scroll means it's valued at NPC selling price, and the boundary conditions/prices of 0 stat bathrobes are simple. The more complex cases arise when there are multiple stats for clean items, e.g. lv 130 elewands have tma 140-~153, and the initial prices can be very complex for different number of slots left. And this is a problem itself
     
    • Informative Informative x 1
  6. OP
    OP
    Gabriel Seng
    Offline

    Gabriel Seng Blue Snail

    4
    1
    3
    Jun 27, 2021
    Male
    9:30 AM
    xhamster
    Bishop
    123
    I am suggesting a pricing model that can price better than the market. And if the free market does not follow the right pricing model, there is likely an arbitrage opportunity, which means mesos to be made somewhere. I don't understand what "proof of concept" you need when I have the equations right there actually.
     
  7. xiaoyaoz
    Offline

    xiaoyaoz Balance Team Staff Member Balance Team

    201
    133
    215
    Jul 17, 2020
    Male
    9:30 AM
    Guess i'll just have to do the work for you then, looking at bathrobe itself:
    NPC price for 10slot bathrobe (player buys): 30k
    NPC selling price for bathrobe (player sells): 15k
    FM price for 10% for overall INT: 3m (as of today)
    FM price for 30% for overall INT: 10m (as of today)
    FM price for +1 9 slot bathrobe: 28m (as of today)

    Based on these formula:
    1. f(x, s) + p(10%) = 0.1*f(x+t*, s-1) + 0.9*f(x, s-1)
    2. f(x, s) + p(30%) = 0.3*f(x+t*, s-1) + 0.35*f(x, s-1)
    Formula 1 will price a +1 9 slot bathrobe to be 30.165m
    Formula 2 will price a +1 9 slot bathrobe to be 34.316m

    But as you can see the FM price for now is 28m, which is just somewhat different from what the formula is proposing. I think the discrepancy gets even further with higher upgrades.
    That's why i'm asking a 'proof of concept', and not just writing formulas because I can write 999 formulas but if they don't do anything, they are then not of use.

    I hope I'm being stupid here and interpreting the formulas wrong, if not, I don't see this pricing model to be of any value.
    Anyone that plays legends long enough will know that a scrolled item is almost always has a lower selling value than what is the expected pricing from average luck.
    Not because players are stupid, but because there are other factors such as demand/supply, players scrolling addiction, time spent to buy/sell, etc etc which implicitly affect the pricing.
    If a free market can be as simple as the mentioned formulas, things will be so easy. But again, humans will always find ways to exploit and take advantage if things are just so easy.

    Edit: To be clear, that's why I asked if it's a model to describe the market or is it a suggestion for players to follow a pricing model. The 'proof of concept' is for the former not the latter. The latter is a different discussion.
     
    • Like Like x 2
    • Great Work Great Work x 1
    • Informative Informative x 1
    • Useful Useful x 1
  8. geospiza
    Offline

    geospiza Web Developer Staff Member Web Developer

    212
    449
    215
    Apr 16, 2020
    1:30 AM
    geospiza
    Dark Knight
    146
    Funk
    Thanks for working out an example, it's illustrative. I wouldn't dismiss the idea so quickly though. Not everyone has a good sense for the market. Even as an overestimate, it could be useful for rough baseline for pricing an uncommon, scrolled item on the market. From the POV of a buyer, this can help make sure you're not being gouged on a big ticket item.
     
  9. kiln
    Offline

    kiln Pink Teddy

    79
    21
    93
    Jan 2, 2021
    4:30 AM
    Pepperspray
    Corsair
    Elite
    I don't think it'll be too hard to add in WS into this, and I think that would be a pretty worthwhile endeavor since scrolling strategies that completely rule out WS are limited to really low-value items only (e.g. dex robes). Instead of using a f(x, s-0) strategy that would be a waste of computing resources, you can just use its expected cost (EC).

    e.g:
    f(x, s) + EC(10%+WS) = f(x+t*, s-1)
    f(x, s) + EC(30%+WS) = (30/65)*f(x+t*, s-1)


    Chaos scrolls are rolled equally at 11 rolls of +5, +4, +3, +2, +1, 0, -1, -2, -3, -4, -5.
    e.g. f(x, s) + p(CS60%) = 0.6*(f(x+[t+5]*, s-1) + f(x+[t+4]*, s-1) + ... ) / 11) + 0.4*f(x, s-1)
    with further rolls terminating if the stat is rolled at or below zero.

    I think a full-fledged calculator with WS/CS/CSS would be a really interesting area to explore once you're solid with the basic scrolls. Maybe scrolling atk capes for LUK before hitting it with CS is a good strategy; who knows?

    With all that said (and if I'm understanding what you're trying to do correctly), some calculations might be intractable without a pruning strategy.

    For something as simple as a 10-slot bathrobe scrolled for DEX with 10/30/60/70%s, you have 4 scroll choices + 2 outcomes for each scroll (8 outcomes), meaning you're going to be comparing 8^10 (roughly a billion) outcomes on your min() function.
     
  10. Cerulean
    Offline

    Cerulean Brown Teddy

    61
    15
    70
    Apr 13, 2020
    Male
    3:30 AM
    At the very least, I don't think you're being clear about what exactly your model is accomplishing. You are suggesting that your pricing model can be used to set prices better than the market. But the method you have proposed can only price an item if you take the price of another, differently scrolled version of that item as given. In other words, you need market prices in order for your method to even work. For example, in xiaoyaozm's example:

    The price of f(+1 robe, 9 slots) is determined with the prices f(+0 robe, 10 slots), f(+0 robe, 9 slots) as given. Now this may not be a problem because the latter two quantities are just NPC prices. But let's take another item, say, brown work gloves as an example. If you want to purely use your method to value a +1 (3 att 6 slot) bwg, you need to specify the value of both a clean bwg and a +0, 6 slot bwg. However, these prices are themselves determined by the market -- if you try to use your method to value them, this will result in a circular process, in which eventually you need to specify a value of f() ex-ante. And that value will almost always end up being some market price.

    Lastly, using your model assumes scroll prices are exogenous when determining f(), i.e., that scroll prices affect item prices but not vice-versa. But in reality, scroll prices are themselves also market prices, and changes in the market valuation for certain items will have an effect on scroll prices.

    Perhaps what you are getting at is that if we already have a widely agreed upon price for some item and some scroll, we can get a rough approximation for what the price of that item will be if the scroll passes, and also compute if there are other more cost-effective ways of scrolling that same item. But this is a far cry from "pricing better than the market", and in fact is the very essence of market pricing.

    Edit:
    To expand on this, suppose OA int 10% is 3m and a +1, 9 slot robe is 50m. I agree that your model would "identify" an arbitrage opportunity, since there is a way to scroll the 9 slot robe for significantly cheaper than 50m. Most players already recognize this, which is why such arbitrage opportunities are usually (but not always!) short-lived. However:
    • I would not agree with using your model to properly "price" the +1 9 slot robe (e.g. at 30m instead of 50m). After all, an equally valid correction could be a rise in the price of the OA int 10% to 5m. Player tastes are what drives demand. Maybe there is an increase in players wanting int robes.
    • Moreover, most items are not even worth scrolling, and your model which captures "scrolling costs" would not really make sense in most contexts. What if we used the OA int 10% on some random lv50 archer overall instead of a bathrobe? Even if that item "should" be worth a lot based on scrolling costs, its market price will be much lower than what is predicted by the model, again because of player tastes.
    • Lastly, I think it's pretty clear that a large number of ML players are not risk-neutral. Actually, many are risk-lovers and choose to scroll items even with expected losses exceeding expected gains. If the +1 9 slot robe is priced at 20m due to risk-lovers, there's no "arbitrage" opportunity because you can't purchase the scrolled item and decompose it back into an OA int 10% and clean robe.
     
    • Agree Agree x 4
  11. xiaoyaoz
    Offline

    xiaoyaoz Balance Team Staff Member Balance Team

    201
    133
    215
    Jul 17, 2020
    Male
    9:30 AM
    Just wanna mention, don't get discourage from the criticism that we are making (or at least the one that I wrote).
    The idea of trying to have a pricing model is all cool and great.
    Just gonna try to challenge it to see how reliable and accurate it can be.
    Not that I want to see you fail, instead I want to see how you can think through the problems and make the model successful, at least to a certain extent.
    I'm sure there are people that will benefit and appreciate a pricing model that works to a certain extent.
    I'm more than happy if you can prove me wrong. :D
     
    • Friendly Friendly x 2
    • Like Like x 1
  12. OP
    OP
    Gabriel Seng
    Offline

    Gabriel Seng Blue Snail

    4
    1
    3
    Jun 27, 2021
    Male
    9:30 AM
    xhamster
    Bishop
    123
    Oh man I don't get paid for this. But I leech my friends for free, so anyways,
    The example you just gave illustrates player addiction to scrolling itself, such that scrolled items have a selling value than expected price. The rational behaviour here is therefore to purchase a +1 9 slot bathrobe than to attempt to scroll one yourself.
    Yea, that's the idea with ws. As for the br example you gave, the number of outcomes can be drastically lower, if the minimum is continuously calculated recursively, which is what I'm trying to do on excel. But anyways, this is just my attempt, and hopefully you'll come up with a pruning strategy!
    Yes, prices do change when you take action on them, but a model has to start somewhere. It seems very possible to incorporate the changes in the variables (e.g. price of scroll), and changes in the prices of the eqs can be observed. It is also possible to compute cost effectiveness of certain scrolls using this model. At the end of the day, I am proposing a tool, and there are many things you can do with a tool.
    In some sense, scrolls in this game are a "one-size-fits-all" thing, therefore it makes sense to value them at the price where they are not wasted, e.g. not using oa int 10% on a lv50 archer overall. Also, I believe that is why some scrolls are so absurdly high (e.g. a ws is valued a t the value if can provide to a +6 85wa GDS with 1 slot left)
    I think that if it's true that there are too many degenerate gamblers in this game, this model would just suggest not gambling and purchasing scrolled eqs themselves.
     
  13. ahotbanana
    Offline

    ahotbanana Capt. Latanica Retired Staff

    360
    126
    278
    Sep 27, 2015
    Male
    UK
    9:30 AM
    I started work on something similar to this a while back. I ended up making a much more simple program that just tells you when it's more cost effective to do ws+10% instead of yoloing 30s (which you can get here if you want it).

    The problem I ran into is that value of items is rarely as simple as (item value + scroll value)/probability of scroll success. A lot of the time, people are willing to pay quite a bit more than the average cost of scrolling something in order to mitigate risk. This is especially true when the base item is scarce, even if the scarcity hasn't driven up the value of the base item at all.

    That being said, I do hope you're less lazy than I, so this actually gets off the ground. Would be nice to see people price things based on actual maths rather than just guessing what they think something is worth.
     
    • Like Like x 1
    • Great Work Great Work x 1

Share This Page