Recently i have started programming and i am always looking for new exercises. Back in the days when i was a completionist i was always curious about how many more packs i need to have a full Collection and i thought it would be cool to have a Programm for that. I am not really advanced in programming, but i think that i am quite confident with the Basics of Python now and i wanted to give it a try to make such a Programm, even though it might be not a 100% accurate. However, it didn't take Long before i faced the first Problem with the Simulation of one pack. My idea was to decide for every single Card wheter it is a (golden) legendary, a (golden) epic, a (golden) rare or a (golden) common using the Card distribuation as probabilities. Due to that i would also pass on the pity timer, since this should be taken into account in the probabilities already and since i consider many packs. My biggest Problem is how i should handle the fact that a pack must have at least on Card with a rarity higher than common. My idea was to "create" a pack first and afterwards to check if the requirements for a pack are fulfilled or not. If not i would simple delete the pack and create a new one. However, at this Point i am not sure if i can do it like that or if my Programm would become to inaccurate. Therefore, i would like to know your thoughts on that matter.
Are you programming it on a individual card basis? Because if so you could assign every card a number and have an if n/5 = integer program the probabilities just for rare+.
It could also be the case that your data for the average pack already has built in that a card is always higher rarity so distributing the probability evenly across cards will work at high pack numbers. So even though a pack might not meet the pack criteria of one rare or better a large amount of packs will have the right amount of rares etc.
Its hard to give specific feedback because I don't know python (I've done a bit of VBA).
Are you programming it on a individual card basis? Because if so you could assign every card a number and have an if n/5 = integer program the probabilities just for rare+.
It could also be the case that your data for the average pack already has built in that a card is always higher rarity so distributing the probability evenly across cards will work at high pack numbers. So even though a pack might not meet the pack criteria of one rare or better a large amount of packs will have the right amount of rares etc.
Its hard to give specific feedback because I don't know python (I've done a bit of VBA).
Anyway don't know if any of that helps haha.
It is not so much a Problem of programming rather than a mathmatical/statistical Problem. I am wondering if it is okay to delete single packs from your samples. I think it should be okay, but i am not sure.
Well, the exact distribution of rarities in packs is one of the many things Blizzard doesn't bother to tell us so it's hard to say that a particular solution would be "wrong", since the "right" answer is unknown.
I think (but it's only a guess) that the way this could work is that the pack starts as 4 commons and 1 rare, and every card is then individually buffed in rarity (and colour) independently. You'd need to work out how to implement the pity timer then (e.g., I don't know if the guaranteed Legendary replaces the rare card or is chosen randomly). If you have access to a lot of data about packs, you can come up with arbitrary "metrics" for them (e.g., how often a pack with 1 legendary, 1 rare, 1 golden common and 2 regular commons drops) and then measure that data against the results of your simulations.
By deleting a pack that has no rare+ card you're not doing anything intrinsically wrong. It's pretty suboptimal it terms of time and computations so I don't think that's how Blizzard does it, but you still obtain a sensible distribution of a pack (conditioned on having a rare+ card). Whether it's the right distribution we don't know, but you can try to test it as described in the paragraph above.
Roll the first card of each pack as a guaranteed rare+, then do the last 4 as common+, and finally shuffle the order of the cards so that the rare+ can be in any position. That seems like the simplest solution to me.
Well, the exact distribution of rarities in packs is one of the many things Blizzard doesn't bother to tell us so it's hard to say that a particular solution would be "wrong", since the "right" answer is unknown.
I think (but it's only a guess) that the way this could work is that the pack starts as 4 commons and 1 rare, and every card is then individually buffed in rarity (and colour) independently. You'd need to work out how to implement the pity timer then (e.g., I don't know if the guaranteed Legendary replaces the rare card or is chosen randomly). If you have access to a lot of data about packs, you can come up with arbitrary "metrics" for them (e.g., how often a pack with 1 legendary, 1 rare, 1 golden common and 2 regular commons drops) and then measure that data against the results of your simulations.
By deleting a pack that has no rare+ card you're not doing anything intrinsically wrong. It's pretty suboptimal it terms of time and computations so I don't think that's how Blizzard does it, but you still obtain a sensible distribution of a pack (conditioned on having a rare+ card). Whether it's the right distribution we don't know, but you can try to test it as described in the paragraph above.
I think i will pass on the pity timer. The probabilities are depending on former packs anyway and it is much harder to Modell that and there is no data about those probabilities. Therefore, i chose the average probabilities and in those consider already the effect on the pity timer. In the Long run it should even out.
Starting with one Card rare+ was also something i had in mind, but i don't know how that would Change the probabilities. If my Approach is not intrinsically wrong i will go for it and hope it doesn't take to Long :)
Roll the first card of each pack as a guaranteed rare+, then do the last 4 as common+, and finally shuffle the order of the cards so that the rare+ can be in any position. That seems like the simplest solution to me.
In this Approach i don't know how the probabilites would Change.
I'm sure it won't take too long! Blizzard probably generates millions of packs per day so it might matter to them. But it's possible I'm wrong and this is exactly how they do it.
I'm sure it won't take too long! Blizzard probably generates millions of packs per day so it might matter to them. But it's possible I'm wrong and this is exactly how they do it.
I finished the pack Simulation and it is fast enough for my purposes, because even in the worst case i don't have to simulate more than 2k-3k packs i guess.
Sorry, to bring this post up, but i have to set something straight here in case someone does find this thread through the search engine. The idea of simple deleting the packs which doesn't contain at least one rare, epic or legendary is not completely right without adjustments. The Problem is that you don't cut random samples, but specific ones. Therefore, you Change the probabilites of each rarities. I still use this Approach, but i had to adjust the probabilies in a way, so that after the cutting of those specific samples the rarities occur with the correct probabilities again.
By the way: The Programm does calculate the expected amount of packs needed to complete a set and it is quite accurate i would say. I had planned some extensions, but i decided to not continue any more (at least for now). However, if someone is interested in the Code, i would gladly share it. But i am not a pro, so don't expect to much ;)
Recently i have started programming and i am always looking for new exercises. Back in the days when i was a completionist i was always curious about how many more packs i need to have a full Collection and i thought it would be cool to have a Programm for that. I am not really advanced in programming, but i think that i am quite confident with the Basics of Python now and i wanted to give it a try to make such a Programm, even though it might be not a 100% accurate. However, it didn't take Long before i faced the first Problem with the Simulation of one pack. My idea was to decide for every single Card wheter it is a (golden) legendary, a (golden) epic, a (golden) rare or a (golden) common using the Card distribuation as probabilities. Due to that i would also pass on the pity timer, since this should be taken into account in the probabilities already and since i consider many packs. My biggest Problem is how i should handle the fact that a pack must have at least on Card with a rarity higher than common. My idea was to "create" a pack first and afterwards to check if the requirements for a pack are fulfilled or not. If not i would simple delete the pack and create a new one. However, at this Point i am not sure if i can do it like that or if my Programm would become to inaccurate. Therefore, i would like to know your thoughts on that matter.
It's a very vague question.
Are you only after gold cards, if so why?
Are you programming it on a individual card basis? Because if so you could assign every card a number and have an if n/5 = integer program the probabilities just for rare+.
It could also be the case that your data for the average pack already has built in that a card is always higher rarity so distributing the probability evenly across cards will work at high pack numbers. So even though a pack might not meet the pack criteria of one rare or better a large amount of packs will have the right amount of rares etc.
Its hard to give specific feedback because I don't know python (I've done a bit of VBA).
Anyway don't know if any of that helps haha.
From what I understand you're trying to make a program to simulate pack openings until you have a full collection? (gold or otherwise)
Make sure you factor into it, dusted doubles, giving the ability to buy leftover cards.
Well, the exact distribution of rarities in packs is one of the many things Blizzard doesn't bother to tell us so it's hard to say that a particular solution would be "wrong", since the "right" answer is unknown.
I think (but it's only a guess) that the way this could work is that the pack starts as 4 commons and 1 rare, and every card is then individually buffed in rarity (and colour) independently. You'd need to work out how to implement the pity timer then (e.g., I don't know if the guaranteed Legendary replaces the rare card or is chosen randomly). If you have access to a lot of data about packs, you can come up with arbitrary "metrics" for them (e.g., how often a pack with 1 legendary, 1 rare, 1 golden common and 2 regular commons drops) and then measure that data against the results of your simulations.
By deleting a pack that has no rare+ card you're not doing anything intrinsically wrong. It's pretty suboptimal it terms of time and computations so I don't think that's how Blizzard does it, but you still obtain a sensible distribution of a pack (conditioned on having a rare+ card). Whether it's the right distribution we don't know, but you can try to test it as described in the paragraph above.
Auto squelch. That's all I'm asking for.
Roll the first card of each pack as a guaranteed rare+, then do the last 4 as common+, and finally shuffle the order of the cards so that the rare+ can be in any position. That seems like the simplest solution to me.
I'm sure it won't take too long! Blizzard probably generates millions of packs per day so it might matter to them. But it's possible I'm wrong and this is exactly how they do it.
Auto squelch. That's all I'm asking for.
Sorry, to bring this post up, but i have to set something straight here in case someone does find this thread through the search engine. The idea of simple deleting the packs which doesn't contain at least one rare, epic or legendary is not completely right without adjustments. The Problem is that you don't cut random samples, but specific ones. Therefore, you Change the probabilites of each rarities. I still use this Approach, but i had to adjust the probabilies in a way, so that after the cutting of those specific samples the rarities occur with the correct probabilities again.
By the way: The Programm does calculate the expected amount of packs needed to complete a set and it is quite accurate i would say. I had planned some extensions, but i decided to not continue any more (at least for now). However, if someone is interested in the Code, i would gladly share it. But i am not a pro, so don't expect to much ;)