Andreah Posted February 22, 2022 Posted February 22, 2022 (edited) Let's say I'm making a particular set via conversion, and I'd like to sell them as whole sets of six. Granted, there's individual parts of many sets that sell better than the rest of the set. Since we're converting into the set at random, most of the time we won't have exactly one of each of the six pieces, so we would have to do further conversions to even the set out. Let's also say we stop after getting any six parts of the set, and then start converting inside the set to even it out. How many conversions from the random grab-bag we start with do we need to do, on average, to get one of each piece? If we know this answer, then we know what the additional cost is (in converters at least, if not also time & effort) that needs to be made up in increased price or increased volume. And in addition, I like to know what my average cost of production is so that I can intelligently set my sales listing price so that I'm at least guaranteed to not lose money on a sale. Well, I'm a statistician, and my intuition tells me there ought to be a closed for solution to this. But I'm also retired and rusty, so instead of doing it right, I wrote a Monte-Carlo simulation and did it ten million times and recorded the results. The simulation for each case rolls six six-sided dice and tallies up how many of each number comes up. Then, for each number that came up more than once, it rerolls until it fills any of the potential results that didn't come up. Then it records the number of rerolls. And then it repeats that ten million times, and tracks the average number of rerolls. I'm not sharing my python code because it's embarrassingly ugly and brute force; and also because it would be great if someone else did their own completely independent test and confirmed or countered my results. Or even better, worked out the analytical closed-form result. So, what was the answer I found? It takes 7.2478 conversions on average to make a clean level set of six out of a random initial set of six. For in-set conversions, that's three converters per trial, and converters cost ~70k at present, so the overall cost of leveling a set out prior to selling is ~250k per piece. What if we process until we have twelve pieces in the target set? That's more likely to even out a bit more, so there should be fewer leveling conversions at the end, right? Yes, the total conversions for making two complete sets out of twelve random pieces would be 10.106, or ~177k per piece, which is pretty close to three converters per piece sold. Can we do better? Of course; the more random pieces you accumulate before you try to level them out to sell, the more likely you already have complete sets. Edited February 22, 2022 by Andreah 1
Andreah Posted February 22, 2022 Author Posted February 22, 2022 One thing that immediately comes to mind, is that if you convert enough pieces, you'll be nearly assured of getting one complete set out of them. So, by carrying some inventory, you can decrease the number of conversions. What if we never converted one target set piece to another, but only sold off complete sets as they showed up, how much average inventory would we be carrying on average? This is a slightly different simulation, but not a difficult one at all. We'll start with an empty inventory, and then one by one, randomly roll new pieces into it. Each time we do so, we'll tally up how many in total we're carrying and record it. Then, we'll check to see if we have any full sets, and if so, we'll subtract them out. After doing this for a suitably long time, say, ten million new piece rolls, we'll print out the average. We can also track the maximum, or how often the inventory exceeded a certain count, and even how often inventory was empty. We find something very interesting -- the size of the inventory we carry gets very large! :O In my first test run of doing this ten million times, the average inventory was 6922 pieces, and the maximum was 14384! Well, this is sort of thing that would seem obvious in hindsight. If we're always selling off a full set whenever it appears, then there's most often (hugely most often, in fact) just one missing piece that we need to catch at random to fill out a set to sell. Think of it this way, one each new piece we roll, there's five chances out of six it will just increase inventory by one, and one chance out of six it will complete a set and let us sell six pieces out of inventory. So, on each roll, there's only a net inventory change of -1/6. This is a very modest downward pressure, and it means the inventory looks a lot like a random walk. The lesson here is if one is processing target sets to sell, some end conversions to level sets out to sell would be worthwhile, but the more inventory one is willing to carry or more sets to list for sale at once, the cheaper it is in converters. 1
Yomo Kimyata Posted February 22, 2022 Posted February 22, 2022 58 minutes ago, Andreah said: The simulation for each case rolls six six-sided dice and tallies up how many of each number comes up. Then, for each number that came up more than once, it rerolls until it fills any of the potential results that didn't come up. Then it records the number of rerolls. And then it repeats that ten million times, and tracks the average number of rerolls. First of all, great! I've done a number of practical applications of this sort of thing, and I'm actually doing something similar right now but it's taking more time than I have to dedicate to it for the time being. For myself, I'm many years away from my probability studies, so I've forgotten lots of my math skills. I've forgotten less of my programming skills, so maybe I'll cobble together some Monte Carlo simulations and test. I really have no idea how to definitely solve this, since it seems path dependent and right now it's outside of my paygrade. To the situation I quoted above, the analogy is to roll six dice, and determine how many rerolls it take to get 1,2,3,4,5,6 in some order. I would suggest a change to your process; it may seem minor, and maybe it is. For each number that is repeated, roll the repeat once and check for further repeats. If there are additional repeats, roll them once. Then reassess. Example: Initial roll: 1, 1, 3, 3, 3, 6. Under your process, you would roll the second 1 until you got a 2, 4, 5.. Then you would roll the second 3 until you got one of the two remaining choices. Then you would roll the third 3 until you got the final number. Under my suggestion, roll the second 1, the second 3, and the third 3. Reorder and reassess. If no duplicates, you're done! If there are duplicates, repeat the process. Like I said, my math is rusty, but I *think* that this will reduce the number of outliers and tighten the variance. Note that for only one repeat (e.g., 1, 2, 2, 4, 5, 6) our methods are identical. 1 Who run Bartertown?
Ukase Posted February 22, 2022 Posted February 22, 2022 So...what I'm thinking is that you never burn any converters on any of them. Just keep collecting/crafting them and you should get the sets to sell. I mean, what's the point of converting into a full set when you know that you'll eventually get your full set? The more you collect, the more sets you'll get. The RNG is a fickle mistress, but I dare say you'd rarely exceed 8 more than any other. I base this off my own experience in just stashing purples. 1
Andreah Posted February 22, 2022 Author Posted February 22, 2022 1 minute ago, Ukase said: So...what I'm thinking is that you never burn any converters on any of them. Just keep collecting/crafting them and you should get the sets to sell. I mean, what's the point of converting into a full set when you know that you'll eventually get your full set? The more you collect, the more sets you'll get. The RNG is a fickle mistress, but I dare say you'd rarely exceed 8 more than any other. I base this off my own experience in just stashing purples. This was what my second test tried out, and the number you have hanging around not making full sets grows without limit, roughly in proportion the the square-root of the number of pieces you've made. One piece, at random, ends up being a bottleneck and it never catches up on it, and you build up a huge excess of the others. Only the steady slow production of sets to sell keeps it from growing in direct proportion.
Andreah Posted February 22, 2022 Author Posted February 22, 2022 (edited) First: while implementing a few different variations on the order of rerolling, I found a subtle logic error in my code for the first test I ran. You can be certain this is the first time I've ever made a mistake in coding that had to be found land corrected later! Especially after showing results! This error caused some of the rerolls to come back as the same item; I was only checking that successive rerolls weren't the same index that they started with, and not the index they had right before the present reroll. So, for example, I'd start with 1, get a 2, then roll again and make sure it wasn't a 1 again, when I should be checking it against 2 which is its' new value. In-set conversions don't remember and avoid the first item you started with, only the item you have right now. The second test had no rerolling at all, and I see no issues in it, so far. Then, with that fixed, I'm comparing a test 1 with rerolls in order from the piece with the most copies first and down, and also in order from the least copies (above the first unique one), and up. This isn't quite what Yomo is asking for, but I'm heading that direction in steps. ... and it turns out they're identical statistically for runs into the millions of repetitions. Edit: I also have a new best estimate for the number of conversions needed, and I will update my top post. Edited February 22, 2022 by Andreah
Bionic_Flea Posted February 22, 2022 Posted February 22, 2022 I appreciate your compiling and openly sharing your data. But why do you only sell complete sets? Is there some advantage I'm not seeing? Obsessive-compulsive mandates? Selling to individuals off market? 1
Andreah Posted February 22, 2022 Author Posted February 22, 2022 (edited) 7 minutes ago, Bionic_Flea said: I appreciate your compiling and openly sharing your data. But why do you only sell complete sets? Is there some advantage I'm not seeing? Obsessive-compulsive mandates? Selling to individuals off market? Well, the theory would be, that people generally buy sets in complete, or mostly complete sets. Certainly NOT TRUE for many sets with bad six-piece bonuses, or those with uniques people like, but I've had good success selling many things by keeping a single full set up for sale at a time.; and many times people buy them in complete groups. Edited February 22, 2022 by Andreah
Yomo Kimyata Posted February 22, 2022 Posted February 22, 2022 7 minutes ago, Bionic_Flea said: I appreciate your compiling and openly sharing your data. But why do you only sell complete sets? Is there some advantage I'm not seeing? Obsessive-compulsive mandates? Selling to individuals off market? for me it’s diversification. say I buy 50 lvl 10 Panacea E/R recipes (I do that sometimes @Ukase, sorry!) and craft them. I could sell all 50 at some level and check back next week and be ok. But I’m not generally checking back next week. So I put 8 up for sale and roll the other 42 by set. It costs me 126 converters, I can expect a random distribution of the other 5 pieces, and I’m out of inventory by the next time I check. 1 Who run Bartertown?
Andreah Posted February 22, 2022 Author Posted February 22, 2022 30 minutes ago, Ukase said: So...what I'm thinking is that you never burn any converters on any of them. Just keep collecting/crafting them and you should get the sets to sell. I mean, what's the point of converting into a full set when you know that you'll eventually get your full set? The more you collect, the more sets you'll get. The RNG is a fickle mistress, but I dare say you'd rarely exceed 8 more than any other. I base this off my own experience in just stashing purples. I put some more thought into this, and can explain is better, I hope. Since we're not doing any conversions, rolling out a million pieces and selling the sets as they come up is no different than rolling a million pieces and then selling all the sets at the end. In that case, the number of sets you can sell is dictated by the piece you got the fewest of, which is related to the spread of the count that fell into all six possibilities, and the count of those is distributed approximates in a Binomial distribution with rate p=1/6, and its standard deviation is the square root of the number of trials, and this only increases as the number of trials increases. Your inventory will fill up with incomplete sets.
Andreah Posted February 22, 2022 Author Posted February 22, 2022 Just now, Yomo Kimyata said: for me it’s diversification. say I buy 50 lvl 10 Panacea E/R recipes (I do that sometimes @Ukase, sorry!) and craft them. I could sell all 50 at some level and check back next week and be ok. But I’m not generally checking back next week. So I put 8 up for sale and roll the other 42 by set. It costs me 126 converters, I can expect a random distribution of the other 5 pieces, and I’m out of inventory by the next time I check. The Holy Grail in this case would be for us to produce set pieces in proportion to the rate at which people would buy them at the price points we want. If, instead of complete sets, that was the criterion, the same simulation code modified to follow those proportions would tell us what kind of average converter usage does the trick, and then in turn, help me understand my break-even selling price.
Troo Posted February 22, 2022 Posted February 22, 2022 1 minute ago, Andreah said: Well, the theory would be, that people generally buy sets in complete, or mostly complete sets. Certainly NOT TRUE for many sets with bad six-piece bonuses, or those with uniques people like, but I've had good success selling many things by keeping a single full set up for sale at a time.; and many times people buy them in complete groups. While this makes sense, the practical application might need to include that players may already have some pieces of a set or are doing some converting on their own. I'm not sure where you crafting or converting is concentrated, but I've found "convert as little as possible across more enhancements" yields better overall results. (I can elaborate) Example: Rather than shoot for exactly 6 specific enhancements. I'll convert 20 enhancements and likely end up with 3 complete sets or very close. 1 "Homecoming is not perfect but it is still better than the alternative.. at least so far" - Unknown (Wise words Unknown!) Si vis pacem, para bellum
Andreah Posted February 22, 2022 Author Posted February 22, 2022 1 hour ago, Yomo Kimyata said: I would suggest a change to your process; it may seem minor, and maybe it is. For each number that is repeated, roll the repeat once and check for further repeats. If there are additional repeats, roll them once. Then reassess. Okay, I got this implemented and tested. The results were statistically identical to my original method (post correcting my logic error) and identical to doing them in either sorted order by number of duplicates. 1 1
Andreah Posted February 22, 2022 Author Posted February 22, 2022 2 minutes ago, Troo said: Example: Rather than shoot for exactly 6 specific enhancements. I'll convert 20 enhancements and likely end up with 3 complete sets or very close. This is true, however, you will always have an increasing number of leftovers, even if the percentage of leftovers decreases -- which is what my second test basically shows. At a certain point, the leftovers may be proportionately few enough to no longer worry about, of course.
Yomo Kimyata Posted February 22, 2022 Posted February 22, 2022 (edited) 15 minutes ago, Andreah said: Okay, I got this implemented and tested. The results were statistically identical to my original method (post correcting my logic error) and identical to doing them in either sorted order by number of duplicates. That doesn't shock me. I do it that way because it is the fastest way for me to physically/virtually implement the process. A thought process was that the probability of your method getting desired results in three in-set conversions is (1/2)*(1/3)*(1/6) versus (1/ (2^3)). But I may be using some sort of reverse Monte Hall thought process. So both the mean and variance were identical? Good to know. EDIT: my math is bad in the probability. I'll leave it to someone else to correct me. Edited February 22, 2022 by Yomo Kimyata 1 Who run Bartertown?
Andreah Posted February 22, 2022 Author Posted February 22, 2022 It turns out, it would be very easy to do minimal conversions to keep the inventory down in the Test 2 scenario. If, for example, each time you got one full set to sell, you also picked out the one kind of piece you had the most of, if more than one, and converted one piece once to any other piece, whether is makes a set or not, that keeps the inventory from growing without bound. In this case, it kept the average sustained inventory over a million trials down to 28.3. The worst it ever was, in the entire run, was 196. Now, that's kind of high, but conceivable to keep that many around in the auction or in SG storage. if you reroll the two highest counts, then the average was 17.6 and the most ever in inventory was 122. Both of these alternatives use far fewer converters, less than1/6th or 1/3rd as many, respectively, than my top post Test 1 method.
Andreah Posted February 22, 2022 Author Posted February 22, 2022 Let's say you were only willing to allow one set you were processing to use up, say, 20 inventory spots. And any time you got 21 of them, you'd covert until you had a complete set and sell it, in addition to selling any complete sets you got along the way naturally. In this case, the average inventory would be 15.014, the maximum would be 20, and on average, you'd use 0.2427 conversions per piece. If you allowed 40 spots, it would average 29.6 inventory and use up 0.1145 conversions per unit processed. I'm not sure there's much practical value to running these minor variations, but I find it interesting abstractly to go over these kinds of what ifs.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now