Does the AI care if it wins?

I guess we'll have to disagree. No, consumers wouldn't stand for a game that took minutes to execute each turn, or even a game that won't run on the computer they bought a few months ago. That's the main reason AI's aren't more challenging.
Well that about minutes was honestly a question. I think a minority of hardcore strategy gamers might find minutes acceptable. Bu nevermind.

If almost every customer really wanted easy opponents, then there'd be no money in developing multiplayer capability, since few players would want to play someone that might beat them.

I didn't say they want it easy. Human opponents can pose a challenge, but they also suffer from the same limitations: It's hard for them to follow and control everything that's going on simultaneously. A computer has no issues with that. If it would also have good strategic insight, playing against it might simply become frustrating. Winning against someone who's playing optimally depends mostly on luck.

Besides, multiplayer has an important social aspect.

Game development keeps pace with home computer technology. If it were true that developers dumb down games to keep players happy, then we'd still be playing CivI, just revised to have better eye candy. Conversely, a home computer from 1990 won't run CivIV.
True. Mostly because of that eye candy? :confused:

Some parts of game design haven't changed much since the early nineties. Technologically, the AI in Civ 4 isn't anything that was impossible or unknown in 1994. It's not that it's that bad, dumbed down and definitely not much worse than the AI in most commercial games, but it is far from revolutionary.
 
I'll say this about the game in relation to the discussion above. Some of the errors are due to poor programming and oversight, but I also believe that some are purposely made because programming a "smarter AI" means there's more code involved and hence greater computing power needed. There's a balance that needs to be struck, between an AI that is somewhat intelligent and computer performance. After all there's no use designing a game for a super-computer.
 
I think it has more to do with the amount of time publishers allow developers to spend on coding than with performance issues. The publishers don't care about AI, they just want the game to look nice so people will buy it. Just look at the Total War series - from RTW onwards as the graphics have improved the playability has gotten worse. The AI in M2TW makes the BtS AI seem god-like.
 
Agreed that playing against a computer opponent in any game should not feel like facing Fritz or Deep Blue for the reasons Junuxx pointed out. It's not good to interact with some rudderless and utterly incomptent coding either.

I'm thinking along the lines of setting up a sizable database of possible sub-strategies on top of the ones already in place. With a huge civ following and an active community, inputs as to this regard will be easy. The computer can be made conscious of what's really obvious in-game and from there pick out quick counters against the human player by randomly selecting what's on the list. This adds variety to AI actions but at the same time does not allow it to compute for optimal moves.

So far I've seen AI rush archers to fend off an axe rush, sabotage space sparts when I was close to completing my ship, safely pillage tile improvements with 2 move units, start a pre-emptive war when I mobilize and mass produce military units, form weak coalitions with long-time enemies for a desperate attack on my capital turns after I launched my spaceship, capitulate and then turn off research for a cultural win, and the most impressive thus far, do sneak amphibious attacks by parking a stack of units on my homefront as decoy.

So for the question whether the AI cares if it wins, on rare occasions it does and that's the problem.
 
I guess we'll have to disagree. No, consumers wouldn't stand for a game that took minutes to execute each turn, or even a game that won't run on the computer they bought a few months ago. That's the main reason AI's aren't more challenging.

If almost every customer really wanted easy opponents, then there'd be no money in developing multiplayer capability, since few players would want to play someone that might beat them .

I learnt to play chess agaisnt someone who could play six people at once ex national champion--- a friend, i played him couple of times aweek couple of games each night

took me two years to beat him and he was never short of people linning up to play him
 
Just look at the Total War series - from RTW onwards as the graphics have improved the playability has gotten worse. The AI in M2TW makes the BtS AI seem god-like.
Good example. IMO the horrible AI in total wars kills the game completely.

As for the difficulty level, you don't have to make it deepblue for everyone. As long as you have a good AI, you can scale it according to the difficulty level the player selects (settler->deity). In fact a good AI would be scalable and you could choose its mastery of every game aspect... like city placement, improvements, wars, diplomacy. You can't make a dumb AI smarter by scaling, but you can dumb down a smart AI very easily.

Also, this might not be the case for everyone.. but some of us actually like losing, as long as the AI is smart. I remember the chessmaster series, I hardly ever won against the godlike omniscient AI, but damn I learned so much and had so much fun because it was hard and clever.
 
I know the AI is...artificial. It doesn't feel anything, but I finished my latest game last night. In a loss....

It just seemed that the AI didn't care if it won, that it only cared if I did. Let me explain.

The AI is programmed to continue to play. The game itself has a trigger that declares a winner (based on your settings). The AI doesn't care about the trigger so much as it continues to try to survive in all dimensions.
 
Good example. IMO the horrible AI in total wars kills the game completely.

As for the difficulty level, you don't have to make it deepblue for everyone. As long as you have a good AI, you can scale it according to the difficulty level the player selects (settler->deity). In fact a good AI would be scalable and you could choose its mastery of every game aspect... like city placement, improvements, wars, diplomacy. You can't make a dumb AI smarter by scaling, but you can dumb down a smart AI very easily.

Also, this might not be the case for everyone.. but some of us actually like losing, as long as the AI is smart. I remember the chessmaster series, I hardly ever won against the godlike omniscient AI, but damn I learned so much and had so much fun because it was hard and clever.
I simply hate when people compare Civ to chess in terms of performance. Any civ game has far more variability in the 1st turn ( especially civ IV ) than the whole openings cataloged in chess so far. Chess has far less players, far less tile variation and far less possible actions per unit and does not increase the number of pieces in game . Chess players don't start with fog of war and you don't have to research anything neither your units will become better of worse from that research. and to boot, chess has a multi secular story and a gigantic and detailed database behind. So , making aAI for chess that looks godlike is extremely easy as long as you have a extensive database and some heuristic ( really , it is a thing that any sophomore can do ) . Making a AI in those terms for Civ IV is simply impossible.

To be honest, sometimes i muse with myself that is hard to believe that anyone can play this game ;) ... well, it is simply impossible without some major simplifications and we humans are far more flexible in that regard. A competent human is flexible enough to know when he should do A and when not to do A, a thing that a AI , barring some futuristic self-programming AI , will never be able to. To make things worse, even if you teach your best tricks to the AI, the human player will sooner or later learn to use those tricks against the AI ( a quick example: AI bombing defenses . pre BtS the Ai was far more adept of not waiting for the full bombing than it is in BtS. Result? AI smashing units with little odds. BtS coders taught the AI to bomb the defenses. Result? The AI will often bomb the defenses to 0% in cities that could had been taken far earlier... and both situations were and are exploited by humans in their planning ).

Well, Firaxis made a bad job in some areas of the AI ( some parts of the code have serious mistakes, some are sketchy at best, others look good only with a certain number of AI in game, some seem to have not been seriously tested ... ) and i'm not exactly a fanboy of Firaxis in terms of the AI, as a peek on the better Ai mod forum would show. But I'm also pretty sure that most of the propositions of the people that say that know of easy ways of making the AI better would make the AI worse in the end or , at best ,would have a net 0 effect.
 
I simply hate when people compare Civ to chess in terms of performance. Any civ game has far more variability in the 1st turn ( especially civ IV ) than the whole openings cataloged in chess so far. Chess has far less players, far less tile variation and far less possible actions per unit and does not increase the number of pieces in game . Chess players don't start with fog of war and you don't have to research anything neither your units will become better of worse from that research. and to boot, chess has a multi secular story and a gigantic and detailed database behind. So , making aAI for chess that looks godlike is extremely easy as long as you have a extensive database and some heuristic ( really , it is a thing that any sophomore can do ) . Making a AI in those terms for Civ IV is simply impossible

As I Introduced the Word chess to the thread :mischief: I'll just point out we were NOT comparing CIV with Chess, but responding to someones remark that people would not play A game they could not WIN. Chess is just one of the best examples that people will play a game they most likely can't win but still enjoy and keep playing

A CIV example would not work because of players different expectations.

The rest of your post was most imformative thoe :)
 
PoM, I believe that you're at least partially mistaken. A while back, I wanted to see how easy it was to win by culture, so I made it an always peace game. The AI still went about building its stack and upgrading it's stack even though obviously there was no danger in getting attacked (unless you want to make the argument that it was trying to avoid it's cities flipping to me).

I think the problem here is that the AI building a large stack (and upgrading it etc.) is not part of the victory strategy. It sounds to me like AIs must be happy building a SoD even if they aren't planning a war (something which would require the correct game settings).

So you're claiming that the reason the AI isn't more complex is that they don't want to make the game too challenging for players? They're keeping the AI simple on purpose. Sorry, but that's absurd.

Careful. The lead AI programmer was quoted saying something very much along those lines.

The key word that would most often have been used in design decisions regarding Civ4's AI would have been the word fun. Making the AI more complex is pointless (no, it's harmful) as a goal. Rather, making the AI more complex could be an unavoidable consequence of making the AI better in some way (e.g. more fun, more intelligent in planning, more personality/roleplaying etc.).
 
Chess is just one of the best examples that people will play a game they most likely can't win but still enjoy and keep playing

Indeed the comparison with chess was simply to demonstrate that you can enjoy a game you can't win... Not all of us play games for the ego stroke.

As long as it challenges you in a smart way like in chess / chessmaster and not with lazy and dull "just increase the damn damage variable!" implementations like in DOOM3.

In all cases, you can still compare civ to chess. Chess is one of the ancestors of all board games... and what is civ but the godzilla of all board games?

As for its AI, yes it can learn quite a bit from chess. For one, some people have done the math and the best civ openings are less numerous than you might think (mostly worker worker settler it seems, with a few exceptions depending on available resources). The same thing is true in chess : not all starts are created equal and most experts start mostly the same. There is no reason why civ AI can't have a database of opening moves, tactics, and gambits just like in chess.

Also in theory you can brute force the AI in civ too just by calculating the best moves depending on the best outcomes along a number of future turns... For example in a war situation the AI could calculate if it is better to make more units or tech to gunpowder and upgrade, calculating the result on a hundred possible variation depending on what you might do (fog of war just means more unknown variables and thus calculations.. which would result in AI doing more scouting before an attack just like a good human player), and doing what has the highest success ratio. We can't do this right now not because civ is a fundamentally different game than chess, but because we don't have the computing power. Yet. As technology catches up, I suspect you can apply most AI subroutines used in chess to civ with minor adaptations.

I think on the long run (preferably in our lifetime) as all game graphics go beyond people's expectation far ahead of what players require, we might see a change in how developers will try to sell their games. The selling point might become better AI. Instead of chasing realistic graphics, the new holy grail of video games will become realistic Artificial intelligence. The big sellers will be games where AI can display emotion, role-play and plan strategy with a degree of improvisation, provide a challenge by being clever instead of just cheating with variables, and generally behaves more like a human mind than a machine.
 
Also in theory you can brute force the AI in civ too just by calculating the best moves depending on the best outcomes along a number of future turns... For example in a war situation the AI could calculate if it is better to make more units or tech to gunpowder and upgrade, calculating the result on a hundred possible variation depending on what you might do (fog of war just means more unknown variables and thus calculations.. which would result in AI doing more scouting before an attack just like a good human player), and doing what has the highest success ratio. We can't do this right now not because civ is a fundamentally different game than chess, but because we don't have the computing power. Yet. As technology catches up, I suspect you can apply most AI subroutines used in chess to civ with minor adaptations.

I think you're grossly under-estimating the scale of such a search. Even if you could analyse all or most of the different move possibilities for an opponent, that is only one turn away and hardly useful for an AI in a game where games take hundreds of turns. Basically I'm saying brute force depth searches (I'm unsure of the correct technical jargon for that) is completely impractical for a game like civ. Heck, a computer scientist would probably say brute force is poor in chess computers but because chess is such a small, simple game it is at least possible (with some limitations) with the computing power we have. Brute force approaches to game AIs are pretty much completely out of the question except for the very simplest of games (like chess). Even if you could use all the atoms on Earth as part of a computer for brute-forcing a civ AI, it'd still take an unreasonable amount of time (more than minutes) to make a passable AI. Just look at the game Go. It is probably many many many orders of magnitude simpler than civ and it is an example where brute force approaches to AI is a waste of time and resources (literally, do you really want to pay thousands of dollars hiring a super computer to play a few turns of Go when a human player will probably beat it anyway?). Not to mention, a total brute force search (with no simplifications) in Go is physically impossible given the estimated number of atoms in the universe. ;)
 
I said hundreds in the specific context of calculating how many units and of what type the AI should build to attack someone. Let me quote myself properly :p ->

Originally Posted by Sarassin View Post
Also in theory you can brute force the AI in civ too just by calculating the best moves depending on the best outcomes along a number of future turns... For example in a war situation the AI could calculate if it is better to make more units or tech to gunpowder and upgrade, calculating the result on a hundred possible variation depending on what you might do (fog of war just means more unknown variables and thus calculations.. which would result in AI doing more scouting before an attack just like a good human player), and doing what has the highest success ratio. We can't do this right now not because civ is a fundamentally different game than chess, but because we don't have the computing power. Yet. As technology catches up, I suspect you can apply most AI subroutines used in chess to civ with minor adaptations.

Something like scouting you, seeing 3 longbows in the target city, then running a rough simulation of various units against that stack until it can estimate what a decent attack force looks like. One of the simulation could be 10 axeman, and another a tech to gunpowder and 5 musketeers. As I said the number of turns it would simulate into the future would be limited, maybe it would need thousands instead of hundreds of calculations but even then needing every atom in the universe is a bit of a stretched exaggeration. :)

Same thing with chess games... on lower difficulties they don't see far into the future, but at higher ones they do. And this not just by brute force (purely on the strength of the processor) but by recognizing patterns from memory. For instance if you expose your king to an attack, the AI rarely needs to do calculations, as it can recognize thousands of positions and the right move to do in each. Especially moves that result in check and mate in small number of turns.

Yes on a game with civ with up to 30-something AIs, and for multiple situations it would need a lot of computing power, I agree. That's why I said future tech will let us do that, not today's computers by any measure. I did not even put a date on it, so it can be as far into the future as necessary. :p
 
I'm sorry but I find your description of the algorithm really vague. Any algorithm which can be described as brute force usually scales ridiculously fast with input size. It's not exaggerating at all to begin talking about the number of atoms in the universe.

http://www.wired.com/science/discoveries/news/2006/09/71804
Chess was once the pinnacle of geekdom, but then the artificial intelligence geeks got too smart for chess and turned to Go. Why Go?

The game is more than a thousand years older than chess, and the number of possible moves in a game of Go exceeds the number of atoms in the universe. But most importantly, computer programs haven't yet beaten the human masters of Go.

Yes I overstated slightly with the physical impossibility due to atoms in the universe. Only because you don't necessarily need to store that many configurations at the same time. Still, you're talking about running a computer for probably more than a hundred years to achieve a trivial goal.

Anyway, I don't have enough of the technical background to speak of this in much detail but I can assure you pretty much any approach to AI that features brute force as a significant component is infeasible. In fact, much of the late game slowdown that everyone complains about is due to parts of the code that are accurately described as brute force. Things like unit pathfinding and trade route calculations are already slow and they wouldn't require any where near as much complexity as a half-decent AI.

I understood the context of your example well enough to be critical of it. You talk about simulating turns into the future. Do you ever make decisions during the game by simulating one, two or a few turns into the future? Except perhaps right at the beginning of the game where the number of legal moves is restricted because you have one or two units and maybe a few possible build options, and only 20 or less possible tiles to work with the cap, I doubt any person including you would use simulation as a means to make strategic decisions. Why would it be a good idea to make an AI do simulation? As you yourself said, there's a fog of war. That alone is almost enough to rule out simulation as you are going to have an AI blind to what's in the fog or at best having to make guesses about what's in the fog.

I will literally eat my hat, and my shoe, and probably even the shirt off my back if a brute force Civ4 AI is ever created, let alone if it ever beats a Noble level AI from Civ4.
 
Indeed the comparison with chess was simply to demonstrate that you can enjoy a game you can't win... Not all of us play games for the ego stroke.

As long as it challenges you in a smart way like in chess / chessmaster and not with lazy and dull "just increase the damn damage variable!" implementations like in DOOM3.

In all cases, you can still compare civ to chess. Chess is one of the ancestors of all board games... and what is civ but the godzilla of all board games?

As for its AI, yes it can learn quite a bit from chess. For one, some people have done the math and the best civ openings are less numerous than you might think (mostly worker worker settler it seems, with a few exceptions depending on available resources). The same thing is true in chess : not all starts are created equal and most experts start mostly the same. There is no reason why civ AI can't have a database of opening moves, tactics, and gambits just like in chess.

Also in theory you can brute force the AI in civ too just by calculating the best moves depending on the best outcomes along a number of future turns... For example in a war situation the AI could calculate if it is better to make more units or tech to gunpowder and upgrade, calculating the result on a hundred possible variation depending on what you might do (fog of war just means more unknown variables and thus calculations.. which would result in AI doing more scouting before an attack just like a good human player), and doing what has the highest success ratio. We can't do this right now not because civ is a fundamentally different game than chess, but because we don't have the computing power. Yet. As technology catches up, I suspect you can apply most AI subroutines used in chess to civ with minor adaptations.

I think on the long run (preferably in our lifetime) as all game graphics go beyond people's expectation far ahead of what players require, we might see a change in how developers will try to sell their games. The selling point might become better AI. Instead of chasing realistic graphics, the new holy grail of video games will become realistic Artificial intelligence. The big sellers will be games where AI can display emotion, role-play and plan strategy with a degree of improvisation, provide a challenge by being clever instead of just cheating with variables, and generally behaves more like a human mind than a machine.
You are seriously underestimating the possible number of openings in civ IV. Simple back of the envelope calcs:
  • 18 possible players, taken from 53 leaders possible and 37 possible civs ( so the possiblities are 18! ( you can be playing against 17 to none oponents ) *53*37 )

  • 3x3 places to settle in t0

  • 9 types of base terrain , 7 of them that can be coastal or riverside ( then 7*3 ) and coast can be also lake

  • 6 features in top of the base terrains

  • 36 resources, 3 of them not regularly on maps ( in spite of being possible to WB them in a map ), so I will not count them. 4 or of them are restricted to water tiles and the other are restricted to land

  • 23 improvements .. I could skip this for brevity, but the AI has to know how to play with advanced starts as well ;)

  • 13 techs in the first two rows of the tech tree.

  • 10 possible builds, 8 regular ( worker, WB, warrior, Henge, barracks, scout, monument , settler ) and 2 UB ( Ikhanda, Obelisk ). You might be barred of building settlers if you're playing OCC option

  • 3 sliders avaliable ( research, espionage and the never shown money one ), with 2 of them independent. There is the possibility of not having access to the espionage slider though , if you use no espionage option.

  • You can choose to hire a citizen instead of working a tile even on T0 ( not very likely a good idea, but it has to be considered... it can be the best possible solution, as when in a BFC of all ice ).

  • You can start with a warrior or a scout ( this obvioulsy depends of the techs you start with, but for simplification I'll assume 50/50 on this ... in fact you can start also with archers, lbows, muskets, rifles, infantry or mech infantry, depending on the techs you start with , but I'll keep that aside ). Scout has 5*5 possible places to go and warrior has 3*3.

  • The real beef : you can start at any possible distance from any of the other civs, from 0 ( same spot ) to infinite ( given that civ IV has no known hard limit to map sizes ). You can argue that we can scrap in terms of this analysis civs you can't contact on t0 so we will scrap all the civs that start more than 9 tiles away ( best possible scenario for contact in t0 using default rules (non-settler unit start in starting spot BFC ) ), so we have 9*9 spots for any other civ to spawn, from 0 to 18. I'm not sure if it is entirely justifiable to scrap civs that you can't contact in t0 from this calcs, but if you don't the possibilities are already infinite ;)

  • I'll skip the fog of war issues, otherwise it would be other infinite :p

  • You can be in peace or war with the civs you meet ( barring Always peace or Always war ). I'm being easy and not considering stuff possible to put in WB on t0, but that is not open in regular games, like being a master/vassal, defensive pacts and permanent aliances... or even UN/AP related stuff.

This excludes other stuff that could complicate things even further, like not settling in the first turn ;) , barbarians on or not ( your settler could be eaten by a bear :D Really, I've seen that happening on t0 ... ) , the whole possible combinations of options you might have in that particular game and the fact that not all the civs that started the game might be alive on the end of t0

Just to compare, chess has ( 8*2 ( pawns moves ) + 4 ( knight moves ) )^2 = 400 possible moves on t0...
 
Top Bottom