Better AI vs. Cheating AI

nullspace said:
This is still a totally unreasonable expectation. This would require first that the AI programmers are better at Civ 4 than 80% of the good players. And they have to get that good before the game is even released. Then, they have to write an AI that plays as well as they do. I'd be amazed if they succeeded at either of these.

There are a few flawed assumptions there. You're assuming that you have to be a good player to program an intelligent AI. There's a difference between being a good player and knowing what goes into being a good player. Maybe Soren doesn't have the patience to be good at the game. Maybe he just doesn't like playing the game certain ways. You can program the AI to be better than a player because a computer is (potentially) better than the player at remembering past events, determining future possibilities, evaluating the desirability of those future possibilities, etc. To write a good AI, one needs to be able to see the trees first, the forest second, while being a good player (usually) means seeing the forest first, and the trees second, if at all. People are better at bigger picture stuff, intuition, etc., while computers can throw a lot of precise, brute force at the problem in a way a (non-autistic) human cannot. I can program a computer to do a lot of things a lot better than I can do them myself.

Furthermore, they've been playing the game for about 2 years. It's not an issue of whipping out an AI from scratch in the last few months. They've been refining it over a long time. Not only that, but they've had 2 years of developing players to use as a model for the AI. An impractical but theoretically sound way of developing an AI would be using a neural net. Take 10 games played by a good player and use those to train a neural net to behave exactly as the good player did on those situations. Then let it rip on other games. As I said, that's not practical, but Soren is a neural net of sorts. It's a lot easier to write an AI that plays like a particular person than it is to pursue a more abstract goal like "playing well." Soren doesn't have to know how to play well; he just needs to know how to emulate someone who does play well.
 
Which leads to a very interesting idea ... if each leader has a different play style, than will this correlate to a different AI "path" - thus making the AI more fun to play against.

Also, as fun as it is to rag on the aI, think of it this way. You want an opponent who you can play against all the time for months on end and you want this opponent to always be able to give you a challenge? That's a tall order! I mean, if you played MP games vs one person ALL the time, after a month or two you would know their flaws inside and out too!
 
apatheist, sorry, but you simply don't know what you are talking about here. 80% is not even in the ballpark. An AI for something as complicated as Civ is much harder than that. Nor you can you handwave the complexity away with the neural net idea. That's even more expensive to produce. It's always harder to produce a "learning AI" than one that uses other methods. With a "learning AI", you have to program all the ways in which the AI observes and weighs other behavior--and then you still need to program what to do with the learning.

Likewise, 2 years of playing the game and one guy programming the AI (part time, I might add, since Soren is also the programming lead) is not a lot of AI development.

Given the resources available to them, Firaxis has done the very best thing they can do for the AI. They have made it highly moddable. This has two effects:

1. Obviously, things that the best players discover can sometimes be incorporated into the AI by someone other than Firaxis. This gets around the limited resource issue.

2. By this stage of the game (and probably well before now), Soren is probably doing more "modding" himself than actually changing how AI interacts with the full game. (No doubt he is doing plenty of tweaks to the interaction that will be appreciated by modders. But I doubt it is a high percentage of the time he spends.) Thus here near the end of the project, when the polish is being applied to strategies, Soren can be more aggressive with changes.

Besides, you are ignoring the scaling issues. Assume 3 Sorens and 4 years with 20 of the best players inhouse doing nothing but playing the game and advising the AI guys that whole time. (That's a completely silly assumption, BTW, as no game would sell enough copies to justify that level of investment.) The AI will be much better. But still, the game will ship with holes in the AI that many players will find quickly. You simply cannot predict what 10's of thousands of users will try and discover.
 
Albow, the only thing they haven't already said was in that I really wanted out of the AI is the ability to use multiple AIs at once. I agree, I'd rather play against seven decent but different AI (albeit using a lot of shared code) than one slightly better AI. You are correct that not knowing your opponent 100% will go a long way towards making a better game without necessarily one that is too tough.
 
apatheist said:
An impractical but theoretically sound way of developing an AI would be using a neural net. Take 10 games played by a good player and use those to train a neural net to behave exactly as the good player did on those situations.

Theoretically sound? This approach would require all the game rules to be balanced and finalized before even starting on the AI. Yet when I participated in the Diablo II Expansion beta, Blizz North was still changing the rules up to and beyond the ship date.

I would expect the process to be more fluid than this, and more interactive. The AI is a necessary component of the single player game in order to balance the SP game. So then your scenario would run in to the chicken and egg syndrome, and I don't think that would go anywhere.

You make some good points, though. Especially the thing about having to cope with the trees well before addressing the forest. An AI cannot fight well if it cannot first expand and build up its cities adequately, to be able to produce an army capable of fighting well. And that's just the start of how I presume an AI would have to be built.

Also, what works "best" on average can be the absolute wrong move to make if it is always the same move in the same situation. The AI might be absolutely brilliant on first contact, but then hopelessly outmaneuvered once players learn its patterns and can get ahead of every move it's going to make. Then the AI is panned as stupid and universally reviled, the same as all other game AIs before it.


AI has more room for improvement in game design than any other aspect, but there are reasons why it has only progressed to a limited extent thus far. It is not an easy thing to create.


- Sirian
 
The only "cheat" I mind the A.I having is vastly increased technology rates as it means ages pass very quickly and no Wonders are left to me.

By all means give the A.I the ability to build more military units and not worry about support, but don't let them advance at an unreal rate technologically. I find that no fun at all to counter.
 
Crazy Jerome said:
apatheist, sorry, but you simply don't know what you are talking about here. 80% is not even in the ballpark. An AI for something as complicated as Civ is much harder than that. Nor you can you handwave the complexity away with the neural net idea. That's even more expensive to produce. It's always harder to produce a "learning AI" than one that uses other methods. With a "learning AI", you have to program all the ways in which the AI observes and weighs other behavior--and then you still need to program what to do with the learning.
Yeah, it's pretty hand-wavey. Hand-wavey does not equal fantastic acid trip, though.

Crazy Jerome said:
Likewise, 2 years of playing the game and one guy programming the AI (part time, I might add, since Soren is also the programming lead) is not a lot of AI development.
Presumably, they can also draw on their experience writing code for previous Civ games and other non-Civ games. It's not like they're starting from nothing.

Crazy Jerome said:
You simply cannot predict what 10's of thousands of users will try and discover.
No? I think most of the strategies that were discovered over time and shared on boards like this for Civ3 were known to the developers before the game shipped. In addition, the developers of the game know the mechanics precisely and clearly, while the players have to rely on inference and guesswork. What we have to discover they already know because they defined it.

Sirian said:
I would expect the process to be more fluid than this, and more interactive. The AI is a necessary component of the single player game in order to balance the SP game. So then your scenario would run in to the chicken and egg syndrome, and I don't think that would go anywhere.
I believe Firaxis has repeatedly said that they did multi-player for a long time to balance and refine the game and only then began the AI, modelling it on how real players played. Obviously, they must have made changes to the game rules after they began work on the AI, but they've certainly given the impression that most of that was solid before they put a lot of effort into the AI. That seems like a good way to do it, as the ideal for an AI is that it plays like a good human player, and it reduces the temptation to modify the game mechanics in order to make the AI suck less.

Crazy Jerome said:
AI has more room for improvement in game design than any other aspect, but there are reasons why it has only progressed to a limited extent thus far. It is not an easy thing to create.
Agreed. That's part of why I advocate a game that's composed of well-chosen, simple concepts that interact in interesting ways. It's easier to write an AI that appears intelligent in cases like that than if the game concepts are complex.
 
apatheist said:
That's part of why I advocate a game that's composed of well-chosen, simple concepts that interact in interesting ways. It's easier to write an AI that appears intelligent in cases like that than if the game concepts are complex.

I may not agree on all of your points, but on this I do.
 
That last quote wasn't me. But I do agree with it and the reply to it.

Note that I'm not arguing that the AI will not be substantially better. I think it will be, for all the reasons listed. But what "better" means is where the debate occurs. Some of the things people are asking for are simply not realistic. A game as complex as Civ4 to reach that 80% mark is certainly not.

It might very well reach that for a game or three, but no matter how good you make the AI, a substantial number of people will learn from it. Then they'll spread that knowledge here and elsewhere. That's what I meant by 10s of thousands of people hitting the game. Only a small minority of those will find X, Y, Z. But once one finds it, many more will know about it.

It takes longer for the AI to keep up. Heretofore, the AI had to wait until the next expansion to do any major catching up. And even then, the developer is limited in what he can change because of what he might break. AI Modding attacks this limit from both ends. The AI will still be behind, but it will not stay as far behind, or for as long. This is as close as Civ4 will come to a "learning AI", because it's the only affordable method to close that gap.
 
warpstorm said:
How would you make the difficulty levels harder (assuming that the programmers gave it everything they could at the normal difficulty level)? Or would you rather they make the AI play stupider than it can till the highest difficulty level?

Isn't that what Galactic Civilizations does? The AI plays dumber at lower levels, and at a certain difficulty level it uses the full extent of its "intelligence" whilst the very highest level/s take it a step further and give the AI cheating. Of course, I've never managed to win a Normal-difficulty game on that one and each AI has its own intelligence level determined before the start...

The way I'd see it, the AI would be toned down for Chieftain through, say, Emperor/Demigod [what a time to forget the difficulty progression] and then be at full capacity for the next-to-most-difficult mode and then cheat at the very highest difficulty level. That's how I imagine such a system would work. If the AI were good, then it could be a good system. On the other hand, Firaxis doesn't appear to be anywhere near as good at making AI as Stardock is...

EDIT: Now that I think of it, this may have something to do with Stardock having their AI plan for its upcoming turn during the human turn.
 
warpstorm said:
The real problem is that as good as the AI programmer is (and Soren is one of the best in the industry), there are players who are better, especially after a few months of learning the tricks of the game (the AI can only be as good as the programmers and SMEs who programmed it (plus the ability to micro-manage everything to the n-th degree)).
This is why being able to edit the AI is such a wonderful thing! Imagine if one of those players were to be mimicked by an AI. The possibilities are endless. :)
 
Sorry about that, Jerome. Got sloppy with the cutting and pasting.

One point that I have been making badly is the significance of simple rules. The core rules of the game might be simple arithmetic, but the main part of the game would be pretty far removed from that. Imagine driving a car. You as a person think "wheel, brake, accelerator." You're not calculating air resistance, tire friction, torque, angular momentum, etc. You've learned a set of heuristics, an intuition, for how a car handles based on your physics intuition and years of experience. You don't need to calculate all those things, which is good, because you can't. A computer-driven car doesn't have intuition. It can handle the physical factors, though, and, unlike us, it really can do all of those calculations. As a result, both humans and computers can drive cars. Humans do some things better because of our intuitive understanding allowing us to see the bigger picture, while computers can do other things better because they run all the calculations and approximate nothing.

In my hand-wavey fantasy world, I imagine that, if you defined very simple core rules that had complex interactions like that, a human player would be unable to handle playing the game with a spreadsheet. It would be possible to do so, and the game would have that underlying rationality to it, but approaching it at that level would be too much for us. We're not suited for that. An AI wouldn't have the intuition that we have, but it would have the ability to run millions of calculations to build up a synthetic version of our intuition. For this to work, you'd need enough CPU power and really well-chosen fundamental rules. Maybe we don't have enough juice yet. Maybe the Civ rules are still unbalanced at their core. I don't know enough about AI programming to say why we're not there, but I do know enough to say that we'll get there eventually.
 
Back
Top Bottom