Reducing the luck in multiplayer.
Moderators: Forum Moderators, Developers
45 posts
• Page 2 of 3 • 1, 2, 3
MRhe wrote:Again, I think this comes down to a simple personal preference: either 1) those who realize and appreciate the vagaries of random chance within the combat system or 2) those who feel the luck factor is too prevalent and want a less chancedependent system.
The groups are not exclusive. There are those who belong to both and those who belong to neither.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an email address listed on the website in my profile.

Elvish_Pillager  Posts: 8127
 Joined: May 28th, 2004, 10:21 am
 Location: Everywhere you think, nowhere you can possibly imagine.
It is so cool that inflation doesn't apply to the currency of games.
MORE MONEY, WOOHOO.
MORE MONEY, WOOHOO.
Cuyo Quiz,where madness meets me
Turn on, tune in, fall out.
"I know that, but every single person nags about how negative turin is; it should be in the FPI thread "Turin should give positive comments" =)"Neorice,23 Sep 2004
Turn on, tune in, fall out.
"I know that, but every single person nags about how negative turin is; it should be in the FPI thread "Turin should give positive comments" =)"Neorice,23 Sep 2004

Cuyo Quiz  Posts: 1777
 Joined: May 21st, 2005, 12:02 am
 Location: South America
Re: Reducing the luck in multiplayer.
Elvish Pillager wrote:Everyone wants to do it, but noone knows how to do it without messing up tons of other stuff.
I have an idea. What if we increase default gold? Lots of people just go with the default, so increasing it would increase the gold used in lots of MP games. And if we do, the luck of killing a single unit will be less, and thus the luckcaused frustration in general. I suggest 150 gold. (I have lots of fun playing at 150 anyway.)
1. Lots playing at 10 gold
2. May be make algoritm of Random Generator of luck more linear?
In one game i have 2 mages which together 5 shots missed from 6. Awful!!!
In other game 4 mermaids missed 11/12 !!!
 jugadorGL
 Posts: 4
 Joined: July 16th, 2005, 5:59 pm
If the randomnumber function returned values where the average result was much easier to get than very results or high results, that would reduce luck to an extent.
For example, instead of rolling 020, roll (010)+(010)  Then, for instance, there are more ways to get 10 than 0, so 10 will be a more common result.
It'd also be possible to do it with floatingpoint variables, of course, and probably easier. So (randFloat()+randFloat()+randFloat())/3.0f, or something similar. If you increase the number of dice, you also increase the steepness of the bell curve, with floatingpoint anyhow (It only works to a point with integer random numbers, of course). And if whatever Wesnoth uses for randInt() calls whatever Wesnoth uses for randFloat(), then you could just implement this inside randFloat() itself, instantly affecting all the code which uses either randInt() or randFloat().
* = I've said randFloat() and randInt() because I don't know what the equivalent is in Wesnoth or what it uses, and would rather post this now instead of spending 30 minutes scouring the Wesnoth code to find the randomnumber stuff.
For example, instead of rolling 020, roll (010)+(010)  Then, for instance, there are more ways to get 10 than 0, so 10 will be a more common result.
It'd also be possible to do it with floatingpoint variables, of course, and probably easier. So (randFloat()+randFloat()+randFloat())/3.0f, or something similar. If you increase the number of dice, you also increase the steepness of the bell curve, with floatingpoint anyhow (It only works to a point with integer random numbers, of course). And if whatever Wesnoth uses for randInt() calls whatever Wesnoth uses for randFloat(), then you could just implement this inside randFloat() itself, instantly affecting all the code which uses either randInt() or randFloat().
* = I've said randFloat() and randInt() because I don't know what the equivalent is in Wesnoth or what it uses, and would rather post this now instead of spending 30 minutes scouring the Wesnoth code to find the randomnumber stuff.
 SL
 Posts: 70
 Joined: May 8th, 2005, 1:15 am
As explained in previous threads, the random damage in the game is based on the number of hits in a round, which in turn forms a binomial distribution. My personal theory is that people don't have a good intuitive feel for how this distribution behaves, especially since the average number of hits or misses are both usually small, around 23. Since the number of possible values is small, this leads to large swings in actual observed damage, very different to what one would see with a normal distribution, the smooth behaviour of which most people seem quite familiar with.
Technically speaking, the binomial distribution of damage values that we see is usually skew (asymmetrical around the mean) and platykurtic (with negative kurtosis, ie. with the damage values tending to swing around quite a lot). The fact that the distribution isn't always the same but depends on the number of swings and the probability of hitting, is in itself confusing.
Further, people don't usually have a good intuitive feel for skew distributions, and are even more unfamiliar with distributions that are platykurtic. The binomial distribution of hits will be skew whenever the probability to hit is not 0.5 (when it is 0.5 then the distribution will be symmetrical about the mean). It will also have zero kurtosis, like the normal distribution, only when the probability to hit is 78.87% or 21.13%; at 80% and 20% it will have slightly positive kurtosis of 1/4n, but at the commonly used values used in the game the kurtosis will be negative, going as low as 2/n when the chance to hit is 50% (where n is the number of swings).
As previously discussed, one way to "fix" this is to increase the total number of swings, while reducing the damage per successful hit, since the binomial distribution will tend to the normal distribution as the number of events increases. We then have units like the Cuttle Fish, lots of little hits, much less unpredictable total damage. And guess what, people can actually make their own campaigns to implement custom units like this  Custom Elvish Fighter, does 120 damage: same average damage, same standard deviation, but very different observed behaviour.
But I think one of the unique features of Wesnoth would be lost if we did that. Making every fight into a clash of normally distributed damage values would pretty much remove an important feature of the strategy in the game. The role of the probability to hit is huge, since it determines the shape of the damage distribution, not just its mean. Making all damage distributions have the same shape would pretty much mean we might as well go to the deterministic damage model, where every fight results in the average damage (so a unit doing 54 damage and 50% chance to hit will always do 10 points of damage). A large part of the strategy in the game, and an important reason that this game has longevity, is this large influence of terrain on how battles go, not just the average damage. Let's not lose that.
Getting back to EP's original point, I still think making the default gold 150 instead of 100 would reduce the initial luck factor without detracting from the rest of the game. It has been pointed out that in certain matchups the choice of recruitment is critical, which means that in games where the factions of the other players is not known up front, a bad choice of initial recruiting can lose the game straight away. I think this is a much more serious issue than how damage is calculated  an unlucky assumption of what to recruit initially can lead to an unretrievably bad position, before the units have even started engaging. Clearly the popularity of the nofog clan is testament to why this is a bad thing.
Technically speaking, the binomial distribution of damage values that we see is usually skew (asymmetrical around the mean) and platykurtic (with negative kurtosis, ie. with the damage values tending to swing around quite a lot). The fact that the distribution isn't always the same but depends on the number of swings and the probability of hitting, is in itself confusing.
Further, people don't usually have a good intuitive feel for skew distributions, and are even more unfamiliar with distributions that are platykurtic. The binomial distribution of hits will be skew whenever the probability to hit is not 0.5 (when it is 0.5 then the distribution will be symmetrical about the mean). It will also have zero kurtosis, like the normal distribution, only when the probability to hit is 78.87% or 21.13%; at 80% and 20% it will have slightly positive kurtosis of 1/4n, but at the commonly used values used in the game the kurtosis will be negative, going as low as 2/n when the chance to hit is 50% (where n is the number of swings).
As previously discussed, one way to "fix" this is to increase the total number of swings, while reducing the damage per successful hit, since the binomial distribution will tend to the normal distribution as the number of events increases. We then have units like the Cuttle Fish, lots of little hits, much less unpredictable total damage. And guess what, people can actually make their own campaigns to implement custom units like this  Custom Elvish Fighter, does 120 damage: same average damage, same standard deviation, but very different observed behaviour.
But I think one of the unique features of Wesnoth would be lost if we did that. Making every fight into a clash of normally distributed damage values would pretty much remove an important feature of the strategy in the game. The role of the probability to hit is huge, since it determines the shape of the damage distribution, not just its mean. Making all damage distributions have the same shape would pretty much mean we might as well go to the deterministic damage model, where every fight results in the average damage (so a unit doing 54 damage and 50% chance to hit will always do 10 points of damage). A large part of the strategy in the game, and an important reason that this game has longevity, is this large influence of terrain on how battles go, not just the average damage. Let's not lose that.
Getting back to EP's original point, I still think making the default gold 150 instead of 100 would reduce the initial luck factor without detracting from the rest of the game. It has been pointed out that in certain matchups the choice of recruitment is critical, which means that in games where the factions of the other players is not known up front, a bad choice of initial recruiting can lose the game straight away. I think this is a much more serious issue than how damage is calculated  an unlucky assumption of what to recruit initially can lead to an unretrievably bad position, before the units have even started engaging. Clearly the popularity of the nofog clan is testament to why this is a bad thing.
This quote is not attributable to Antoine de SaintExupéry.
 ott
 Developer
 Posts: 838
 Joined: September 28th, 2004, 10:20 am
hi all.
SL gave me a good idea...
here it is : double the HP of all units, also double de number of atacks that every unit has.
how does it sound?
more hits less luck ?
or same [censored] ?
SL gave me a good idea...
here it is : double the HP of all units, also double de number of atacks that every unit has.
how does it sound?
more hits less luck ?
or same [censored] ?
**
 magohechizo
 Posts: 16
 Joined: July 28th, 2005, 5:52 pm
 Location: mexic0
You're not the first person with that idea.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an email address listed on the website in my profile.

Elvish_Pillager  Posts: 8127
 Joined: May 28th, 2004, 10:21 am
 Location: Everywhere you think, nowhere you can possibly imagine.
What if a game will
1) roll a hit/miss
2a) roll a chance to convert a hit to a miss if attacking player dealt more damage than he was supposed to deal
or
2b) roll a chance to convert a miss to a hit if attacking player dealt less damage than he was supposed to deal
3a) roll a chance to convert a hit to a miss if defending player recieved more damage than he was supposed to recieve
or
3b) roll a chance to convert a miss to a hit if defending player recieved less damage than he was supposed to recieve
hit>miss and miss>hit results negate each other
1) roll a hit/miss
2a) roll a chance to convert a hit to a miss if attacking player dealt more damage than he was supposed to deal
or
2b) roll a chance to convert a miss to a hit if attacking player dealt less damage than he was supposed to deal
3a) roll a chance to convert a hit to a miss if defending player recieved more damage than he was supposed to recieve
or
3b) roll a chance to convert a miss to a hit if defending player recieved less damage than he was supposed to recieve
hit>miss and miss>hit results negate each other
Knowledge is Power.
 Ellestar
 Posts: 6
 Joined: July 28th, 2005, 12:37 pm
 Location: Russian Federation, Moscow
I'm going to say it one last time. Fiddling with the probabilities to hit all amount to changing the shape of the distribution function. Most of you seem to want to make it more like a normal distribution. This is not a good thing.
We have binomially distributed number of swings, and this gives another dimension to the game, since the shape of the distribution (not just its mean) depends on the terrain. As Dave said in his http://wesnoth.slack.it/?WesnothPhilosophy terrain is supposed to be crucial to this game. Making the damage distribution normal would essentially remove this dimension. Don't do it.
We have binomially distributed number of swings, and this gives another dimension to the game, since the shape of the distribution (not just its mean) depends on the terrain. As Dave said in his http://wesnoth.slack.it/?WesnothPhilosophy terrain is supposed to be crucial to this game. Making the damage distribution normal would essentially remove this dimension. Don't do it.
This quote is not attributable to Antoine de SaintExupéry.
 ott
 Developer
 Posts: 838
 Joined: September 28th, 2004, 10:20 am
I'm not one of thoose unpleased by the random results, but what about that proposal:
I think at the moment u use a normal random generator that delivering a good sequence of linear random values.
There was an article on gamedev.net titled "Randomness without Replacement" but they seem to be down at the moment, so i can't provide a link. (google has it in cache)
The main idea is that long sequences of misses causes "frustration"...
To Reduce this each player gets a virtual deck of cards as a private random generator. The Card provide the number 0..n. At the beginning each deck is shuffled (using a normal generator) then every time a random number for this player is needed the next card is taken. After the last card is "used" the deck is shuffled again.
In wesnoth there are only 10 percentage steps so 10 cards should be enougth.
The extra efford for this approuch are 10+1(position) integers per player (including ai) more memory consumption, and a minimal time efford for managing the decks.
here a little pascal/delphi kind pseudocode (should be understandable)
F.e. having a 4 times a 70% change one will always hit. same with misses.
(not 100% because i could happen that the deck was shuffled again during the 4 trys so 6 trys are needed for a real 100% hit)
To reduce this effect 20 cards can be taken.
I think at the moment u use a normal random generator that delivering a good sequence of linear random values.
There was an article on gamedev.net titled "Randomness without Replacement" but they seem to be down at the moment, so i can't provide a link. (google has it in cache)
The main idea is that long sequences of misses causes "frustration"...
To Reduce this each player gets a virtual deck of cards as a private random generator. The Card provide the number 0..n. At the beginning each deck is shuffled (using a normal generator) then every time a random number for this player is needed the next card is taken. After the last card is "used" the deck is shuffled again.
In wesnoth there are only 10 percentage steps so 10 cards should be enougth.
The extra efford for this approuch are 10+1(position) integers per player (including ai) more memory consumption, and a minimal time efford for managing the decks.
here a little pascal/delphi kind pseudocode (should be understandable)
 Code: Select all
type
DECK = record
v : array[0..9] of integer;
pos : integer;
end;
var
decks : array[MAXPLAYERS] of DECK; //Asuming they are init with 0;
procedure shuffle(var cards: DECK)
begin
for i := 0 to 9 do
cards.v[i] := i;
for i := 0 to 9 do
begin
j := random(10);
swap(cards.v[i],cards.v[j]);
end;
cards.pos := 10;
end;
procedure GetRandomNumber(player: int): int;
begin
if decks[player].pos = 0 then
shuffle(desks[player]);
dec( decks[player].pos );
result := decks[player].v[ decks[player].pos ];
end;
F.e. having a 4 times a 70% change one will always hit. same with misses.
(not 100% because i could happen that the deck was shuffled again during the 4 trys so 6 trys are needed for a real 100% hit)
To reduce this effect 20 cards can be taken.
 Niels
 Posts: 12
 Joined: August 11th, 2005, 9:40 am
ott wrote:I'm going to say it one last time. Fiddling with the probabilities to hit all amount to changing the shape of the distribution function. Most of you seem to want to make it more like a normal distribution. This is not a good thing.
We have binomially distributed number of swings, and this gives another dimension to the game, since the shape of the distribution (not just its mean) depends on the terrain. As Dave said in his http://wesnoth.slack.it/?WesnothPhilosophy terrain is supposed to be crucial to this game. Making the damage distribution normal would essentially remove this dimension. Don't do it.
I read that article before, but i'm more worried about a huge unluck that happens sometimes. For example, i just surrendered in a game where i dealt 70 damage (120 evaluated) and recieved 165 damage (113 evaluated). So i dealt 120/70=1.714 less damage and recieved 165/113=1.46 more damage. So i was at a disadvantage 1.714*1.46=2.503 to 1 ONLY because of unlucky rolls. That's worse than fighting while standing on a plain with 30% defence against someone on a mountain with 70% defence. In other words, such disadvantage can't be countered at all. What's the fun in that?
So IMHO a game should correct this in some way so to make such games more fair. Say, a game may do it by converting hits to misses and vice versa if a player is lucky/unlucky. If a chance to convert will be relatively low, then it will not significantly impact a shape of a damage distribution etc., but it will make a game more fair and fun.
Knowledge is Power.
 Ellestar
 Posts: 6
 Joined: July 28th, 2005, 12:37 pm
 Location: Russian Federation, Moscow
In Multiplayer the efect of luck on the chat is very anoying, so again i try to discuss the benefits of my last proposal (2 posts before).
 Because Normal units habe maximum 5 hits, the Algorithem will not change the shape of the damage distributen of the units.
 The efect of terain is not touched either.
 The players cant know the result, so the gameplay doesnt change also.
The only efect is that the players experience luck more that the "normal" gamer thinks of it. Some people think: "If i missed often i have to hit next time". With the modified random function, they will discover "fairnes" more fast...
 Because Normal units habe maximum 5 hits, the Algorithem will not change the shape of the damage distributen of the units.
 The efect of terain is not touched either.
 The players cant know the result, so the gameplay doesnt change also.
The only efect is that the players experience luck more that the "normal" gamer thinks of it. Some people think: "If i missed often i have to hit next time". With the modified random function, they will discover "fairnes" more fast...
 Niels
 Posts: 12
 Joined: August 11th, 2005, 9:40 am
Niels wrote:In Multiplayer the efect of luck on the chat is very anoying, so again i try to discuss the benefits of my last proposal (2 posts before).
 Because Normal units habe maximum 5 hits, the Algorithem will not change the shape of the damage distributen of the units.
 The efect of terain is not touched either.
 The players cant know the result, so the gameplay doesnt change also.
The only efect is that the players experience luck more that the "normal" gamer thinks of it. Some people think: "If i missed often i have to hit next time". With the modified random function, they will discover "fairnes" more fast...
You should consider the suggestions to increase the number of
attack rolls, by increasing the number of units, by increasing the
amount of gold in the game. This will make short runs of good
or bad luck less important to the outcome of the game.
Other options are making a fork of the project or not playing the
game. Posting about how the developers can do something they
don't want to do is not very productive.
 bruno
 Developer
 Posts: 293
 Joined: June 26th, 2005, 8:39 pm
the article seems to be up again .... here the link
http://www.gamedev.net/reference/design/features/randomness/
Of course you can play matches with hundred of units. But then also every decission of the player becomes less important.
Luck is an important part of the game, i'm not thinking of reducing this aspect. Its only about giving the players the experience of luck in wesnoth that fits theire imagination of luck better.
Cause of the bunch of stupid idead in this thread (and others) obout that thematic, i understand that none of the more involved people read this.
But im sure the majority never realy considered "Randomness without Replacement"
http://www.gamedev.net/reference/design/features/randomness/
You should consider the suggestions to increase the number of
attack rolls, by increasing the number of units, by increasing the
amount of gold in the game. This will make short runs of good
or bad luck less important to the outcome of the game.
Of course you can play matches with hundred of units. But then also every decission of the player becomes less important.
Luck is an important part of the game, i'm not thinking of reducing this aspect. Its only about giving the players the experience of luck in wesnoth that fits theire imagination of luck better.
Other options are making a fork of the project or not playing the
game. Posting about how the developers can do something they
don't want to do is not very productive.
Cause of the bunch of stupid idead in this thread (and others) obout that thematic, i understand that none of the more involved people read this.
But im sure the majority never realy considered "Randomness without Replacement"
 Niels
 Posts: 12
 Joined: August 11th, 2005, 9:40 am
45 posts
• Page 2 of 3 • 1, 2, 3
Return to Multiplayer Development
Who is online
Users browsing this forum: No registered users and 3 guests