Firaxis failed at difficulty levels - no ranting!

And if you really want to cheat, then at least give the AI information it shouldn't have (e.g. where all the player units are) rather than bonuses that alter gameplay.

The problem is that doing that often does change gameplay, and is even more annoying than simply giving the AI bonuses which, if not too large, barely get noticed by the average player.
 
In my experience, game developers and designers can never play as well as the hardcore players. If they can't play as well as the top-level players, how are they going to program the AI to play that well? They just aren't.

Sorry, but that's just an absurd argument. The creators of the chess engine Rybka or Fritz are sure not grandmasters, but they programmed engines that can beat even the top ranked players on current hardware. Conversely, if you ask good chess players (or civ players) to sketch down an algorithm of successful playing, they will fail.

Programming and playing are two separate skills, and on current hardware, it's currently impossible to program competent AIs for such complex games as Total War series, of CIV. Why is that so? Because human brain and computer hardware works differently. Human players use a lot of heuristics (this town seems, vulnerable, that formations looks okay) that is next to impossible to program. Also, humans have adaptive intelligence, they are constantly improving from experience, something current AI's fail to do. Human intelligence is also heavy in associations, parallelism and pattern matching.

AI's, on the other hand, basically depend on series of triggers - if this and this is true, do that. Which means they are rigid and inflexible - the humans quickly learn to create situations where the rigid triggers react incorrectly, and exploit them (worker bait). Without adaptive intelligence, that is impossible to counter.

AI's are good at games that can be solved by brute-force searching (chess), and where reliable evaluation functions can be defined. Chess program use one-dimensional evaluation, positive number means white is better, the value says how much better. Try to do one dimensional evaluation for CIV! Is the dimplomatic relation more important than my lagging research? Should I spend these 100$ on rushing a new swordsman, or should I present it as a gift to my neigbor? These are the dilemmas AI's have to solve, try to write an algorithm and you will see there will be problems.
 
Also, humans have adaptive intelligence, they are constantly improving from experience, something current AI's fail to do. Human intelligence is also heavy in associations, parallelism and pattern matching.

AI's, on the other hand, basically depend on series of triggers - if this and this is true, do that. Which means they are rigid and inflexible - the humans quickly learn to create situations where the rigid triggers react incorrectly, and exploit them (worker bait). Without adaptive intelligence, that is impossible to counter.

Very good point - AIs with neural network models for learning through experience exist in e.g. industrial robots. It would be interesting to see such a model implemented in a game like Civ. In that way the AI would learn and adjust to the patterns of the human player, forcing a more varied gameplay. If you always rush with horsemen, the AI would learn to anticipate this and take measures, e.g. by putting spears/pikes on hills and forests around their cities.
 
If you always rush with horsemen, the AI would learn to anticipate this and take measures, e.g. by putting spears/pikes on hills and forests around their cities.

I am quite sure that the AI in Civ IV actually DID build the proper counter units in a longer war (e.g. Grenadiers against Rifleman or Rifleman against horses). This wouldn't be too difficult to program anyway. Just let the AI cheat in the way that it can 'see' all your military units. Use the relative number of units in a lookup table which gives you the 'counter units' and adjust your production weights accordingly. For this you don't need any fancy neural network stuff.

The 'AI has information about all your military units' is also a good example for an AI feature which could only be enabled on a higher difficulty level.

As programmer, once the C++ SDK is out, I want to fiddle around with the A.I. a bit, so that I can embarrass myself as much as the current CIV developers, lol.
 
I am quite sure that the AI in Civ IV actually DID build the proper counter units in a longer war (e.g. Grenadiers against Rifleman or Rifleman against horses). This wouldn't be too difficult to program anyway. Just let the AI cheat in the way that it can 'see' all your military units. Use the relative number of units in a lookup table which gives you the 'counter units' and adjust your production weights accordingly. For this you don't need any fancy neural network stuff.

My point was that an "experienced" AI would have an idea of what you are going to build and do even before it can see your units and actions. When horsemen appear it may already be too late.

Civ is supposed to be in the forefront of interactive entertainment, so it should have the most fancy and advanced AI possible.
 
My point was that an "experienced" AI would have an idea of what you are going to build and do even before it can see your units and actions. When horsemen appear it may already be too late.

Easy, just let the AI see the build queue ;) . You could also let the AI cheat so that it can instantenously switch the unit type it is building without any penalty as soon as you attack.

Otherwise, not even a human can look into the mirrorball and reliably predict what the other guy will build. For example, you need to know (or guess) at which tech-stage your opponent is, which resources he has available, .... . Maybe if the other guy always builds the same stuff in all his games you will know what to expect. Or if you are really good, you might be able to spot a certain strategy which includes certain units. But those things would be really difficult to program into an AI, especially if you just want to wait a few seconds for the turns of all the AIs in the game.

In think the art is to find AI cheats which are not obvious but make the AI look like it is clever. But at the moment, the CIV V AI only seems to have the 'resource advantage' available for higher difficulty levels.
 
In short: It is close to impossible to use chess algorithms. Even if it was possible, you would have to wait several minutes between turns. I would think several hours in late game situations. At this time it is virtually impossible to design an AI that can compete with a player on a tactical level.

I didn't mean to say that chess algorithms will necessarily work for Civ5.

An for randomization, they can just remove it: combat in Civ5 is already mostly non-random as far as I can tell.
Also, they could make units less fragile so that combat is less "discontinuous" and reliant on tactics, and in general alter the game so it's easier to play by an AI.

It's true that the fact that you can move _all_ units and that more moves are available makes Civ5 harder than chess.

However, prioritizing good moves and evaluating positions is probably much easier in Civ5 since units work in a straightforward fashion.

Also, both strategic decisions and combat between AIs can often be resolved while the player is spending minutes to play his own turn.

I'm not sure how good of an AI you can write, but surely you can at least figure out whether a move will get an unit surely killed on the next turn with no advantages, and avoid doing that, which the current AI fails to do.

Other similar games also appear to have better AI, so it seems possible.
 
Other similar games also appear to have better AI, so it seems possible.

Sure it's possible. For example, workers seem to have a really poor algorithm, where they evaluate all possible tiles for all workers at all turns (instead, for example, of having a prioritized list of all upgradeable tiles which only needs to be modified at certain occasions like when new tiles are added or new technology is available,...). The poor worker AI seems to be one of the reasons for the slowdown on larger maps.

With that kind of blunder in the game, I am optimistic that some modders will be able to improve the AI quickly when the C++ SDK is available :)
 
Sure it's possible. For example, workers seem to have a really poor algorithm, where they evaluate all possible tiles for all workers at all turns (instead, for example, of having a prioritized list of all upgradeable tiles which only needs to be modified at certain occasions like when new tiles are added or new technology is available,...). The poor worker AI seems to be one of the reasons for the slowdown on larger maps.

Evaluating all possible tiles for improvements should be quite cheap, since it's linear in the map size.

Computing the distance from any worker to any improvement is also relatively cheap (repeated Dijkstra algorithm, O(WV log V))

The hard part seems to be matching the workers with the tiles.
Specifically, naive (i.e. Ford-Fulkerson with Bellman-Ford to find augmenting paths) min-cost bipartite matching has an O(FE) = O(W^4) cost.

Hence, for more than about 100-200 workers you might need to use a better matching algorithm, or switch to a greedy algorithm.
 
Sorry, but that's just an absurd argument. The creators of the chess engine Rybka or Fritz are sure not grandmasters, but they programmed engines that can beat even the top ranked players on current hardware. Conversely, if you ask good chess players (or civ players) to sketch down an algorithm of successful playing, they will fail.

Okay, that's a valid point, but then you go on to say how Civ can't be programmed like chess. I completely agree!

Here's my point regarding devs not being able to program a smart AI: The developers most likely didn't mean to make things like fast horsemen rushing and luxury selling as strong as they turned out to be. If they didn't anticipate these overpowered strategies, how will they know to program the AI to utilize and/or counter them? They won't and you wind up with the AI going "ah crap, four horsemen again? Hopefully my two warrior defense will work this time!"
 
most games have this, because most programmers nowadays are too lazy to program a real working AI that can put up a challange.

'better' AI just cheats harder. while 'weaker' AI cheats less, and in some cases has handicaps.

as far as i know, on high diffculties, the AI will cheat hard (will start with extra units, has a bonus on cash and happiness, and production and science probably get boosted too) on low difficulties however they will have a REDUCED income etc and you will be the one that actually has bonusses. on prince it should be balanced (i believe)

Empire Earth 1 also had a nice system where the AI could spent resources it didn't have. So it produced things without having any money at all. Very funny how the AI sometimes just builded a tank and nucliar weapons within the first 5 seconds of the game, while you need like 5 minutes to get your economy up before being able to start building those things.
 
Think - if you were making a game of your own, what would you do to implement different diffuculty levels? You'd improve the AI.

What that would mean is that the lower difficulties would be using an intentionally "stupid" AI. Given how hard it is to make a good AI for a game as complicated as Civ, I see no value in doing that. Better that they just make the AI as smart as they can, and make up the level difference with numerical changes.
 
Back
Top Bottom