[Request] Less RNG swing system
Moderator: Forum Moderators
[Request] Less RNG swing system
Please forgive the sad name for the system I am about to propose. Getting straight away to things, the effect supposed to be acheived is to decrease the streaks of hits and misses. This is achieved by a applying a formula to obtain cth before each swing/hit of a unit. The temporary cth variable is locally created and destroyed within one attack cycle and there is no carry over or karma of any sort.
The formula to be applied is :
cth = ('Total expected damage''Total damage done')/'Total remaining damage
For example take elvish fighter (54) to hit at 50%,
For the first hit cth = (100)/20 = 50%
If first hits/misses, cth = (10 (+,)5)/(15,20) = 33.33,66.66%
Similarly the following.
The stats window should not theoretically be modified since this formula does not change the probability of outcomes, it only decreases the standard deviation if thats the right word.
I would personally like a cap of cth after each calculation at 10% and 80% which are the current wesnoth best/worst hit rates I can think of (HI in water and 80% evasion in one of the Httt scenario). This is so that 4/4 hits/misses can still happen but the probabilities are much lower and serves to improve the current system without changing the original game philosophy completely.
But setting the cap at 0%/100% will make the system perform better at eliminating the rng swings. Honestly I feel the difference between the 2 will only be revealed at testing stage.
Advantages:
 It is relatively KISS , just 1 formula to be applied.
 Not deterministic.
 The formula does not produce distorted outcomes for varying number of strikes or terrain.
Disadvantages:
I cannot think of any major disadvantages outright, hopefully some will come out of discussions for correction.
I have already discussed this with yogibear and a few others with positive responses
Edit: Let the shreading begin.
Edit 2 : cth = chance to hit
The formula to be applied is :
cth = ('Total expected damage''Total damage done')/'Total remaining damage
For example take elvish fighter (54) to hit at 50%,
For the first hit cth = (100)/20 = 50%
If first hits/misses, cth = (10 (+,)5)/(15,20) = 33.33,66.66%
Similarly the following.
The stats window should not theoretically be modified since this formula does not change the probability of outcomes, it only decreases the standard deviation if thats the right word.
I would personally like a cap of cth after each calculation at 10% and 80% which are the current wesnoth best/worst hit rates I can think of (HI in water and 80% evasion in one of the Httt scenario). This is so that 4/4 hits/misses can still happen but the probabilities are much lower and serves to improve the current system without changing the original game philosophy completely.
But setting the cap at 0%/100% will make the system perform better at eliminating the rng swings. Honestly I feel the difference between the 2 will only be revealed at testing stage.
Advantages:
 It is relatively KISS , just 1 formula to be applied.
 Not deterministic.
 The formula does not produce distorted outcomes for varying number of strikes or terrain.
Disadvantages:
I cannot think of any major disadvantages outright, hopefully some will come out of discussions for correction.
I have already discussed this with yogibear and a few others with positive responses
Edit: Let the shreading begin.
Edit 2 : cth = chance to hit
Last edited by psychic on May 6th, 2010, 1:43 pm, edited 1 time in total.
Re: [Request] Less RNG swing system
This sounds a whole lot like the direction that the Karma system currently being discussed on this board is taking. Might it be a better idea to merge this idea into that one? I'll just make a few comments here...
I assume you mean this is going to be somehow added or multiplied into the current chance to hit based on tile defense.cth = ('Total expected damage''Total damage done')/'Total remaining damage
Why? So you can't charge up your karma for a charge type attack? I don't see why that would be a problem. Even if you use that tactic, you'll only get to use it once and then the immense amount of damage that charge attack all but guarantees you'll miss the next few strikes.The temporary cth variable is locally created and destroyed within one attack cycle and there is no carry over or karma of any sort.

 Retired Developer
 Posts: 1086
 Joined: September 16th, 2005, 5:44 am
 Location: Hamburg, Germany
Re: [Request] Less RNG swing system
No, that is not necessary, the tile defense is incorporated into "Total expected damage"Daedal wrote:I assume you mean this is going to be somehow added or multiplied into the current chance to hit based on tile defense.cth = ('Total expected damage''Total damage done')/'Total remaining damage
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
Re: [Request] Less RNG swing system
D'oh! Good call.Yogibear wrote:No, that is not necessary, the tile defense is incorporated into "Total expected damage"Daedal wrote: I assume you mean this is going to be somehow added or multiplied into the current chance to hit based on tile defense.
 krotop
 2009 Map Contest Winner
 Posts: 433
 Joined: June 8th, 2006, 3:05 pm
 Location: Bordeaux, France
Re: [Request] Less RNG swing system
I had a very positive first impression on the idea, however I suspected some problems, and was also curious as to how much the game would be different. To be honest what I saw kind of toned down my enthusiasm, but I'll let you judge on that.
So I took some time into calculations to check what would the outcomes of such system be, in order to quantify how the game would be affected and how much. The figures I would like to show are all made in the following situation:
the attacking unit does a 54 attack, and the target has more than 20 hps. However I will vary the base chance to hit and the maximum cth allowed by the formula, as well as the minimum cth.
Table 1: estimations done with pauxlo's example, cth = 50% is fixed.
From these figures we can see that psychic's formula drastically reduces how possible it is to get a full streak of hits or misses, and that the less we limit the formula with a capped max cth or min cth, the more that reduction is efficient. As far as my taste goes, it is a bit too much for me, but admitedly this is a personal opinion and if someone is looking for reduced RNG influence, then swing system may suit his taste, because it may be the most efficient designed system so far, in that regard. We can see that letting the formula reach the 0% and the 100% cth turns the attack into a guaranteed 2/4 (1/6 chance for each case of 2/4 from figures I have and did not display here).
Also, from table 1D, it seems that 'disbalancing' the max & min limit of the formula, that is to say that (max_cth + min_cth != 1) alters the expected damages. That could have been expected, and it's not dramatically bad if both players get a similar boost.
Table 2: fixing the maximum cth reachable by the formula to 80%, and the minimum cth to 20%, and toying with the base cth
What I wanted to show here is that the expected damages are altered by the formula. We can also see that, generally speaking but there could be exceptions I did not find, the expected damage after the formula is higher than standard when the cth is lower than 50%, and it is lower than standard when the cth is higher than 50%. Also, it seems that the more the cth deviates from 50%, the more the expected values deviates from 'normal' expected damages. I don't know for sure how much it may alter the balance, but it seems to me that low defense factions such as drakes get a small boost while high def factions like rebels get a small nerf when we apply the formula.
Table 3: fixing the cth to 40% and toying with the max & min chance to hit limit.
We could see already that the more you limit the formula with a max & min cth, the less you reduce RNG influence (that reduction is still important, though). Whether it's good or bad, it anyway comes with the drawback of deviating more from the standard expected values, increasing the potential balance problem mentioned with Table 2.
Ok, I think to have spammed enough numbers to spare you more figures, but if you're curious about some estimations you'd expect to be relevant, I'll try to provide the figures if I have the time.
So I took some time into calculations to check what would the outcomes of such system be, in order to quantify how the game would be affected and how much. The figures I would like to show are all made in the following situation:
the attacking unit does a 54 attack, and the target has more than 20 hps. However I will vary the base chance to hit and the maximum cth allowed by the formula, as well as the minimum cth.
Table 1: estimations done with pauxlo's example, cth = 50% is fixed.
From these figures we can see that psychic's formula drastically reduces how possible it is to get a full streak of hits or misses, and that the less we limit the formula with a capped max cth or min cth, the more that reduction is efficient. As far as my taste goes, it is a bit too much for me, but admitedly this is a personal opinion and if someone is looking for reduced RNG influence, then swing system may suit his taste, because it may be the most efficient designed system so far, in that regard. We can see that letting the formula reach the 0% and the 100% cth turns the attack into a guaranteed 2/4 (1/6 chance for each case of 2/4 from figures I have and did not display here).
Also, from table 1D, it seems that 'disbalancing' the max & min limit of the formula, that is to say that (max_cth + min_cth != 1) alters the expected damages. That could have been expected, and it's not dramatically bad if both players get a similar boost.
Table 2: fixing the maximum cth reachable by the formula to 80%, and the minimum cth to 20%, and toying with the base cth
What I wanted to show here is that the expected damages are altered by the formula. We can also see that, generally speaking but there could be exceptions I did not find, the expected damage after the formula is higher than standard when the cth is lower than 50%, and it is lower than standard when the cth is higher than 50%. Also, it seems that the more the cth deviates from 50%, the more the expected values deviates from 'normal' expected damages. I don't know for sure how much it may alter the balance, but it seems to me that low defense factions such as drakes get a small boost while high def factions like rebels get a small nerf when we apply the formula.
Table 3: fixing the cth to 40% and toying with the max & min chance to hit limit.
We could see already that the more you limit the formula with a max & min cth, the less you reduce RNG influence (that reduction is still important, though). Whether it's good or bad, it anyway comes with the drawback of deviating more from the standard expected values, increasing the potential balance problem mentioned with Table 2.
Ok, I think to have spammed enough numbers to spare you more figures, but if you're curious about some estimations you'd expect to be relevant, I'll try to provide the figures if I have the time.
Don't trust me, I'm just average player.
***
Game feedback for the Nightmares of Meloen
Art feedback by mystic x the unknown
***
Game feedback for the Nightmares of Meloen
Art feedback by mystic x the unknown
Re: [Request] Less RNG swing system
This is definitely nowhere near as bad as a fullon karma system, but it doesn't offer very many advantages. I mean, what you are basically doing is decreasing the standard deviation by making the probability really hard to calculate. I'm guessing that you're not trying to make the hit probabilities hard to calculate, but simply decrease the standard deviation.
Randomness is a good thing in strategy games because probability can be manipulated. But if probability is nondeterministic, as it is now, that's not a good thing, because it makes the strategy convoluted and unKISS, no matter how KISS the system may seem. The essence of KISS is: It must be easy to calculate the probability of doing above a certain amount of damage. With a karma system, even a localized one like this, it's extremely difficult to calculate.
As krotop's analysis shows, karma systems simply do not work, and the swinging effect (which I'll notice I predicted earlier) is especially pronounced with strong karma enforcement (which localized karma necessitates).
There are ways to decrease the standard deviation without doing this. In fact, it's possible to decrease the standard deviation while still staying within a binomial distribution. For instance: By guaranteeing that, say, for every three strikes, the second one always hits, for instance (and you can decrease the hit probabilities of the other two so you end up with roughly the same average damage).
Personally, I would still prefer minimum damage enforcement, but I would be amenable to some form of the above system.
Randomness is a good thing in strategy games because probability can be manipulated. But if probability is nondeterministic, as it is now, that's not a good thing, because it makes the strategy convoluted and unKISS, no matter how KISS the system may seem. The essence of KISS is: It must be easy to calculate the probability of doing above a certain amount of damage. With a karma system, even a localized one like this, it's extremely difficult to calculate.
As krotop's analysis shows, karma systems simply do not work, and the swinging effect (which I'll notice I predicted earlier) is especially pronounced with strong karma enforcement (which localized karma necessitates).
There are ways to decrease the standard deviation without doing this. In fact, it's possible to decrease the standard deviation while still staying within a binomial distribution. For instance: By guaranteeing that, say, for every three strikes, the second one always hits, for instance (and you can decrease the hit probabilities of the other two so you end up with roughly the same average damage).
Personally, I would still prefer minimum damage enforcement, but I would be amenable to some form of the above system.
Last edited by Zarel on May 6th, 2010, 5:48 pm, edited 2 times in total.
Proud creator of the :whistle: smiley  I prefer the CC0 license.
Re: [Request] Less RNG swing system
Thanks Krotop for the analysis, I did not know how to get the expected outcomes myself. I am not able to digest the whole data you have bombarded us with , I would be more than happy if somone manages to show some game balance issues with your analysis which can be used to improve the formula.
@Zarel, yes decreasing standard deviation is my main aim. I did not fully understand your binomial distribution thing, but my main aim was to make it as KISS as possible. The only problem I personally have with the minimum damage method is that is has some deterministic elements which is definitely different from the original game philosophy.
I wanted to arrive at a system where the average wesnoth player should not see any changes except that 20%+ stat difference games dont show up as often as it does now.
Edit: I am pretty sure most players who rant about RNG do so because of the frequency of bad RNG(both positive and negative) games.
@Zarel, yes decreasing standard deviation is my main aim. I did not fully understand your binomial distribution thing, but my main aim was to make it as KISS as possible. The only problem I personally have with the minimum damage method is that is has some deterministic elements which is definitely different from the original game philosophy.
I wanted to arrive at a system where the average wesnoth player should not see any changes except that 20%+ stat difference games dont show up as often as it does now.
Edit: I am pretty sure most players who rant about RNG do so because of the frequency of bad RNG(both positive and negative) games.
Re: [Request] Less RNG swing system
All (nice) ideas about Luck System doesn't show the "time" or "turn" aspect of the game.
You suggest to reduce RNG swing for 1 attack from 1 unit.
IMHO, all we need is to reduce RNG swing between 2 turns from global units' sides...
It certainly more complicated but it will reduce successive unfair turns and keep some randomness.
You suggest to reduce RNG swing for 1 attack from 1 unit.
IMHO, all we need is to reduce RNG swing between 2 turns from global units' sides...
It certainly more complicated but it will reduce successive unfair turns and keep some randomness.
"Of course His Majesty is a pacifist. When I told him that to initiate war was a mistake, he agreed.Thus, gradually, he began to lead toward war."Emperor ShÃ²wa (Enlightened Peace)'s chief cabinet secretary
Re: [Request] Less RNG swing system
A binomial distribution is what you get when you have a hit/miss system, and each attack as the same probability of hitting. It allows for simple intuitive probability reckoning: The probability of hitting/missing N times in a row is P^N, where P is the hit/miss probability, respectively.psychic wrote:@Zarel, yes decreasing standard deviation is my main aim. I did not fully understand your binomial distribution thing, but my main aim was to make it as KISS as possible. The only problem I personally have with the minimum damage method is that is has some deterministic elements which is definitely different from the original game philosophy.
It seems that the fundamental flaw of the karma system is that it's a schizophrenic balancing of the conflicting "randomness with good" idea with the "but randomness is bad" idea. Instead of just using "a little randomness", you use "a lot of randomness, but take away most of it using more randomness", which causes KISS problems like this one has.
I'm fairly sure that removing randomness with more randomness conflicts with the game philosophy far more than minimum damage enforcement.
Proud creator of the :whistle: smiley  I prefer the CC0 license.
Re: [Request] Less RNG swing system
I don't know if I understand your formula right, psychic. But it seems to me that yours doesn't allow unit to hit above expected value.
cth = ('Total expected damage''Total damage done')/'Total remaining damage
when you have done expected damage, it will be 0/x which hit chance is always 0% : all your remaining strikes will miss.
Your 54 elf fighter at 50% CTH example, first strike is 50%, if hits, 2nd is 33%, if hits again, 3rd and 4th strikes will have 0% CTH.
Also, I would like mention that the idea has been proposed by me before, with a different formula, I designed so it reduces standard deviation most when defence is 50% (aka, luck is most important), and least when terran is extreme (80% and 90% def, or 20% or 10% def).
Please see my Dynamic Hit Rate System: http://forums.wesnoth.org/viewtopic.php?f=12&t=23945
cth = ('Total expected damage''Total damage done')/'Total remaining damage
when you have done expected damage, it will be 0/x which hit chance is always 0% : all your remaining strikes will miss.
Your 54 elf fighter at 50% CTH example, first strike is 50%, if hits, 2nd is 33%, if hits again, 3rd and 4th strikes will have 0% CTH.
Also, I would like mention that the idea has been proposed by me before, with a different formula, I designed so it reduces standard deviation most when defence is 50% (aka, luck is most important), and least when terran is extreme (80% and 90% def, or 20% or 10% def).
Please see my Dynamic Hit Rate System: http://forums.wesnoth.org/viewtopic.php?f=12&t=23945
Re: [Request] Less RNG swing system
I fail to understand how time or turn has anything to do with hit probabilities. Making global RNG swing corrections across more than 1 turn will allow players to make outrageous moves depending on a bad RNG turn(again positive or negative) or in other words game the system.hiro hito wrote: All (nice) ideas about Luck System doesn't show the "time" or "turn" aspect of the game.
You suggest to reduce RNG swing for 1 attack from 1 unit.
IMHO, all we need is to reduce RNG swing between 2 turns from global units' sides...
It certainly more complicated but it will reduce successive unfair turns and keep some randomness.
Lol now I understand why we have conflicting arguments. I am talking about programming simplicity and you are talking about the simplicity of the idea. I should have been more precise.Zarel wrote:It seems that the fundamental flaw of the karma system is that it's a schizophrenic balancing of the conflicting "randomness with good" idea with the "but randomness is bad" idea. Instead of just using "a little randomness", you use "a lot of randomness, but take away most of it using more randomness", which causes KISS problems like this one has.
I'm fairly sure that removing randomness with more randomness conflicts with the game philosophy far more than minimum damage enforcement.
And by game philosophy I mean nondeterministic and extreme luck outcomes included within the scheme of things. I would like to state this from my previous post "most players who rant about RNG do so because of the frequency of bad RNG(both positive and negative) games"
So what if the 3rd and 4th strikes miss??5dPZ wrote:I don't know if I understand your formula right, psychic. But it seems to me that yours doesn't allow unit to hit above expected value.
cth = ('Total expected damage''Total damage done')/'Total remaining damage
when you have done expected damage, it will be 0/x which hit chance is always 0% : all your remaining strikes will miss.
Your 54 elf fighter at 50% CTH example, first strike is 50%, if hits, 2nd is 33%, if hits again, 3rd and 4th strikes will have 0% CTH.
Also, I would like mention that the idea has been proposed by me before, with a different formula, I designed so it reduces standard deviation most when defence is 50% (aka, luck is most important), and least when terran is extreme (80% and 90% def, or 20% or 10% def).
Please see my Dynamic Hit Rate System: http://forums.wesnoth.org/viewtopic.php?f=12&t=23945
As for your second part of the post, the similarity between what you proposed and what I am proposing ends at the fact that we both use systems that modify cth for every strike. It is really cheap of you to advertise your idea here and claim that I have copied your idea without fully realising this fact.
 krotop
 2009 Map Contest Winner
 Posts: 433
 Joined: June 8th, 2006, 3:05 pm
 Location: Bordeaux, France
Re: [Request] Less RNG swing system
It does allow that, definitely. The normal expected value for a 54 attack with 40% cth is equal to 8. However, the formula doesn't make impossible to have 2/4 hits. And 2 hits with 5 damages each is greater than 8.5dPZ wrote:I don't know if I understand your formula right, psychic. But it seems to me that yours doesn't allow unit to hit above expected value..
That is not true if you cap the minimum chance to hit to, for instance, 10%. However if you set the minimum cth to 0%, then once the unit did greater or equal to the EV, it is true that all remaining strikes will miss.5dPZ wrote: when you have done expected damage, it will be 0/x which hit chance is always 0% : all your remaining strikes will miss.
Don't trust me, I'm just average player.
***
Game feedback for the Nightmares of Meloen
Art feedback by mystic x the unknown
***
Game feedback for the Nightmares of Meloen
Art feedback by mystic x the unknown
Re: [Request] Less RNG swing system
I am not claiming you copied my idea. I am saying that similar idea can be found using search function.psychic wrote:So what if the 3rd and 4th strikes miss??5dPZ wrote:I don't know if I understand your formula right, psychic. But it seems to me that yours doesn't allow unit to hit above expected value.
cth = ('Total expected damage''Total damage done')/'Total remaining damage
when you have done expected damage, it will be 0/x which hit chance is always 0% : all your remaining strikes will miss.
Your 54 elf fighter at 50% CTH example, first strike is 50%, if hits, 2nd is 33%, if hits again, 3rd and 4th strikes will have 0% CTH.
Also, I would like mention that the idea has been proposed by me before, with a different formula, I designed so it reduces standard deviation most when defence is 50% (aka, luck is most important), and least when terran is extreme (80% and 90% def, or 20% or 10% def).
Please see my Dynamic Hit Rate System: http://forums.wesnoth.org/viewtopic.php?f=12&t=23945
As for your second part of the post, the similarity between what you proposed and what I am proposing ends at the fact that we both use systems that modify cth for every strike. It is really cheap of you to advertise your idea here and claim that I have copied your idea without fully realising this fact.
Regarding to your formula:
Your formula with 0% minimum hit rate will translate into "units can not do more than their expected damage", aka, no good luck (grunt who hits first hit at 50% will miss the second for sure) while reducing some bad luck.
Also, I think a minimum hit rate like 20% does not work as nicely as a formula that solves the problem without a preset value (since it awards less for people strategizing their position to get higher defence terran, 70% and 50% def will boil down to the same 20% regardless).
Last edited by 5dPZ on May 6th, 2010, 6:57 pm, edited 3 times in total.
Re: [Request] Less RNG swing system
If a player starts to make outrageous moves due to a previous turn's bad RNG results it'll quickly balance out the expected/actual damage ratio and the issue will resolve itself. I'd much rather see the effect accumulate over the course of a scenario or at least several turns rather than end after the attack because otherwise this system will only help units that have many hits per turn.psychic wrote:I fail to understand how time or turn has anything to do with hit probabilities. Making global RNG swing corrections across more than 1 turn will allow players to make outrageous moves depending on a bad RNG turn(again positive or negative) or in other words game the system.
Re: [Request] Less RNG swing system
Please back up statements with numbers.Daedal wrote:this system will only help units that have many hits per turn.