PDA

View Full Version : PSO Droprate Math, isn't this fun?!



Tycho
Feb 2, 2005, 07:11 AM
Skipped sleep to search for lots of Purplenum Mil Lilies, and not in Temple for a Windmill. I'm tired and bored. So what else could I do to kill time in the meanwhile, than... doing something 'fun'?

So I wrote this. To not get bored, to know how likely I am to find my Pee Wand in the next few blue Lilies, to make all noobs saying droprates are lies shut up, to know how bad the odds are I'll have to kill a thousand Mils. 'Enjoy', if you're as bored as I am. Did this in some program called Maple, so my notations may be a bit vague and computer-ish.
Anyway.



Assume A is the average number of enemies (with potentially good drops) it takes to get a certain rare, so, one divided by the droprate; for Frozen Shooter from Whitill Hildetorrs (1/2) this would be 2. K is the number of enemies killed divided by A; So when you killed 6 Whitill Hildetorrs, this would be 3.

Then this would be the chance to not get a certain rare if you have killed the average number of enemies needed to get one, rounded to ten decimals. For crappier droprates this approaches a certain number, this is a decently accurate guess, for A = 10,000.
evalf[10](limit(((A - 1) / A)^A, A=10000));

.3678610464

Same as above... except this is the chance you WILL get at least one instance of the specified rare, if you kill the average number of enemies needed.
evalf[10](1 - limit(((A - 1) / A)^A, A=10000));

.6321389536

But if we kill twice the average enemies, the chance to not get the item we want will be squared, cubed for triple the original amount of enemies (do the math for easy drops, like the Torrs mentioned above). Thus, the formula that could predict the chance of getting at least one instance of the sought after item after any number of killed enemies is:
1 - limit(((A - 1) / A)^ (K * A), A=10000);

1 - (9999^K)^10000/(10^K)^40000

Or, in other words, if we would assume there is an average number of enemies to kill A, a number of enemies killed E, a number K = E / A, and a magical number M that equals an approximation of the chance to get an item after having done the average number of runs needed, which is slightly less acurate for easier drops:
M = 0.3678601464;

M = .3678601464

We can only conclude the following formula for chance P to get at least one instance of the hunted item:

P = 1 - M^K

... Or 'I can only conclude', in case noone's following me anymore.. http://pso-world.com/images/phpbb/icons/smiles/icon_wacko.gif
But I don't care you don't xP, I'm wasting my time anyway.

Dhylec
Feb 2, 2005, 01:13 PM
tycho, ya have too much time indeed..

Tycho
Feb 2, 2005, 01:21 PM
;p Happens when ya sleep less and need your mind distracted.

Flashlight
Feb 2, 2005, 01:42 PM
So I wrote this. To not get bored, to know how likely I am to find my Pee Wand in the next few blue Lilies, to make all noobs saying droprates are lies shut up

1. thnx for calling me a noob http://pso-world.com/images/phpbb/icons/smiles/anime1.gif

2. WTF is a bleu lily?

Tycho
Feb 2, 2005, 02:30 PM
They're generally referred to as 'Mil Lilies'. But they just look like.. blue lilies. ;o

Edit: The thing is sort of, for EP1 Purplenum there is a 1/205 chance they drop a Psycho Wand.

<font size=-1>[ This Message was edited by: Tycho on 2005-02-02 11:35 ]</font>

WrathofGOD
Feb 2, 2005, 03:14 PM
What is "Maple" some kind of math package like Pari?

Anyway, you said you were trying to prove that drop-rates exist, which to me meant that you were trying to prove a definite, constant drop-rate...

Of course drop-rates exist, but they are non-constant. And you only came up with an approximation for an average...

The programmers probably just did something unsophisticated like:

if (rand() % C == x) then drop item. Where C = the denominator of the desired drop rate, and x = some constant in the range of 0~C.

This would SUGGEST that 1/C is the definite drop rate for some item. However, random values are just that... random. The rand() function is probably seeded by some other random value (such as system time), and there is absolutely no guarantee that the statement would ever be true... Or by some chance it could be true 10+ times in a row...

Not to say this is EXACTLY what they did... But in its most basic form, it's probably the same...

Edit: maybe I should define some of these symbols if it isnt obvious what they mean to everyone:
- rand() is a random number generator
- % means "mod". a "mod" b would be equal to the remainder of a/b. for example: 7 % 5 = 2
- and the seed of rand() is the number from which the random number generator generates its random numbers (computers are incapable of actually generating "REAL" random numbers).

<font size=-1>[ This Message was edited by: WrathofGOD on 2005-02-02 12:33 ]</font>

Tycho
Feb 2, 2005, 04:19 PM
Not the point, I didn't try to prove drop rates. I assumed they exist.
Also, you don't seem to understand what a droprate or chance means. I never ever said drops were guaranteed.

In fact, if you would have applied my formula, you would conclude the only way you would be able to at least get one instance of the item you were looking for, guaranteed... is to do an infinite runs. >.>;
or trade. http://pso-world.com/images/phpbb/icons/smiles/icon_wacko.gif

So, no, there is no guarantee. I wonder where I may have implied that, because there is no guarantee.

WrathofGOD
Feb 2, 2005, 05:00 PM
So, no, there is no guarantee. I wonder where I may have implied that, because there is no guarantee.



to make all noobs saying droprates are lies shut up

That quote suggests very strongly that you were set to prove some finite drop-rate.

And how did I misunderstand drop-rate? The rate at which a particular enemy drops a particular item, no?

All I was saying was that there can be no accurate measure of a drop-rate because of the variability of how a drop is calculated...

Hrith
Feb 2, 2005, 05:15 PM
On 2005-02-02 14:00, WrathofGOD wrote:
All I was saying was that there can be no accurate measure of a drop-rate because of the variability of how a drop is calculated...
http://www.viperalley.com/gallery/data/500/354master_of_obvious.jpg

Mixfortune
Feb 2, 2005, 05:17 PM
On 2005-02-02 14:00, WrathofGOD wrote:


So, no, there is no guarantee. I wonder where I may have implied that, because there is no guarantee.



to make all noobs saying droprates are lies shut up

That quote suggests very strongly that you were set to prove some finite drop-rate.

And how did I misunderstand drop-rate? The rate at which a particular enemy drops a particular item, no?

All I was saying was that there can be no accurate measure of a drop-rate because of the variability of how a drop is calculated...



Think of it this way... simple example.
The "drop rate" of getting a heads when you flip a coin is 1/2. That doesn't mean if you flip two coins, you always get one heads. There is a difference.

And no, they aren't "completely random" as far as the rate chance goes, otherwise a Sealed J Sword would have just as much of a chance of dropping as a monomate. And even then, guess what, there's STILL a drop rate.

Drop rate is taking the total number of conclusions, and applying how many of those conclusions results in dropping a rare. Note, POSSIBLE CONCLUSIONS. This doesn't mean that on a 1/900 drop rate, there'll be a rare on the 900th enemy of that type... but the rate still exists.

In programming, there is no such thing as being completely random. And even IF the programming has no set specified rates, there are various chances. That's why a Sealed J Sword from Skyly Gi-Gue is harder to find than a Plantain Leaf from Bluefull Gi-Gue. Same enemy, but one's still a hell of a lot rarer, and it's not because there's less of that ID floating around.

And just so you all know, if there were no drop rates at all, every enemy in Ult would drop a monomate, dimate, trimate, monofluid, difluid, trifluid, monogrinder, digrinder, trigrinder, antidote, antiparalysis, moon atomizer, sol atomizer, flame barrier, etc etc etc etc etc etc until you get all the non-rare items that can drop, PLUS a photon drop and it's rare all at once, at the same time, every time you kill one. Yes, 100% of the time.

Drop rates exist, like it or not. The problem is getting the accurate numbers, hence the topic. Note, this is not all guessing and experiments, people. Actual numbers were taken from the code itself. Understand that.

WrathofGOD
Feb 2, 2005, 06:25 PM
On 2005-02-02 14:17, Mixfortune wrote:
Think of it this way... simple example.
The "drop rate" of getting a heads when you flip a coin is 1/2. That doesn't mean if you flip two coins, you always get one heads. There is a difference.

And no, they aren't "completely random" as far as the rate chance goes, otherwise a Sealed J Sword would have just as much of a chance of dropping as a monomate. And even then, guess what, there's STILL a drop rate.

Drop rate is taking the total number of conclusions, and applying how many of those conclusions results in dropping a rare. Note, POSSIBLE CONCLUSIONS. This doesn't mean that on a 1/900 drop rate, there'll be a rare on the 900th enemy of that type... but the rate still exists.

In programming, there is no such thing as being completely random. And even IF the programming has no set specified rates, there are various chances. That's why a Sealed J Sword from Skyly Gi-Gue is harder to find than a Plantain Leaf from Bluefull Gi-Gue. Same enemy, but one's still a hell of a lot rarer, and it's not because there's less of that ID floating around.

And just so you all know, if there were no drop rates at all, every enemy in Ult would drop a monomate, dimate, trimate, monofluid, difluid, trifluid, monogrinder, digrinder, trigrinder, antidote, antiparalysis, moon atomizer, sol atomizer, flame barrier, etc etc etc etc etc etc until you get all the non-rare items that can drop, PLUS a photon drop and it's rare all at once, at the same time, every time you kill one. Yes, 100% of the time.

Drop rates exist, like it or not. The problem is getting the accurate numbers, hence the topic. Note, this is not all guessing and experiments, people. Actual numbers were taken from the code itself. Understand that.

Well, the OP already said he wasn't trying to prove that finite drop-rates exist, which is all I was trying to say, so this is just asinine, but regardless, you misunderstood what I said...

I didn't say that what an enemy drops is random...

Here is an example explaining what I meant...
- Say the DESIRED "drop-rate" of a particular rare item, a j-sword for example, is 1/10,000 for some particular enemy. MEANING that you have a 1/10,000 of getting a j-sword from that enemy each time you fight one. (This does not mean that you have a better chance of getting a j-sword if you've killed 9,999 of that enemy without them dropping a j-sword, than you do if you haven't killed a single one yet... Simple theory of probability which you obviously understand from the quarter analogy).

For simplicity we'll say there are only 2 possible drops for this particular enemy... either a j-sword or meseta.

But anyway, the desired drop-rate is 1 in 10,000.

So the programmers implement something like this:

if ((rand() % 10,000) == 5,897) drop_jsword();
else drop_meseta();

This code is the basis of my argument...

rand() generates a random number. Then you "mod" that random number by 10,000. Which by my definition of mod in my previous post, will leave you with a number in the range of 0 to 9,999. Now IF this number is equal to 5,897 (a number I made up), then the enemy will drop the jsword. Otherwise it'll drop meseta.

Now we'll analyze this:

if you take the above paragraph at face value, it looks like the chances of the statement "rand() % 10,000" being equal to 5,897 has a 1 in 10,000 chance right? Since there are 10,000 possible values and 5,897 is ONE of them.

However, this is wrong. This is the argument I made in my first post. the random number generator rand(), generates some value, but it is not 100% random. This is due to the fact that computers are incapable of creating random values (like i previously stated). There is SOME pattern deep deep within the random numbers, but it does exist. But regardless, since this pseudo-random value is seeded (explained in my first post) by some OTHER value, your drop-rate is ALSO dependent on THAT, and since it is most likely seeded by system time, and system time is also variable, you get a variable depth that is far too complex to make any definite calculations from.

Now, this rand() function COULD possibly return 5,897 40 times in a row, or it could NEVER return that number. I'm sure that the programmers put in some extra restraints to ensure that these two cases never happen.

But the fact remains that the nature of this calculation is dependant on far too many variables to ever merge to a single figure of probability...

... Hope everyone undersood that...

Mixfortune
Feb 2, 2005, 07:31 PM
On 2005-02-02 15:25, WrathofGOD wrote:

But the fact remains that the nature of this calculation is dependant on far too many variables to ever merge to a single figure of probability...

... Hope everyone undersood that...



I understand all of your post, and is basically what I was saying. The first part of my post was in response to your particular post. The rest was general stuff.

About the part in particular I just quoted, though, that's obvious. It would be foolish (although possible) for them to base the rand function off of a single variable.

However, that doesn't change the fact that the overall result of the rand function can be worded by means of a drop rate, since a drop rate is more "user friendly" and intuitive to something the average person can comprehend. The drop rates are a translation of the possible results of the function, not the function itself. That was always the case, and it's been known to be that.

The original post, from what I could tell, include the steps past what you were referring to, not the function itself. Think of it more like "the steps of the translation process from code to drop rate", with a few of the initial steps not included.

Tycho
Feb 3, 2005, 10:23 AM
On 2005-02-02 15:25, WrathofGOD wrote:

However, this is wrong. This is the argument I made in my first post. the random number generator rand(), generates some value, but it is not 100% random. This is due to the fact that computers are incapable of creating random values (like i previously stated). There is SOME pattern deep deep within the random numbers, but it does exist. But regardless, since this pseudo-random value is seeded (explained in my first post) by some OTHER value, your drop-rate is ALSO dependent on THAT, and since it is most likely seeded by system time, and system time is also variable, you get a variable depth that is far too complex to make any definite calculations from.

But the fact remains that the nature of this calculation is dependant on far too many variables to ever merge to a single figure of probability...




Indeed. This process of creating a pseudo-random number is so deep, complicated, and unpredictable...
that I would like to refer to these numbers as, well, random. http://pso-world.com/images/phpbb/icons/smiles/icon_wacko.gif :/

Garm
Feb 3, 2005, 10:59 AM
1/205 sounds good enough for me atm. I tried to read this asap (dinner in one min or so) adn believe me: it's hard. I'll try later when I have more time but looks good for now XD.

Ryuko
Feb 3, 2005, 11:14 AM
Trying to calculate how the drop rate is affected by the random seed, eg. system time is like trying to take into account wind resistance when flipping a coin. Yes it may be random, but the odds are still the closest approximation we have.

kazuma56
Feb 4, 2005, 07:26 PM
Wrath of God do you know Java? because java has a similar command called math.Random which does what you implied if put into an if statement, which is what I was going to suggest.... like if the drop is 1/390, the program will pick a random value starting from one, and up to 390, if the program should pick the number 390, the drop will appear, if it doesn't pick the number 390, it will drop a weapon or meseta etc, but maybe if the drop rate somehow exceeded the point it was supposed ot hit, say it was 391, it would drop a PD, because it exceeded the limit but since 390 was the drop rate needed for X item to appear, a PD appears instead.

WrathofGOD
Feb 4, 2005, 09:11 PM
I really don't know anything about java, I only know the C-family languages (C,C++,C#).

<font size=-1>[ This Message was edited by: WrathofGOD on 2005-05-25 16:49 ]</font>

Hrith
Feb 4, 2005, 10:37 PM
On 2005-02-04 16:26, kazuma56 wrote:
Wrath of God do you know Java? because java has a similar command called math.Random which does what you implied if put into an if statement, which is what I was going to suggest.... like if the drop is 1/390, the program will pick a random value starting from one, and up to 390, if the program should pick the number 390, the drop will appear, if it doesn't pick the number 390, it will drop a weapon or meseta etc, but maybe if the drop rate somehow exceeded the point it was supposed ot hit, say it was 391, it would drop a PD, because it exceeded the limit but since 390 was the drop rate needed for X item to appear, a PD appears instead.That is not possible.
First a PD is a simple tool item, like monomate, etc.

Then, the value is not 1/390 absolutely. 1/390 is including drop-anything rate. So, if the monster has an 80% drop-anything rate, there is a 20% chance that it will drop nothing, and 80% that it will drop either a tool item, a monster specific item (weapon, armour or shield, this is fixed), meseta or the rare.

All those rates are fixed and you can find them on my FTP, here is the link to the documents file http://romain.bernardi.free.fr/pso/documents.rar

Mixfortune
Feb 4, 2005, 11:00 PM
http://pso-world.com/images/phpbb/icons/smiles/icon_eek.gif
Kef's "secret stash", heheh.
Of course... now I need to find and install Office more than before http://pso-world.com/images/phpbb/icons/smiles/icon_razz.gif

Hrith
Feb 5, 2005, 07:55 AM
Yes, I decided to put all my info into Excel files after several people asked me to make them public.

Of course, Housoka played a part in these http://pso-world.com/images/phpbb/icons/smiles/icon_razz.gif (Tycho, too)