AI getting smarter at high difficulty levels?!

Zorlond said:
1. But noticed how they hardly ever manage to do significant damage? The few civs that actually do drop dead do so with amazing simplicity, and are rapidly absorbed into the conquoring civ.

2. I said without any means.

3. Numbers still answer to probability.

4. That's pure flame-bait and you know it.

As for my tone, it's from over a decade of dealing with the same AI in dozens of games from as many companies. I'm sick to death of it.

1. That's different from an irrevocable permanent alliance, now, isn't it?

2. Okay, to dust off an old chestnut, prove it. What do you mean, without any means?

3. .....hunh? Is it dissatisfying that sometimes an obsolete unit loses to a new one? Sure! But numbers ARE probability, when you're talking about combat odds.

4. Sorry, but that was NOT meant as flamebait- if you're continually getting out-teched, out-built, out-fought...what's wrong with turning down the difficulty? What difficulty is the game where all of these grievous AI cheatings are taking place being played at?

As for your tone, remember, no one on this forum made the game the way it is. Be pissed at how the game is (if you must), not at the other posters.
 
I don't think so.

You claim that the AI gets an advantage in combat, and is somehow favored by the RNG.

Enter the worldbuilder, build a stack of 100 units for you, and 100 identical units for the AI. Make sure that the don't get any bonuses and that the odds are equal. Choose "stack attack". Attack one stack with another and watch how many units survive and how much damage is dealt. If the AI gets an advantage from the RNG, it should show up this way. I don't see why that should be difficult to prove.

You claim that the AI doesn't do significant damage to another AI. Enter the worldbuilder, create a scenario where an AI has the possibility to do significant damage to another and demonstrate that it doesn't take its chances. I don't see why that should be difficult to prove.

You claim that the AI can rush units withut any means to do so. Create a game with lots of AI cities, put them under attack so that they have a reason to rush defenders, and make sure that the AI doesn't have the techs to rush. Certainly, under these conditions the cheats should show up if you place enough cities. I don't see why that should be difficult to prove.
 
Well, I'm glad to hear you've done these things yourself. May I see your savegames? (yes you'll claim burden of proof is mine, but if it's as simple as you say...)

Actually...

You claim that the AI doesn't do significant damage to another AI. Enter the worldbuilder, create a scenario where an AI has the possibility to do significant damage to another and demonstrate that it doesn't take its chances. I don't see why that should be difficult to prove.
This part won't work. An AI put into position to do 'significant damage' will absorb the enemy outright with no difficulty. One that is not will rarely ever reach that point. It's an either-or situation, no middle ground.
 
The combat odds sometimes have outliers, but I've benefitted from outrageous wins as often as I've lost. I've never seen a unit appear in a city that I couldn't explain by drafting or gold-hurrying.

I didn't see any of what you're talking about when I played on Noble. Noble seemed to me to be exactly what it said it would be.

What I saw was an AI that had no chance at keeping up with a human opponent and the ability to think abstractly, given a fair playing field. I played two games on Noble - utter blowouts - and moved on to Monarch. I lose a lot of games on Monarch, but I'm refining my play.

The biggest thing, no matter how good the AI ever became, is that humans have the ultimate cheat in this game: we aren't bound by our known personalities when making decisions. Egypt doesn't get to see that I'm 'pleased' and relax the defense of their borders; Roosevelt doesn't get to see that he and I both share favorite civics; Alexander doesn't have the privilege of getting to see how I feel about the other Civs when deciding what techs he's willing to put in my hands or when deciding what his long term plan is going to be in terms of coalition building for a diplomatic win.

No flaming intended, really - but if you're getting beat given a level playing field in terms of resources and growth, there is an implication there, and that is that you aren't making the best use of the unfair advantages that you are given.
 
Yzen Danek said:
What I saw was an AI that had no chance at keeping up with a human opponent and the ability to think abstractly, given a fair playing field.

Wow, the game is a challenge for me on Noble- I must suck at video games worse than I thought....I don't even win 50% of the time, although that may be due to my near-total refusal to fight...
 
Efexeye said:
Wow, the game is a challenge for me on Noble- I must suck at video games worse than I thought....I don't even win 50% of the time, although that may be to my near-total refusal to fight...

Well naturally, if you tie your hands, you're going to fight like a person with their hands tied. =)
 
Zorlond said:
Well, I'm glad to hear you've done these things yourself. May I see your savegames? (yes you'll claim burden of proof is mine, but if it's as simple as you say...)

I didn't see any reason to test something for which I didn't see any evidence in the game. But if you give me a little time, I'm sure I can wrap up one or two tests once I'm home again. I'm a little disappointed that you want your evidence served on a silver plate instead of working a little for it.

Zorlond said:
This part won't work. An AI put into position to do 'significant damage' will absorb the enemy outright with no difficulty. One that is not will rarely ever reach that point. It's an either-or situation, no middle ground.

So, if the AI doesn't do significant damage, you're right because you claimed that the AIs won't hurt each other. Conversely, if the AI *does* do significant damage, then you're right because you claimed that the AI will give in to another AI. Congratulations, you made in non-falsifiable claim. No one can prove such a claim to be wrong. Of course, the claim itself isn't worth much because it doesn't allow for any prognosis. All it does is giving a post-hoc explanation of why you're right.

Under these circumstances, my advice is to clarify your claim in a way that it can be tested.
 
I'm a little disappointed that you want your evidence served on a silver plate instead of working a little for it.
Point was, you asked for the exact same thing. I actually thought it over and set up a little game as you described. Me and one AI. 50 units of Swordsmen, 50 of Riflemen, and 50 Tanks each, all in Desert tiles and next to their counterparts.

A turn later only his Riflemen were in trouble, running for forest cover. All my tanks and swords gone.

Under these circumstances, my advice is to clarify your claim in a way that it can be tested.
Alright. Four empires paired off at permanent war. Each have 10 cities and 50 units. Terrain is all grass, land in shape of a filled-in 8, with choke point about 2-3 tiles across. No ships. One pair have the units within travel distance of the chokepoint, but not each other. (this prevents a first-turn battle and lets each AI position as they choose)

Second pairing has all units in one empire's land. 5 units each to each city, defenders and attackers. 'Favorable luck' would see the one empire absorbed in a single turn.

My guess? The first pairing would take an eternity to decide the war, assuming a conclusion was ever reached at all. The other would see a nearly immediate end to the fight.

(edit: Ah, a third pairing occours. A square land, no chokepoint. All other factors and prediction same as the first pairing.)
 
Artanis said:
The fact is that the Civ4 is one of the best game AIs I've ever seen. Is it stupid by human standards? Yes, it is. Hell, by human standards, I'd go so far as to say that the AI in this game is downright moronic However, by AI standards, it's about as good as it gets

1. Civ 4's A.I. was designed & coded by very smart software engineers : so it should not be "stupid" and "moronic", even "by human standards" (since it was programmed by humans with above average IQs).

2. Also, your argument could imply that if we took a scientific sample of the whole population (let's say, for the sake of argument, of those who are of age 16 to 59), a big majority of those humans could beat Civ 4's A.I. most of the time. This forum's membership does not represent a scientific sample of the whole population : the fact that many forum posters can easily beat your "moronic" A.I. does not imply that as many non-civfanatics could do it.

3. You seem to confuse two different issues : the evaluation of the complex smartness of a game's code (as designed & programmed by...humans) and the more general comparaison between Artificial Intelligence and Neurological Intelligence (the latter issue not being the topic of this thread).
 
Sorceresss said:
1. Civ 4's A.I. was designed & coded by very smart software engineers : so it should not be "stupid" and "moronic", even "by human standards" (since it was programmed by humans with above average IQs).

2. Also, your argument could imply that if we took a scientific sample of the whole population (let's say, for the sake of argument, of those who are of age 16 to 59), a big majority of those humans could beat Civ 4's A.I. most of the time. This forum's membership does not represent a scientific sample of the whole population : the fact that many forum posters can easily beat your "moronic" A.I. does not imply that as many non-civfanatics could do it.

3. You seem to confuse two different issues : the evaluation of the complex smartness of a game's code (as designed & programmed by...humans) and the more general comparaison between Artificial Intelligence and Neurological Intelligence (the latter issue not being the topic of this thread).

But whether or not the computer can beat the average human isn't the only measure of intelligence of the AI. It's certainly a reasonable one, but it's not the only one. Another set of measures might be how the AI responds to any number of scenarios it is presented with. I can think of all kinds of situations in which I've seen the AI where I was disappointed with its failure to take advantage of a situation that would have greatly increased its success.

In this regard, the measure of intelligence of the AI might be said to be not whether it can follow the rules of the game, but whether or not it can adapt and play differently when situations change or opportunities present themselves.

And this AI is not very good at that. As I mentioned before, I'm sure it's largely an issue of requiring a lot more resources in terms of time and computing power than the programmers were willing to give up.
 
Okay. I'm home now. :)

Zorlond: As I said, I created a testbed for an combat RNG AI bias test. Here is it:

View attachment CombatRngAiBiasTest.zip

In the testbed, Catherine and me are at war. There are 7 islands. On each island, there are 16 units of me and 16 identical units of Catherine. The northernmost island has warriors, then come spearmen, then swordsmen, then knights, then riflemen, then SAM infantry, then tanks. The units have been chosen so that no bonuses are in effect. All land tiles are grassland. I chose 16 units because the mouse-over display only shows 20 entries maximum, so it's difficult to see at a glance how many battles you have won if you have more units at the same spot. To make up for it, I chose 7 pairings instead of just 1.

Just attack with all of your units and count them afterwards. Check "Stack attack" to make the fight faster (but uncheck it for the tanks, the tanks have blitz and attack twice when stack attack is chosen). Afterwards, count your units. You should have about 8 units of every type left, and 56 units in total. (Of course, a certain deviation is to be expected.)

I performed the test myself and found no evidence for an AI bias. Check yourself.
 
Zorlond said:
I actually thought it over and set up a little game as you described. Me and one AI. 50 units of Swordsmen, 50 of Riflemen, and 50 Tanks each, all in Desert tiles and next to their counterparts.

A turn later only his Riflemen were in trouble, running for forest cover. All my tanks and swords gone.

I find this hard to believe. Please provide a savegame.

Also, you shouldn't look at the *next* turn, because if you allow the AI to fight back (with its wounded units against your wounded units), then any random variation that has happened during your initial attacks will be amplified. Just attack, then count your units. Also, if you used stack attack with tanks, you would have 4 battle rounds per unit in a single turn. I can see that this might actually lead to the total destruction of one of the tank forces (the one that had a little less luck in the initial round).
 
Here's another one, testing whether the AI can (as repeatedly claimed by Zorlond) magically create units without any means to do so, even on Noble difficulty.

Testbed is an island with me (Ashoka) at war with Alexander. Alexander has 24 cities, but no units. He knows Archery, so he can build archers. I have only one city, but five armies of three warriors each.

Under these conditions, Alexander needs archers. Desperately. Either to defend his cities, or to attack my city (which is undefended and would be easily reachable for him). So, his incentive to "cheat" and "magically create units" is extremely high.

Load the game and test for yourself. Alexander will start building archers in turn 1, but he'll need many, many turns to complete one. As you can see, all his archers take their time to build (no matter whether you attack and raze his cities or just wait btw). No evidence for the claimed magical unit creation can be found.

View attachment AIRushTest.zip
 
jaydh said:
but that is probably because people have seen no improvement in the AI since almost the beginning.
I simply cannot believe that you are saying this sincerely. I am not in any way saying that the AI is perfect. Nor am I saying that people shouldn't point out areas for improvement, especially those that appear to be easily programmable. But there's no frigging way that you can claim that the Civ4 AI isn't an improvement over the Civ3 AI, and that that one wasn't an improvement over the Civ2 AI.
 
ButSam said:
You can genetically alter probabilities to perform certain actions as an example.

snip

Actually, this just sounds like (possibly interlinked) backwards proprogation neural nets. :) I was just used to different terminology.

As for my original post, I actually had written "(Assuming it doesn't learn from game to game,)" before my comment because I was aware of this possibility (and because the civ AI apparently doesn't learn from game to game). :) I probably should have expressed it as "Given the civ AI doesn't learn from game to game".

jaydh said:
but that is probably because people have seen no improvement in the AI since almost the beginning. its a joke to think that most supporters of this game are looking for better graphics or sound.

As someone who has played a lot of civ 1 (probably over 1000 hours), that is simply wrong.

Zorlond said:
The part where it's a 1 vs all-AI game. Declared or not, they will all fuction as permanent allies.

About 1 out of 3 or 4 games, without any action from me, one AI will completely take out another. I've had games where 2 AIs have been completely taken out by other AIs. Currently I play on Prince +/- one level.

The part where an AI can make any unit instantly, even if they lack any means to do so.

I haven't seen evidence of this "without any means".

The part where the AI's units get favorable results from combat under ludicrous factors far too frequently (the infamous spearmen vs tank battle).

Not in my experience. Below Prince I didn't notice anything. When I started playing Prince I was suspicious after I lost some suspect battles but I then noticed that I started winning some unusual battles as well. It's almost like the combat results became more random above Prince.

The part where the AI's empire will -still- operate with greater speed in all categories regardless of all other factors

Are you telling me, you've never got a lead over the AI and pressed on to a win (e.g., via the space race)?

Do you guys even pay attention when you're playing?

Please don't flamebait. :)
 
7th Circle said:
Is this within the context of a single game or over multiple games? Alternatively, are the strategies developed before the AI actually plays the game? In other words, how exactly does this work?

Creating a learning AI is fairly difficult I think.. And not what I had in mind. But if they made one, there's no reason why they couldn't train the learning AI on a lot of games prior to release such that one shipped an already trained but adaptable AI.

Genetic programming works something like this: You generate a function which calculates how good a given game state is.. Then the AI should move he basicly moves his units and does all his decisions randomly (or semi-randomly), and repeats this a lot of times.. Say 1000.. Then he calculates how good his game state will be after each of these scenarios.. Then he picks out the best ones, say the 100 best, and creates a new set of possible actions (say 1000) based on combinations of these 100. Then he calculates the score for these possibilities, and rince and repeat. After repeating this a number of times, say 30, the AI picks one of the best scoring alternatives and uses that.

In genetic programming terms, you create an initial random population of solutions. You calculate score for each one and find the best scoring solutions from this generation. These best scoring are the ones that are used to generate the new generation. Then for each generation you generate a new population by combining two solutions from the previous generation, mutating a single solution in the previous generation or just adding a new random one to get "fresh blood".
Then you have a good enough solution or doesn't have time to run anymore generations, you use the best one you've found.

Genetic programming is fairly simple actually.. But can be resource hogging. The difficulty here would be to write the function who puts a score to a given state of the game.

The very nice thing about such an approach is that one could vary difficulty merely by adjusting parameters, like how many generations and how big populations one use in the algorithm. Thus on difficult settings the AI would "think" longer.
 
Psyringe said:
Zorlond: As I said, I created a testbed for an combat RNG AI bias test. Here is it:
*tests* ... Great. Just great. Sid left in the 'save predetermined results' code from Civ III. Thanks a lot, Sid, you just made prooving your AI bias cheats much harder. Co-incidence? I really doubt it.

Stack attack can no longer be used or trusted. With it engaged, all combats are pre-determined, and will result in the same numbers on successive re-loadings:

Me Him
Tanks 9 0 (ignored, forgot about Blitz)
SAM 10 6
Riflemen 9 7
Knights 12 4
Swordsmen 7 9
Spearmen 10 6
Warriors 9 7
Total 57 39

After discovering that little gem, I turned off stack attack completely and left it off. Next pair of results, first I disbanded all groups and had them fight individually. Second I left groups intact. Only way I could be sure the predetermination code was minimized.

Tanks 9 7
SAM 5 11
Riflemen 8 8
Knights 8 8
Swordsmen 6 10
Spearmen 12 4
Warriors 8 8
Total 57 56


Tanks 10 4
SAM 9 7
Riflemen 9 7
Knights 11 5
Swordsmen 7 9
Spearmen 8 8
Warriors 10 6
Total 64 46

From these results, I suspect there's something additional contaminating the data. Of all the fights, the AI only came out on top 4 times, with only 4 ties. That's 12 matchups in the player's favor, even with the totals, 2 go to the player, and the last is a tie, statistically improbable. Yes, I realize it's the opposite of what I predicted, but that doesn't make it any less a problem. The odds should be completely even (within tolerance), not skewed to either side.
 
First, thanks for stopping by again.

Second, it's long known that the game preserves random seed, so I sort of assumed that you knew that and didn't mention it again. Sorry for not doing so, because it would have saved you some unnecessary work: Your repetition of combats is not usable for our statistics. You did not provide a new sample, just mixed the existent sample a little, and hence get very similar results, no matter in which sequence you do the fights.

Here's an example. Let's say you did the warriors first, then some riflemen, and then all knights. Your warriors lost, your riflemen won, and your knights lost again, so all in all you had bad luck. To be precise, you mostly had bad luck, with a streak of good luck in between. Now you turn off stack attack and change the order in which you do your attacks. The RNG will still yield the same number sequence. So if you start with SAMs now, you will probably lose the first ones, necause the SAMs now have the beginning bad luck that your warriors had before. Also, the streak of good luck that your riflemen had *will* appear again (probably within the SAM battles, as these need more rounds than the warrior battles in your first try). This means that no matter in which sequence you do the fights, you will get similar, and by no means independent results. You then pile up these depemdemt results, get to a 12:2 win ratio and say that this is improbable, so the battle results have to be skewed. But you did this skewing yourself by using dependent data, which magnifies the random differences instead of balancing them.

If you do want more data, you have to get an independent sample, i.e. a new RNG sequence. To get this, load the game, enter the worldbuilder, save the game as world builder file, leave the game, and now load the worldbuilder file as a scenario. This will reseed the RNG, and you get new, independent data.

Third, why do you limit your analysis to "total matchup results"? This leaves you with only 6 independent data points (if we leave the tanks out). Of course the expected variation within 6 data points is much larger than in a sample with more (independent) data points. It's much better to perform such an ananlysis based on the outcome of the individual fights, because then we have 16*6=96 data points already. In each trial, there's a 50% chance to win, so each trial is like the tossing of a coin. With some stochastics, you can determine how probable / improbable our observed outcome is. Do you want to do this, or shall I take up the work again?

Edit: corrected formula in above paragraph, sorry. Also, addendum to my paragraph about more data points: a still better alternative to get greater number is to simply put more islands with units on the map. This has the advantage that a single save can be used to replicate the findings.
 
Psyringe said:
I performed the test myself and found no evidence for an AI bias. Check yourself.

At what difficulty?

I would assume the AI bias does come into play until prince or monach like in the old civ games, and that below noble there would be a player bias.
 
Back
Top Bottom