AIs have unfair advantages
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
-
- Posts: 17
- Joined: November 16th, 2006, 6:20 pm
AIs have unfair advantages
i run Slackware linux version 10.2, wesnoth version 1.2, and i have gotten to noticing that the computer player hits almost every time, every time a fight commences, even if the percent chance is 30% , making the AI player have unfair advantages, i noticed it in all versions up to version 1.2
i'm a warrior of the undead legion, and i have an era to deal with...
-
- Posts: 676
- Joined: July 20th, 2006, 4:45 pm
- Location: Germany
I know what he means, but don't really agree with him. There are short spells in single player games where AI hits outrageous amount of attacks seemingly regardles of odds and in frustration you get suspicions that RNG is biased towards AI side. (Had one of those recently, three Orc Grunts attacking a dwarf in the forest, each of them standing on hills. Effect - dwarf hit once, each of the grunts hit thrice)
But thats pseudorandom number generation in C++. If you get bad seed, you're screwed. And people tend to remember those moments the best.
But thats pseudorandom number generation in C++. If you get bad seed, you're screwed. And people tend to remember those moments the best.
-
- Posts: 17
- Joined: November 16th, 2006, 6:20 pm
i'll try to get a replay. but i won't be able to very soon... oh, i forgot to also say, that when you have 70% of a chance to hit (i.e, magical, or just terrain) it only hits 1 or 2 times
edit: adding the replay
the senario only goes to turn 9, and was started before this was reported, so i had, in attempts to save my units, had been reloading the the save file i saved just before ending my turn, please watch closely, and ignore the corrupts
edit: adding the replay
the senario only goes to turn 9, and was started before this was reported, so i had, in attempts to save my units, had been reloading the the save file i saved just before ending my turn, please watch closely, and ignore the corrupts
- Attachments
-
- replay.zip
- watch this replay closely
- (19.5 KiB) Downloaded 154 times
i'm a warrior of the undead legion, and i have an era to deal with...
-
- Posts: 188
- Joined: March 31st, 2007, 3:53 pm
- Location: The Void, usually.
Re: AIs have unfair advantages
Dude, are you sure the percent chance to HIT is 30%, not the percent chance to DODGE?Lava-Golem wrote:even if the percent chance is 30%
Chosen to be: Avatar of the God of Vengeance
Duty-bound to be: Last chance for the oppressed non-humans of the world
Accidentally became: Co-founder of the Council of Linac Mux
Self-nominated (pending election): Forum SUPERMOD!
Duty-bound to be: Last chance for the oppressed non-humans of the world
Accidentally became: Co-founder of the Council of Linac Mux
Self-nominated (pending election): Forum SUPERMOD!
-
- Posts: 17
- Joined: November 16th, 2006, 6:20 pm
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
The only way that the AI currently cheats is that in some ways it keeps track of where all your non-hidden units are. If you are not playing with Fog O War, this isn't even cheating. Campaign designers can cheat in favor of the AI in a variety of ways, but tilting the random number generator is not one of them. If you don't believe me, check the code yourself. One of the nice advantages of open source software... What you are experiencing is humans tendency to not be able to properly intuitively grasp the statistics of small and large numbers and how really likely it is to have improbable events. And on that note, since this is really a non issue, any reason not to lock this thread?
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358
Well, I have seen things go bad every time for my units as well, so much that I had to stop playing out of frustration last night.
3 footpads, at night, in the forest, making him 70% protected and with good chance to hit, against an elf, in clear terrain.
I managed to connect, from the 9 footpad attacks, 4 of them (at 60% to hit, should be at the very least 6)
The elf unit, every single time, hit back at least once, and against one poor footpad, it hit thrice.
This happened (with slight variations) EVERYTIME I restarted / reloaded. To the point I lost a knight on broad daylight, on "plains" hex for a few elvish outriders that just WONT get hit, but hit back every single time.
It is very hard to attack the AI and dont get hit back at least once. But to see your unit, unit after unit try to hit and failing is frustrating.
So the AI doesnt cheat, but the pseudorandom gives bad seeds everytime. Well, then there IS something wrong.
I dont know, perhaps generate seeds for every attack, and not for the volley?
Be honest with yourseves, forget the programming, go play the game with a note pad sideways, and write down the odds and the actual hit over .. lets say.. 10 turns.
they WONT MATCH.. and they will ALWAYS favor the AI. (or nearly always)
Sorry for intruding the discussion, but it is very boring to see a great game make you shut down your computer due to being unable to trust the numbers presented.
when you see 75% chance to hit, and you have 4 attacks, you should be pretty sure you will connect at least two.
Yet, 1 or none is what you get.
the chance to miss all attacks: 1/4 * 1/4 * 1/4 * 1/4 = 1/256 ...
so if I play 256 times that attack, only ONE should have no hits at all.
3 footpads, at night, in the forest, making him 70% protected and with good chance to hit, against an elf, in clear terrain.
I managed to connect, from the 9 footpad attacks, 4 of them (at 60% to hit, should be at the very least 6)
The elf unit, every single time, hit back at least once, and against one poor footpad, it hit thrice.
This happened (with slight variations) EVERYTIME I restarted / reloaded. To the point I lost a knight on broad daylight, on "plains" hex for a few elvish outriders that just WONT get hit, but hit back every single time.
It is very hard to attack the AI and dont get hit back at least once. But to see your unit, unit after unit try to hit and failing is frustrating.
So the AI doesnt cheat, but the pseudorandom gives bad seeds everytime. Well, then there IS something wrong.
I dont know, perhaps generate seeds for every attack, and not for the volley?
Be honest with yourseves, forget the programming, go play the game with a note pad sideways, and write down the odds and the actual hit over .. lets say.. 10 turns.
they WONT MATCH.. and they will ALWAYS favor the AI. (or nearly always)
Sorry for intruding the discussion, but it is very boring to see a great game make you shut down your computer due to being unable to trust the numbers presented.
when you see 75% chance to hit, and you have 4 attacks, you should be pretty sure you will connect at least two.
Yet, 1 or none is what you get.
the chance to miss all attacks: 1/4 * 1/4 * 1/4 * 1/4 = 1/256 ...
so if I play 256 times that attack, only ONE should have no hits at all.
Seems that topics like this will resurface over and over again. Follow sparr's advice:
When I played my first campaigns, I always did much more damage than was expected (=calculated). And the AI always did less damage than expected. I was the one who cheated, by reloading over and over again.
The advice is: look at the statistics! You'll see that there is no cheating. Wesnoth does the calculation for you.sparr wrote:Doesnt the 'expected' vs 'actual' damage, taken and inflicted, track precisely this?
When I played my first campaigns, I always did much more damage than was expected (=calculated). And the AI always did less damage than expected. I was the one who cheated, by reloading over and over again.
just blame it on the rng when you lose
Then the AI is truly cheating!Mist wrote:each of the grunts hit thrice
Which attack allows a footpad to take three strikes? Even if there were 9 attacks, to expect at least 6 to hit based on 60% chance is just a wrong assumption. Wrong assumptions + wrong knowledge of in-game stats = wrong conclusions.Radaga wrote:3 footpads, at night, in the forest, making him 70% protected and with good chance to hit, against an elf, in clear terrain.
I managed to connect, from the 9 footpad attacks, 4 of them (at 60% to hit, should be at the very least 6)
About expected/actual damage - I've never been interested in those enough to really work out the details, but consider this: when a unit dies, you'll always end the attack series with a hit by the survivor (in other words: the remaining expected damage of the other unit is lost). That alone will skew the balance away from the expected in favour of the winner, in terms of the statistics. If you happen to play consistently worse than the AI, you'll see the AI get consistently "more lucky". I happen to see the AI get consistently "less lucky" than me, according to stats.
Remember: 70% chance to hit is almost 1/3rd chance to miss.
Try some Multiplayer Scenarios / Campaigns