Question on randomness
Moderator: Forum Moderators
Question on randomness
I really like Wesnoth, but there is one thing that really annoys me, and i am not even sure if rightly so.
I cannot get rid of the impression, that the odds in fights are not what they are shown to be.
Don't get me wrong, I understand how chance works, and that it is perfectly possible to get 4 hits from one unit with only 40 % chance to hit. But I have the impression, this happens far to often for my enemy, and far to seldom for me. I know, that its easy to get such an impression, and I did not do a statistically significant study on this, but I tried it once with a mage, reloading again and again to see how often he would hit and I really did not get the impression that he hits more than two out of three times.
Thus my question: Are the chances tweaked, e.g. for increasing difficulty for the harder difficulty levels?
If you assure me, that this is not done, I will perform an analysis to either ease my mind, or find a bug.
I cannot get rid of the impression, that the odds in fights are not what they are shown to be.
Don't get me wrong, I understand how chance works, and that it is perfectly possible to get 4 hits from one unit with only 40 % chance to hit. But I have the impression, this happens far to often for my enemy, and far to seldom for me. I know, that its easy to get such an impression, and I did not do a statistically significant study on this, but I tried it once with a mage, reloading again and again to see how often he would hit and I really did not get the impression that he hits more than two out of three times.
Thus my question: Are the chances tweaked, e.g. for increasing difficulty for the harder difficulty levels?
If you assure me, that this is not done, I will perform an analysis to either ease my mind, or find a bug.
Well, it has been assured to us in the past, so consider yourself invited to perform an analysis and find the bug.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
- Doc Paterson
- Drake Cartographer
- Posts: 1973
- Joined: February 21st, 2005, 9:37 pm
- Location: Kazakh
- Contact:
Well, there's this old one here-Olm wrote:Thanks for the congratulations.
I searched the Forum and all I found on the topic was a minor flame war with a barely literate user, I didn't want to post there.
But looking into the sources seems to be a good advice, thanks.
http://www.wesnoth.org/forum/viewtopic. ... highlight=
I will not tell you my corner / where threads don't get locked because of mostly no reason /
because I don't want your hostile disease / to spread all over the world.
I prefer that corner to remain hidden /
without your noses. -Nosebane, Sorcerer Supreme
because I don't want your hostile disease / to spread all over the world.
I prefer that corner to remain hidden /
without your noses. -Nosebane, Sorcerer Supreme
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
Are you sure it isn't that you just end up restarting the scenario when you get below EV?Ankka wrote:Indeed. In campaigns I usually even end up doing some more damage than the computer when compared to EV. Almost always.
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 e-mail address listed on the website in my profile.
Umm... no, I guess.Elvish Pillager wrote:Are you sure it isn't that you just end up restarting the scenario when you get below EV?Ankka wrote:Indeed. In campaigns I usually even end up doing some more damage than the computer when compared to EV. Almost always.
Well, perhaps, since I hate losing high-leveled units.
- Casual User
- Posts: 475
- Joined: March 11th, 2005, 5:05 pm
Good afternoon!
Now, I'm willing to take Dave's affirmation there is nothing wrong with the randomness in Wesnoth at face value, but I think the randomness is fair but has too much deviation, i.e. it works out but it creates too many exceptions. Still, if anyone is willing to create a new random numbers generator...
Now, I'm willing to take Dave's affirmation there is nothing wrong with the randomness in Wesnoth at face value, but I think the randomness is fair but has too much deviation, i.e. it works out but it creates too many exceptions. Still, if anyone is willing to create a new random numbers generator...
Yes and no. From src/statistics.cpp:drachefly wrote:Does EV take into account the death of units partway through?
Code: Select all
attacker_stats().expected_damage_inflicted += bat_stats.damage_defender_takes * bat_stats.chance_to_hit_defender;
defender_stats().expected_damage_taken += bat_stats.damage_defender_takes * bat_stats.chance_to_hit_defender;
Indeed.If it doesn't, then any good tactics will throw off the actual from the EV, in your favor, so it would look like you got lucky.
The original idea behind the %-to-kill stats was actually that it was the first step in obtaining accurate expected values for the damage inflicted and taken. The latest version of the code in prkill derives the distribution function for damage dealt and received in a given battle, taking into account units dying, from which the expected values can be calculated accurately.
It is still a bit unclear exactly what the EV of damage dealt should be taken to mean, in the presence of attacks that kill.
However, there is an important inaccuracy in the current code. All the stored values are integers, so if an elf doing 5-4 damage at 50% chance to hit attacks and kills an opponent with 10hp after 3 swings, the current code will say it did 10hp while EV was 7.5, but the code will calculate EV as 6. So EV will always be underestimated. I can't think of a quick fix for this right now while we are in feature freeze, so this will likely have to wait for 1.0.
This quote is not attributable to Antoine de Saint-Exupéry.
Exactly, see the patch I posted to the dev mailing list. However, as I said, I can't think of a quick fix right now -- I'm not 100% certain grabbing more random numbers isn't going to resurrect some of the issues with randomness, like suddenly we have subgroup effects, or replays break.fmunoz wrote:If you have a non integer value just take the integer part + add 1 with the attack chance
So an attack with 5 damage amd 50% to hit will add 2 half the time and 3 the other half.
Let the convergence work for you...
This quote is not attributable to Antoine de Saint-Exupéry.