Split from [is AI cheating?]

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 10:14 am

hook wrote:my brother (windows gaming addict) stopped playing Halo on his winXP to play Wasnoth on my Linux install :D

well, here's the thing: he's been bi***ing about the luck of the computer player's units, claiming that the game cheats ...well, i have to say that the computer's units really are lucky bastards compared to my brother's units - comparing the actual and the theoretical (displayed in game) percentage of chance of hitting.
anyone care to either explain, or at least shatter my brother's (and mine a bit) claim?

p.s. using wesnoth-0.4.8, just saw the update today ...will poke the gentoo-game-portage team for a refresh of the ebuild tomorow ;)
I didn't see the code, but I believe that the AI cheats, and a lot. I've tested it many, many times, and there are no chances of this being a coincidence (it might be part of the game's difficulty).

The first time was on one of the first missions of the first campaign. I had a unit with 4 attacks and 70% chance to hit, against a computer unit with only 30% to hit and also 4 attacks. I'm telling you that I've missed all 4 attacks, which should be near impossible (since you would have to take 30% four times in a row), while the AI hit me twice! I got so pissed that I reloaded the turn and saved right before the attack. I reloaded the game 4 times before I could hit more than once (missed all 2 times!), and reloaded 8 times before I could hit more than the AI (which had only 30%!!!). That's just not possible with those percentages.

I've never seen the AI miss all attacks on a unit with 50% or less defense (that only happens to me, and it's not rare).

Overall, I made about 15 tests so far, and all of them with similar results. These absurd odds happen every turn when I have more than 10 units on the field. Sorry, but I don't believe that this is a coincidence. That doesn't make the game unbeatable or bad, but it sure irritates sometimes.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Split from [is AI cheating?]

Post by zookeeper » December 13th, 2016, 11:19 am

No, please don't resurrect threads from 2003.

Also, no, the AI doesn't cheat in that way. It just doesn't.

User avatar
Lord-Knightmare
Forum Regular
Posts: 1137
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Split from [is AI cheating?]

Post by Lord-Knightmare » December 13th, 2016, 1:56 pm

The AI does not cheat. was given favourable RNG because it is incapable (on its own) of performing any other objectives other than killing, capturing villages and more killing; and it can easily be outsmarted (to make it perform other tasks, you use Micro AI functions). If you are telling us that the AI cheats, then you need to play a lot more...since you are a bad player... :lol: :lol: :lol: :lol:
Last edited by Ravana on December 13th, 2016, 2:01 pm, edited 1 time in total.
Reason: Doesnt crash for me (chrome)

User avatar
Lord-Knightmare
Forum Regular
Posts: 1137
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Split from [is AI cheating?]

Post by Lord-Knightmare » December 13th, 2016, 2:00 pm

EDIT: Sorry, for the double post, but can someone tell me why my browser repeatedly crashes every time I try to fix my previous comment using "edit"?

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Re: Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 7:40 pm

"favourable RNG"
Yep, that's exactly the concept of cheating.

Anyway, I never said that I want the game easier. I alerady win with more than 10 turns advantage and rarely losing even 1 rookie unit per mission. It doesn't have to do with that, but with the game showing false percentage numbers before the combat.

My point here is: If your real chances are lower, why not show the real number? What's the point in showing 80% hit chance and making you miss 4 attacks regularly? That's 1 chance in 625. Even hit only once and missing the other three is 1 chance in 125 (and please, don't waste any time trying to say that those probabilities can happen often).

The game shouldn't lie to the player. Show the real chances! It doesn't matter if the AI chances are better than yours, that's part of the game's difficulty. At least the player can do bolder moves and calculate risks correctly, increasing the number of valid strategies (specially with smaller groups of units).

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Split from [is AI cheating?]

Post by zookeeper » December 13th, 2016, 7:46 pm

The AI doesn't have a different RNG.

User avatar
skeptical_troll
Posts: 429
Joined: August 31st, 2015, 11:06 pm

Re: Split from [is AI cheating?]

Post by skeptical_troll » December 13th, 2016, 8:05 pm

MagnetoRN wrote:Even hit only once and missing the other three is 1 chance in 125
actually I think it's about 1 in ~39. One think I'm not sure about is if RNG on save-loads are fully independent, or are they somehow pre-determined based on game variables? I know there is this 'deterministic mode' in 1.13 which should do that right? Other than that, I think this point was raised many times but that's simply a very common cognitive bias. Ask to the most experienced players around. As you said, there would be no point in cheating on the players.

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Re: Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 8:12 pm

skeptical_troll wrote:
MagnetoRN wrote:Even hit only once and missing the other three is 1 chance in 125
actually I think it's about 1 in ~39. One think I'm not sure about is if RNG on save-loads are fully independent, or are they somehow pre-determined based on game variables? I know there is this 'deterministic mode' in 1.13 which should do that right? Other than that, I think this point was raised many times but that's simply a very common cognitive bias. Ask to the most experienced players around. As you said, there would be no point in cheating on the players.
I meant 3 times in a row. Since 20% is the same as 1/5, 3 consecutive misses are 1/5 x 1/5 x 1/5.

I've never seen this deterministic mode. What does it do?
Last edited by MagnetoRN on December 13th, 2016, 8:18 pm, edited 1 time in total.

User avatar
Ravana
Forum Moderator
Posts: 2259
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Split from [is AI cheating?]

Post by Ravana » December 13th, 2016, 8:17 pm

Then there would still be 2 cases, that 0.8 is first or last.

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Re: Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 8:20 pm

Ravana wrote:Then there would still be 2 cases, that 0.8 is first or last.
The percentage is not meant to be the same for all attacks? Because if it's not, it is absolutely pointless.
Last edited by MagnetoRN on December 13th, 2016, 8:27 pm, edited 1 time in total.

User avatar
skeptical_troll
Posts: 429
Joined: August 31st, 2015, 11:06 pm

Re: Split from [is AI cheating?]

Post by skeptical_troll » December 13th, 2016, 8:25 pm

Hi MagnetoRN, the four cases in wich you have three misses and a hit are HMMM, MHMM, MMHM, MMMH. The probability of each of those is 0.2^3 * 0.8, so the total probability of 1 hit out of 4 is four times that.

I'm not sure exactly what the deterministic mode does, but I get from that the description that if you load a saved game, you still get the same RNGs. Not sure what happens if you slightly change your moves.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Split from [is AI cheating?]

Post by iceiceice » December 13th, 2016, 8:31 pm

tl;dr

The AI does not "cheat" like you are suggesting in wesnoth 1.12, the probabilities are the same for ai and human.

However, If you aren't happy with the random generator in 1.12, you could try playing the development version 1.13 and see if you think it is noticeably different. There was a change made to the random number generator, where we used a fancier and more accurate random generator technology.
Spoiler:

User avatar
Vyncyn
Forum Regular
Posts: 393
Joined: April 6th, 2013, 5:51 pm

Re: Split from [is AI cheating?]

Post by Vyncyn » December 13th, 2016, 8:32 pm

In some campaigns enemy leaders have a better dodge chance when it isn't part of the win condition to kill them. For example I had once a game where i couldn't hit the enemy leader more than once with a red mage, desipte save/loading about 20 times. It is sometimes coded in to prevent the player from killing certain units, but those cases are rare and I don't think the ai gets a % advantage in normal battles.

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Re: Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 8:37 pm

skeptical_troll wrote:Hi MagnetoRN, the four cases in wich you have three misses and a hit are HMMM, MHMM, MMHM, MMMH. The probability of each of those is 0.2^3 * 0.8, so the total probability of 1 hit out of 4 is four times that.

I'm not sure exactly what the deterministic mode does, but I get from that the description that if you load a saved game, you still get the same RNGs. Not sure what happens if you slightly change your moves.
Considering only HMMM and MMMH, the chance of getting any of those MMM is only 0.2^3, and they happen often. Also, when saved and reloaded before attacking, I got different results, but moslty 1 hit and 3 misses and ocasionally 4 misses (which should be near impossible). After about 5 attempts, I got 2 hits, and only after 12 attempts I got 4 hits. That's no bias.

Again, I'm not complaining about the fact that I missed the attacks, only the fact that I would like to see the real odds.

MagnetoRN
Posts: 25
Joined: December 6th, 2016, 5:37 pm

Re: Split from [is AI cheating?]

Post by MagnetoRN » December 13th, 2016, 8:42 pm

Vyncyn wrote:In some campaigns enemy leaders have a better dodge chance when it isn't part of the win condition to kill them. For example I had once a game where i couldn't hit the enemy leader more than once with a red mage, desipte save/loading about 20 times. It is sometimes coded in to prevent the player from killing certain units, but those cases are rare and I don't think the ai gets a % advantage in normal battles.
Hmm. I didn't know that fact. Maybe that's used in other situations, like you going through some paths on the map or something (disadvantage for the player in some tiles).

It would be nice to see the real odds, though.

Post Reply