Random Without Replacement
I want to first mention that Random With Replacement systems are a vile and disgusting thing. Its the future, we don't have to cram data into 16k of memory anymore. I'm putting out a call to arms for game designers the world around to start using Random Without Replacement systems, and as a token of my commitment, I offer the following easy to implement system. For all enemies that are capable of dodging an attack based on an Evasion statistic, the enemies will also have a hidden attribute, and a hidden array (as wide as the statistic's range). On the Enemy will have the attribute initialized to 0, and the array filled with numbers from 0 to the range, spread out based on a random shuffle. Each time the enemy makes a dodge "roll", he checks the array entry indexed by the hidden attribute, and then increases that hidden attribute (making sure to return it to zero when it hits the size of the array). Success, over a system of percentages, and 100 dodges, the enemy's evasion rate will match the statistic's prediction. If it seems too etched in stone, increase the array's size to 200, and have each number in there twice. As it stands now, we face having to watch an enemy dodge 4.2 billion times to see the predicted evasion rate materialize, and it is really starting to irk me.
william bubel
Please define "random with replacement" and "random without replacement".
I think what 2993 is getting at is the difference between rolling dice and drawing cards from a shuffled deck.
"Random WITH Replacement" would be like rolling dice; each time you roll them, the odds stay the same, so you're not guaranteed a hit after a hundred times if the odds are 1%.
"Random WithOUT Replacement" would be like drawing the next card from the top of a shuffled deck of a hundred cards. You're odds go up with each card until you hit. You're guranteed that 1 out of 100 times you WILL hit. It's just a matter of how soon.
"Random WITH Replacement" would be like rolling dice; each time you roll them, the odds stay the same, so you're not guaranteed a hit after a hundred times if the odds are 1%.
"Random WithOUT Replacement" would be like drawing the next card from the top of a shuffled deck of a hundred cards. You're odds go up with each card until you hit. You're guranteed that 1 out of 100 times you WILL hit. It's just a matter of how soon.
Quote:
Original post by SonicSilicon
I think what 2993 is getting at is the difference between rolling dice and drawing cards from a shuffled deck.
"Random WITH Replacement" would be like rolling dice; each time you roll them, the odds stay the same, so you're not guaranteed a hit after a hundred times if the odds are 1%.
"Random WithOUT Replacement" would be like drawing the next card from the top of a shuffled deck of a hundred cards. You're odds go up with each card until you hit. You're guranteed that 1 out of 100 times you WILL hit. It's just a matter of how soon.
That's pretty much what I think the original poster was getting at too. I'm sure I've seen this come up once or twice before in the forums (maybe on the Maths forum?)
I'm not sure it will make much of a difference, however, unless you are wanting to implement a card-based gameplay element. Won't the mean of both approaches, assuming a range of 0 to 100, still be 50?
Actually, I think I've read somewhere that from a psychological perspective the random dice rolling approach might be better, as there's always a chance you'll get that 100 and do a critical hit.
Actually I'd like to hear what's so wrong about random with replacement?
see, it depends on the problem you're modeling. Only without replacement you're guaranteed that the rate will converge quickly, while with replacement it could take a long while for the actual results to converge to the originally given probability.
see, it depends on the problem you're modeling. Only without replacement you're guaranteed that the rate will converge quickly, while with replacement it could take a long while for the actual results to converge to the originally given probability.
Working on a fully self-funded project
I understand now. But I don't see why "random without replacement" is so much better than "random with replacement". It's possible to get 4,200,000,000 dodges before the ration is accurate to within six decimal places, but unless you're trying to reverse-engineer the game's algorithms, who cares?
I doubt an opponent will have a hundred chances to dodge in a single fight, and if they do, why be so anal as to demand a perfectly representative sample of successes? If I have a 1% chance to hit somebody, and I luck out and hit them the first time, then I know I have 0% for the next 99 freaking shots. Screw that crap. It's metagaming.
I doubt an opponent will have a hundred chances to dodge in a single fight, and if they do, why be so anal as to demand a perfectly representative sample of successes? If I have a 1% chance to hit somebody, and I luck out and hit them the first time, then I know I have 0% for the next 99 freaking shots. Screw that crap. It's metagaming.
Doesn't this make the game retardedly predictable?
"I have 2 HP and a 99% chance to dodge. Oh he hit me for 1 damage. Now I don't have to flee because I know he won't hit me again for a while."
Plus random without replacement benefits the player as much as it benefits the monster. If you've got a 1% chance to dodge, you could still (in theory) dodge 100 times in a row.
"I have 2 HP and a 99% chance to dodge. Oh he hit me for 1 damage. Now I don't have to flee because I know he won't hit me again for a while."
Plus random without replacement benefits the player as much as it benefits the monster. If you've got a 1% chance to dodge, you could still (in theory) dodge 100 times in a row.
Wow I opened a sore wound.
What I'm actually complaining about is a subtle problem in the SRPG subgenre. This is a genre where you're supposed to think along the lines of:
Winning by pure luck in an SRPG is an insult.
A simple game like Mario Party, who cares.
Anyways, I more wanted to see if anyone had any others ideas for Random Without Replacement systems, but I may be in the wrong forum for any implementations of it.
What I'm actually complaining about is a subtle problem in the SRPG subgenre. This is a genre where you're supposed to think along the lines of:
Quote:Its a genre where they encourage you to remember and attempt to predict as much as possible. I'm not so much argueing against "randomness", but rather circumstances not behaving to statistics, meaning that these aren't areas you can apply strategy to.
"I have 2 HP and a 99% chance to dodge. Oh he hit me for 1 damage. Now I don't have to flee because I know he won't hit me again for a while."
Winning by pure luck in an SRPG is an insult.
A simple game like Mario Party, who cares.
Anyways, I more wanted to see if anyone had any others ideas for Random Without Replacement systems, but I may be in the wrong forum for any implementations of it.
william bubel
Rather than using a bernoulli trial, you're suggesting some... other... statistical method (I understand your system, just not sure what to call it - Random Without Replacement (RW/OR works for now)).
The problem with a statistic like 1% is that the further away from 50%, its more likely that you'll have to spend a longer amount of time to watch the statistic converge.
Take a coin flip, its 50/50, so you only need to perform a few trials to see something reasonably close to 0.5. On the order of a couple hundred to get within 10% of the statistic (average < 0.1% deviation from the statistical mean), but a 1% chance needs 50 times more tosses to get the same accuracy.
Thats part of statistics, as far as Im concerned. Random variables are... random. Thats part of their charm. You'd be a complete idiot to score a royal flush and then expect to get ANOTHER one to happen on your next hand, but it could conceivably happen, its just a one-in-a-freakin-lot chance, and taking that away from the game would hurt it, I think.
The problem with a statistic like 1% is that the further away from 50%, its more likely that you'll have to spend a longer amount of time to watch the statistic converge.
Take a coin flip, its 50/50, so you only need to perform a few trials to see something reasonably close to 0.5. On the order of a couple hundred to get within 10% of the statistic (average < 0.1% deviation from the statistical mean), but a 1% chance needs 50 times more tosses to get the same accuracy.
Thats part of statistics, as far as Im concerned. Random variables are... random. Thats part of their charm. You'd be a complete idiot to score a royal flush and then expect to get ANOTHER one to happen on your next hand, but it could conceivably happen, its just a one-in-a-freakin-lot chance, and taking that away from the game would hurt it, I think.
I see your point now, but I'm not at all on your side in this one. I would say that within the limits of the "SRPG" (I'm assuming that's "Strategic Role-Playing Game, based on context) the difference would be negligible anyway.
Random Without Replacement doesn't guarantee perfectly accurate results except on multiples of the range. So unless each fight consists of precisely 100 attacks and 100 dodges every time, you gain next to nothing by preferring the more sophisticated system over the simpler one.
What's more, it actually renders the ratio innaccurate, because as each possible outcome is subtracted from the set, the probability will shift. I'd rather see the full and precise value incorporated into every calculation rather than deal with the "probability bank" that the random without replacement system seems to yield.
On a side note, you seem to revere this sort of number crunching and "easy math" system over the "simple games" like Mario Party, which you disparage. My definition of strategy includes considerable uncertainty, and any strategist, be they military, corporate or horticultural strategists, will probably agree with me that broad swings of luck are par for the course. What farmer can say, "Well, we have a 10% chance of rain this month, and it rained on the first, so I can count on clear skies until the tenth, for sure."
I'm not saying that your system doesn't have a place, but the tone and content of your original post tells us more about you and your specific project, I think, than about game design.
What exactly are you working on that has you so worked up about suh a seemingly insignificant facet of a mathematical system?
Random Without Replacement doesn't guarantee perfectly accurate results except on multiples of the range. So unless each fight consists of precisely 100 attacks and 100 dodges every time, you gain next to nothing by preferring the more sophisticated system over the simpler one.
What's more, it actually renders the ratio innaccurate, because as each possible outcome is subtracted from the set, the probability will shift. I'd rather see the full and precise value incorporated into every calculation rather than deal with the "probability bank" that the random without replacement system seems to yield.
On a side note, you seem to revere this sort of number crunching and "easy math" system over the "simple games" like Mario Party, which you disparage. My definition of strategy includes considerable uncertainty, and any strategist, be they military, corporate or horticultural strategists, will probably agree with me that broad swings of luck are par for the course. What farmer can say, "Well, we have a 10% chance of rain this month, and it rained on the first, so I can count on clear skies until the tenth, for sure."
I'm not saying that your system doesn't have a place, but the tone and content of your original post tells us more about you and your specific project, I think, than about game design.
What exactly are you working on that has you so worked up about suh a seemingly insignificant facet of a mathematical system?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement