The Mud Connector

Author Topic: RNG and Building  (Read 5817 times)

SteppinRazor

  • New to TMC
  • *
  • Posts: 19
    • View Profile
RNG and Building
« on: August 23, 2017, 3:50 PM »
A simple idea concerning RNG-based mechanics.

I've forgotten the math, but basically RNG is somewhat deceptive. A 10% chance doesn't mean you will get it 1 in 10 tries. It represents an average that can be wildly different, and may not even represent an average of 10% when you define "if roll =< 10".

Some of you may have played an old-school MMO, where camping could often revolve around a timed unique spawn with horrendous odds of dropping an item, so you will know that camping can turn bad when RNG is involved. What good is spending off time doing nothing but waiting, when you could be doing something else?

Builders should be aware that if you set a difficult task before someone, and it's RNG based, you're going to have some unhappy people who otherwise shouldn't be. The difficulty should not be derived from something beyond anyone's control. Now rarity... is a different beast. It's a flip side of the same coin. Certain things should be impossible, with odds so improbable that when it miraculously does land that invisible die, it can be celebrated for the miracle that it is. Try not to clog up that pool of items with trash, ie things that are not of that caliber in whatever terms, or it cheapens the idea represented. At the same time, you should actively encourage people NOT to require these things, not to try and farm them. WoW's mounts are a good example... some people have spent more hours farming mounts than I have actively worked in any given week, and they're motivated by rewards and tracked progress to waste their time. Sure, some people like to do it, and I don't fault them for it, but driving "difficulty" as a randomly generated number is an insult to them. It might be generous, with a 3% drop, but it's still deceptive because you may run that content 33 times and have nothing. You might run it 99 times, and have nothing.

So, what's the answer?

A safety net. Make that average a legitimate, defined amount.

This is how an average 1/10 or 10%  RNG calculation will look at its most basic.
Code: [Select]
randomnumber = 1 100
if randomnumber >= 90
giverarestufffs!
else
toobadsosad
endif

Now if you take it a step further... you can throw in a safety net counter.
Code: [Select]
if blockerset == 1
randomnumber = 100
blockerset = 0
else
randomnumber = 1 100
endif
if randomnumber >= 90
rngnet = 0
giverarestufffs!
else
rngnet + 1
if rngnet == 10
blockerset = 1
call thisexactscriptagain
break
endif
toobadsosad
endif

This results in someone getting a reward either by pure chance in the stated 1/10, or at the very last point where 1/10 still stands as a defined guarantee.

There are a few ways to twist around an RNG chance, too. You can throw in other modifiers to influence base chance, like a luck stat. The below assumes that luck has a possible score of 1-10.

Code: [Select]
randomnumber = 1 100
modifier = charactersluck
modifier * 10
modifier / 4
randomnumber + modifier
if randomnumber >= 90
giverarestufffs!
else
toobadsosad
endif

This is still not a guarantee of 1/10, but it does raise the odds somewhat which most players desire when having to spend time chasing a rare whatever.
Like a steppin' razor, better watch my sides.

MGrunbaum

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: RNG and Building
« Reply #1 on: August 29, 2017, 2:19 PM »
Just as a little tidbit for those interested in why: RNG-based mechanics are usually independent events, meaning the chance for an event to trigger (say 10%) is not affected by whether the event triggered in the past, at all. Like the flip of a coin -> If you flip the coin and you get heads, you're no more, or less likely, to get heads on the next flip. Believing you are more likely to get heads (or tails) is called the gambler's fallacy. A pretty easy-to-follow description can be found here.

Add to that, that a random number between X to Y is not guaranteed to produce an 'average' balanced number of each of the numbers when you just generate a few of them; something being random precisely means that it follows no discernable pattern, and good random number generators are built to be pseudo-random and produce an average spread over a very large number of samples.
« Last Edit: August 29, 2017, 2:25 PM by MGrunbaum »

amir.dratgard

  • New to TMC
  • *
  • Posts: 13
    • View Profile
    • Development Blog
Re: RNG and Building
« Reply #2 on: January 31, 2018, 9:15 AM »
At the end of the day, if 10/100 isn't triggering as much as you would like it to, why not change it to 20/100?

While we spend a lot of time focusing on one player, having a "10% average chance", another way of looking at it is 10 out of 100 players will the special prize.  Are we really trying to focus on one person or an entire player base?

I guess I've never signed off on the idea that 10% isn't really 10% in the long run. Sure, some players may get it right off the bat, some may average 1%, but they all average out in the long term and I've never been convinced that's a bad idea.

I'm not following this code very well either - If you want the law of averages and percentiles to even out more smoothly why not just roll the dice 10 times instead of just once?  Rand(1 to 100), 10x, similar to Rand(10 to 1000), but the random impact is lessened.

For X = 1 to 10
  X = X + Random(1 to 100)
Next X
If X > 900 Then AwardGiven

This is a 1/10 odds, but rolled 10x to reduce your complaint of outlying random chances

pariias

  • New to TMC
  • *
  • Posts: 47
    • View Profile
Re: RNG and Building
« Reply #3 on: January 31, 2018, 12:00 PM »
I'm always looking for muds with heavy RNG, especially if it is in the form of randomized loot. They seem few and far between or done quite poorly.

Looking for a new home to play a gross amount of time, if any of you know anywhere.

Ateraan

  • TMC Veteran
  • *****
  • Posts: 634
  • New Worlds Ateraan
    • View Profile
    • New Worlds Ateraan
Re: RNG and Building
« Reply #4 on: January 31, 2018, 1:00 PM »
I'm always looking for muds with heavy RNG, especially if it is in the form of randomized loot. They seem few and far between or done quite poorly.

Looking for a new home to play a gross amount of time, if any of you know anywhere.
I'm sure many have this factor in them. On Ateraan there is random loot everywhere especially in quests that may give you different results. There are random creatures, loot, areas, etc. Many things are dynamic rather than static especially in the ocean with ships, sailing, islands, etc.

I'm not sure though that this is so much different than other rp enforced games so maybe you are asking for something specific?
New Worlds Ateraan
www.ateraan.com

Hades_Kane

  • Community Manager
  • TMC Veteran
  • *****
  • Posts: 958
  • Owner / Administrator of End of Time
    • View Profile
    • End of Time
Re: RNG and Building
« Reply #5 on: January 31, 2018, 1:16 PM »
At the end of the day, if 10/100 isn't triggering as much as you would like it to, why not change it to 20/100?

While we spend a lot of time focusing on one player, having a "10% average chance", another way of looking at it is 10 out of 100 players will the special prize.  Are we really trying to focus on one person or an entire player base?

I guess I've never signed off on the idea that 10% isn't really 10% in the long run. Sure, some players may get it right off the bat, some may average 1%, but they all average out in the long term and I've never been convinced that's a bad idea.

If you are the player that has tried to get the special thing and have tried 100 times and haven't gotten it, but then you look at a handful of other players that put in a fraction of that amount of work and have received it?  Then that might convince you it is a bad idea.

Low random generation like that is really just a lazy way to increase and promote grinding, and  only in theory will it, from a game design standpoint, regulate the frequency in which the special thing appears... and I say "in theory" largely because if a player isn't just going to leave your game frustrated at getting screwed by the RNG, they will just stick around until they get it, which means you aren't REALLY regulating the frequency of it, just creating an irritating, unnecessary barrier of entry for those unlucky enough not to get it the first few times.

That would be the point of addressing handling things in a way different than relying on the RNG, and making the reward more closely (and fairly) tied to the amount of time/work put in rather than being at the mercy of a randomness.
-Diablos
End of Time - A Final Fantasy & Chrono Trigger based MUD looking for players & builders!
eotmud.com : 4000 • http://www.eotmud.comhttp://www.facebook.com/eotmud
http://www.mudconnect.com/mud-bin/adv_search.cgi?Mode=MUD&mud=End+of+Time


Epilogy

  • TMC Member
  • ***
  • Posts: 178
    • View Profile
Re: RNG and Building
« Reply #6 on: January 31, 2018, 3:24 PM »
I played old-school MMOs.

Famine could chime in here, having been a uh... staff member for... a company. :D

Anyways, it kind of went like this:
24-hour timer trigger:
if 1/10
load rareload
else
restart timer
endif

so you'd have a 1 in 10 chance every 24 hours of a spawn to even load....

then you'd tack on a 10% chance to load an item (probably from a loot table, with 10% or so weight given to each possibility, so you may not get the UBAR you wanted, but SHINAY dropped, I guess, so hey.) so that effectively bumps your chance to 1%, after the load of the mob, and the load of the item.

I've spent more of my life camping RNG figures than I think I have anything else in terms of playing games.

I honestly don't mind super, super rare loads, as long as it's not a one-off chance (for important, game-changers), and I know that if I really do kill that mob 10000 times, I'm going to most definitely get the reward in there.

Blizzard implemented what is known as a Pity Timer for players seeking legendary items within their games. The longer you go without one, while still completely gameplay which qualifies to drop the item, the higher the odds become of you receiving something. Maybe not what you want (lol, blizz doesn't work like that, yo) but you do get A legendary.

blinkdog

  • New to TMC
  • *
  • Posts: 18
    • View Profile
Re: RNG and Building
« Reply #7 on: February 06, 2018, 9:42 PM »
Probability often plays hell with our sense of intuition.

This is the intuitive (but wrong) understanding:
- 10% drop rate
- I get it 1 out of 10 times
- If I run the content 10 times, I should have the drop

The math is this:
failure_rate = (1 - drop_rate) ^ (number_of_tries)
success_rate = (1 - failure_rate)

For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

If you follow this through, you'll notice that after twenty-two (22) rounds, there are still 10 players trying to get that drop!

If you understand this example, it should be pretty easy to tune your drop rate to get what you want.
For example, if you want 99 out of 100 people to have the drop after 10 tries, that's a drop rate of 37%.

amir.dratgard

  • New to TMC
  • *
  • Posts: 13
    • View Profile
    • Development Blog
Re: RNG and Building
« Reply #8 on: February 09, 2018, 11:15 PM »
Probability often plays hell with our sense of intuition.

This is the intuitive (but wrong) understanding:
- 10% drop rate
- I get it 1 out of 10 times
- If I run the content 10 times, I should have the drop

The math is this:
failure_rate = (1 - drop_rate) ^ (number_of_tries)
success_rate = (1 - failure_rate)

For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

If you follow this through, you'll notice that after twenty-two (22) rounds, there are still 10 players trying to get that drop!

If you understand this example, it should be pretty easy to tune your drop rate to get what you want.
For example, if you want 99 out of 100 people to have the drop after 10 tries, that's a drop rate of 37%.

I get where you're going, but supply and demand plays a factor here.  As demand for the item goes down, your supply goes up.

Your supply is 10 units globally for a time frame, correct?  So it's not a 10% chance for 100, it's 10 out of 100 users.

10 supply for 40 users would be 25%.

So if you are starting at "100 users" wanting an item, that math changes...

Demand : Supply : Actual % Chance
100  :  10  :  10%
90  :  10  :  11.11%
80  :  10  :  12.50%
[...]
50  :  10  :  20%
[...]
20  :  10  :  50%

And so forth  -  so unless you keep increasing short-term demand for an item substantially, a 10 supply with 100 users demanding that item, in 11 time frames everyone has said item.  And if you add up the total attempted supply and demand, it's 100/550.  So in a different, long term method of calculating that math, you could say 10% drop averages 18% for 100 users over a short term due to multiple periods.

In fact it's almost too much math.  If we say 10 loads every day.  100 people want that item.  If they are one and-done, 10 loads per day, 10 days, everyone is happy.
« Last Edit: February 09, 2018, 11:25 PM by amir.dratgard »

Drizzt1216

  • TMC Member
  • ***
  • Posts: 243
    • View Profile
    • tbaMUD
Re: RNG and Building
« Reply #9 on: February 10, 2018, 1:23 PM »
Probability often plays hell with our sense of intuition.

This is the intuitive (but wrong) understanding:
- 10% drop rate
- I get it 1 out of 10 times
- If I run the content 10 times, I should have the drop

The math is this:
failure_rate = (1 - drop_rate) ^ (number_of_tries)
success_rate = (1 - failure_rate)

For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

If you follow this through, you'll notice that after twenty-two (22) rounds, there are still 10 players trying to get that drop!

If you understand this example, it should be pretty easy to tune your drop rate to get what you want.
For example, if you want 99 out of 100 people to have the drop after 10 tries, that's a drop rate of 37%.

I get where you're going, but supply and demand plays a factor here.  As demand for the item goes down, your supply goes up.

Your supply is 10 units globally for a time frame, correct?  So it's not a 10% chance for 100, it's 10 out of 100 users.

10 supply for 40 users would be 25%.

So if you are starting at "100 users" wanting an item, that math changes...

Demand : Supply : Actual % Chance
100  :  10  :  10%
90  :  10  :  11.11%
80  :  10  :  12.50%
[...]
50  :  10  :  20%
[...]
20  :  10  :  50%

And so forth  -  so unless you keep increasing short-term demand for an item substantially, a 10 supply with 100 users demanding that item, in 11 time frames everyone has said item.  And if you add up the total attempted supply and demand, it's 100/550.  So in a different, long term method of calculating that math, you could say 10% drop averages 18% for 100 users over a short term due to multiple periods.

In fact it's almost too much math.  If we say 10 loads every day.  100 people want that item.  If they are one and-done, 10 loads per day, 10 days, everyone is happy.

I have no clue where you're getting any of the assumptions you're writing about.

He never said he wanted 10 of them to drop every round.

"For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop"

What he is talking about is indeed a 10% chance to drop, which does not change per round.

Your 10/90, then 10/80, 10/70, etc. scenario has no relation at all to what he's talking about.

You also can't make it drop 10 drop every round in anything resembling an elegant manner.

You can make it be the first 10, or you can make it never drop, and reward 10 people at random once a round has ended, but you cannot make it dynamically predict how many people will run it that period and adjust the droprate based on that prediction.

amir.dratgard

  • New to TMC
  • *
  • Posts: 13
    • View Profile
    • Development Blog
Re: RNG and Building
« Reply #10 on: February 10, 2018, 3:50 PM »
I really disagree.  If you had one thousand players after one item that drops a certain frequency, at a per-player level the propensity to get that item is vastly lower than if 10 players are after the same drop.

Frankly I don't think that's hard to understand.


Apple produces 100,000 iPhone version 23's on day one.  You don't think a demand of 500,000 consumers makes no difference than 5 million consumers?  That's pretty easy to grasp...  The first means 1/5 will get the item.  The latter means 1/50.  Demand absolutely players a part.  20% vs 2%.

But the "rate" of 100k on day one has not changed at all.


And it was stated by someone earlier... if setting a 10% drop rate is too low due to demand, then set it higher.  Easy fix.  We seem to be complaining about the 1% who never get the item.  Why not force the code to never drop on the first 2-3 rolls for any given player?  We prop up the unlucky, so why not pull down the lucky?

I guess this is what an auction/shop system is for.
« Last Edit: February 10, 2018, 3:53 PM by amir.dratgard »

Drizzt1216

  • TMC Member
  • ***
  • Posts: 243
    • View Profile
    • tbaMUD
Re: RNG and Building
« Reply #11 on: February 10, 2018, 9:44 PM »
I have no idea what you're claiming you disagree with. There's not two sides, he explained how he'd do something, you misinterpreted what he said and tried saying his math was wrong.

No one but you ever suggested that 10 should drop every round and that the % chance that it drops should increase over time. (At least not on a  global level, people did discuss its droprate increasing to offset individual player luck).

Your apple analogy is bad.

When something is for sale, supply can be a static amount. When you are talking about drops and adjusting droprate to make that many drop no matter the demand though you're basically requiring your code be psychic. It can't predict how many people are going to run it during a given time period and retroactively change its droprate so that 10 will drop in that time period without it being incredibly obtuse (ie. once it's dropped the tenth one it'd have a 0% droprate till the next time period).

Your apple analogy also ignores actually relates to supply and demand, your suggestion for ingame mechanics do not. If 10 drop (supply) no matter how many people run it (demand) that's the equivalent to apple continuing to make 100,000 iPhone 4's every day forever even once no one is buying them any longer.

amir.dratgard

  • New to TMC
  • *
  • Posts: 13
    • View Profile
    • Development Blog
Re: RNG and Building
« Reply #12 on: February 12, 2018, 8:43 PM »
I have no idea what you're claiming you disagree with. There's not two sides, he explained how he'd do something, you misinterpreted what he said and tried saying his math was wrong.

No one but you ever suggested that 10 should drop every round and that the % chance that it drops should increase over time. (At least not on a  global level, people did discuss its droprate increasing to offset individual player luck).

Your apple analogy is bad.

When something is for sale, supply can be a static amount. When you are talking about drops and adjusting droprate to make that many drop no matter the demand though you're basically requiring your code be psychic. It can't predict how many people are going to run it during a given time period and retroactively change its droprate so that 10 will drop in that time period without it being incredibly obtuse (ie. once it's dropped the tenth one it'd have a 0% droprate till the next time period).

Your apple analogy also ignores actually relates to supply and demand, your suggestion for ingame mechanics do not. If 10 drop (supply) no matter how many people run it (demand) that's the equivalent to apple continuing to make 100,000 iPhone 4's every day forever even once no one is buying them any longer.

Quote:
For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

===============

I know what I read.  On round three, it clearly states 73 players remaining who will "NOT stop until they finally get the drop" --- Until they get the drop.  10 drops for 100.  10 drops for 73.  The math changes, period.  it's not 22 rounds, it's 11.

And yes really, the math provided does suggest Apple is producing 100k units per day regardless of demand --- that's my whole point.  Demand is not being factored.

Item X has a drop rate of 10% on a certain mob that loads once per day and 500 users are demanding the item.
Item Y has a drop rate of 10% on a certain mob that loads once per day and 10 users are demanding the item.

You cannot claim that Item X and Item Y have the same attainment rate overall.  They load the same globally, but statistically X is much harder to obtain than Y.

You can disagree all you want, but I didn't write the mathematical laws of supply and demand.  Increased supply, lower demand, = cheaper.   10 people wanting an item makes it "cheaper".  500 people wanting an item makes it "expensive".  Anyway, I'm done, people can decide for themselves if 1 million people wanting a one-drop-a-day item is actually the same as 5 people wanting a one-drop-a-day item.

Epilogy

  • TMC Member
  • ***
  • Posts: 178
    • View Profile
Re: RNG and Building
« Reply #13 on: February 12, 2018, 8:58 PM »
Probability often plays hell with our sense of intuition.

This is the intuitive (but wrong) understanding:
- 10% drop rate
- I get it 1 out of 10 times
- If I run the content 10 times, I should have the drop

The math is this:
failure_rate = (1 - drop_rate) ^ (number_of_tries)
success_rate = (1 - failure_rate)

For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

If you follow this through, you'll notice that after twenty-two (22) rounds, there are still 10 players trying to get that drop!

If you understand this example, it should be pretty easy to tune your drop rate to get what you want.
For example, if you want 99 out of 100 people to have the drop after 10 tries, that's a drop rate of 37%.

That was informative, thanks. Having the math right in front of you is helpful.



And for the argument that followed, are you taking into account the viability of the item to the player, and then also the possibility of it being a player-bound item?

Few games have items that are adaptive based on the player's setup, so not every rare item might be useful. The very best things, which you would want to make hard to obtain, can often be found in a non-transferable form.

But for the sake of argument, I only intend to worry about the individual player. Worrying about various economics of a large base would probably involve me going to find a math book, and then promptly throwing it in rage :D

Drizzt1216

  • TMC Member
  • ***
  • Posts: 243
    • View Profile
    • tbaMUD
Re: RNG and Building
« Reply #14 on: February 13, 2018, 9:48 PM »
I have no idea what you're claiming you disagree with. There's not two sides, he explained how he'd do something, you misinterpreted what he said and tried saying his math was wrong.

No one but you ever suggested that 10 should drop every round and that the % chance that it drops should increase over time. (At least not on a  global level, people did discuss its droprate increasing to offset individual player luck).

Your apple analogy is bad.

When something is for sale, supply can be a static amount. When you are talking about drops and adjusting droprate to make that many drop no matter the demand though you're basically requiring your code be psychic. It can't predict how many people are going to run it during a given time period and retroactively change its droprate so that 10 will drop in that time period without it being incredibly obtuse (ie. once it's dropped the tenth one it'd have a 0% droprate till the next time period).

Your apple analogy also ignores actually relates to supply and demand, your suggestion for ingame mechanics do not. If 10 drop (supply) no matter how many people run it (demand) that's the equivalent to apple continuing to make 100,000 iPhone 4's every day forever even once no one is buying them any longer.

Quote:
For those that hate the math, a more intuitive understanding is this:
- There is a 10% drop rate
- Take 100 players who will NOT stop until they finally get the drop
- First round: 10% of the 100 get the drop; 90 players left
- Second round: 10% of the 90 get the drop; 81 players left
- Third round: 10% of the 81 get the drop; 73 players left
- ... and so on.

===============

I know what I read.  On round three, it clearly states 73 players remaining who will "NOT stop until they finally get the drop" --- Until they get the drop.  10 drops for 100.  10 drops for 73.

No, you apparently don't know what you read.

Quote from: amir.dratgard
Your supply is 10 units globally for a time frame, correct?  So it's not a 10% chance for 100, it's 10 out of 100 users.

It's a completely wrong assumption.

The mob has a 10% drop chance. When 73 players each run it once during the 4th round 7 of them are going to get the item, not 10. A round consists of everyone who needs it trying once more, not 100 attempts.

Even your own suggested scenario is wrong. If 10 people got it every round it'd take 10 rounds for everyone to get it, not 11.

10 people don't get it every round though, 10 people get it the first round.

Code: [Select]
100
90
81
73
66
59
53
48
43
39
35
31
28
25
23
21
19
17
15
14
12
11
10

That's the first 22 rounds, as he suggested 10 people still need the item.
« Last Edit: February 13, 2018, 10:13 PM by Drizzt1216 »