Solution-Based Game Development

It sounds kind of hyped, but you have to realize they have a smaller market and more competition for it (STARS!, VGAPLANETS, MOO, etc..). Some of their sales are in their TotalGaming package deal where you can download all of their previous software for 1 year, and GALCIV is their 'flagship' of that deal.

I think they're right on in their AI discussion. If Civ did have quicker turns, I'd actually play some of the monster Mods and like the game even more---probably even buy another CIV3 expansion
Though CIV's AI is challenging, even if it does cheat.

I still think some of the game design ideas of GALCIV (not your point here) would spruce up a new CIV. IMHO, the weakest thing about the CIV design is that it has potential to fall back on being an Empires game. And if we really got all our forum ideas, it'd be an overly complex design.
 
I wouldn't want it to embrace all the ideas on the forum. A lot of them are two different solutions to the same problem. Other ideas don't solve a problem with the game at all -- and that's my beef with those kinds of ideas. (Truthfully, I think the "religion" suggestion falls in that category. How does that improve the game where it's needed most, in the modern age, in giving you more ability to build and design your Civ, and so on?)

Not to mention that some things would have to be simplified. Consider it a "shift in focus", when you simplify some things in Civ 3 to make way for more interesting things in Civ 4.

I think it's achievable though.
 
What if Sid Meir programmed the AI to 'forsee' things. If the AI could see what x player's strategy was, it could see the pattern, and be able to counteract the player's strategy.

GAME 1: Bob likes to build his civ with no warfare at all. He just builds the whole time and does nothing else. The AI plants spies and monitors Bob's military forces for a few turns, and sees that he has very few of them. The AI builds an army roughly 2 times as powerful as Bob's, and attacks. Bob is overwhelmed and destroyed.

GAME 2: Bob decides to build more units, and attack other civs in the game. His attack strategy is: start a RoP with the AI, and attack. He does this and wins a few games.

GAME 4: Bob does the same thing, expecting to win. Instead, the computer has saved that Bob doesn't follow RoPs very well. The AI gaurds it's borders with more units and though it will still accept RoPs, it will go for a higher price. The AI builds more military units than usual. The AI monitors Bob's movements very closely, and when Bob has more than 20 units within its borders, the AI stops the RoP and tells Bob to leave. Bob, thinking he has the AI unawares and undefended, attacks. The AI overwhelms Bob and defeats him.

GAME 7: The past few games, Bob has been buying many of the AI's cities and defeating it. The AI, again, has it stored that when Bob buys lots of cities from it, it looses. The AI starts charging more for cities and starts to anonomously weaken Bob's economy. It plants spies who destroy his marketplaces. It uses spies to see what Bob is researching, and researches it first. It doesn't let Bob buy any more than x cities, and Bob is clueless. Another AI civ is defeated by Bob because it was attacked in one area, then sneak-attacked from where it moved its troops. The first AI is attacked by Bob, and it sends 50% of its troops to attack Bob, leaves 25% to defend the front line, and 25% to gaurd its cities. The AI is defeated because its attackers are defeated when they attack cities on hills.

GAME 8: The AI starts building cities on hills to increase its defenders' defense.

ect.

As you see, you could probably program into a game these things:

What didn't work vs player x
What did work vs player x
What worked in certain conditions
What player x's strategies were
What player x did in diplomacy
Kinds of deals he made in diplomacy
Patterns that the player followed (boomed in Ancient, army in Mideaval, economy in Mideaval, points in Industrial, ect.)

It would then access that info when it first met player x, and devise a counter-strategy against him. It would build around him and close off good building spots when it met him, build an army in the Mideaval Times to counteract player x, ect.

To sum it up, the computer would look for patterns in the player's strategy, and counterattack it.

Who else thinks this could be programmed into a computer.
(this post has 2,914 characters)
 
There's no AI in the world that can learn the player's style and figure out what they're doing. Even deep blue, the supercomputer that took decades of research and dozens of science to build, makes no model of what the player is trying to do.

As far as the chess game is concerned, the past several moves have nothing to do with the rest of the game. They're gone. They're decisions made. But a player uses this history, these past sets of moves, to help construct a mental model of their opponent, their style, and what they're trying to do. This is one of the reasons that Kasparov was so freaked out by deep blue: he couldn't make a mental model of what deep blue was trying to do. This is because deep blue didn't pay ANY attention to style -- it didn't care how Kasparov played, nor did it have a style of chess that it played.

Mathematically speaking, it chose the move that maximized the worst possible outcome in the foreseeable future.

I guess you COULD keep a running tally of how often your opponent breaks his deals, though. That's pretty quantifiable. But to keep the single player game and multiplayer game as similar as possible, I think this information should be available to your multiplayer opponents too. "Dan breaks 25% of his Right of Passage agreements!"
 
What if Sid Meir programmed the AI to 'forsee' things. If the AI could see what x player's strategy was, it could see the pattern, and be able to counteract the player's strategy.

I have suggested a solution to the AI's lack of foresight.

This also ties in with Sirian's belief that Diplomacy is what makes or breaks a great AI, on who lines up with whom.

My proposal is quite simple. Each AI will have its own 'intelligence' gathering system whereby it takes into account various variables, troop build-up, score, power, city count and keep track of them, so the AI will more or less know not only the nominal value but the 'RATE OF CHANGE' of each variable as well as rate of change relative to other Civs and itself. This latter ability will be a significant leap for the Civ canon AI. For the first time, the AI can see the future.

This is basically a forecasting tool whereby the AI can draw on the past to plan for the future. There are many forecasting models out there (moving average model, etc. ) that Firaxis can use. There is no silver bullet forecasting and the AI may employ several models and do various calculations with shorter term and long term historgraphical data.

What this will ultimately give the AI is what these models promise. A forecasting ability, and the ability to tease out who CAN become a threat (economically, militarilly) as well as who currently IS a threat. The Civ3 AI is very good at living for the moment. In fact, the entire AI is built to crunch data for that turn and make a decision. Anyone who is in business who ever has to make a decision will tell you using only today's data to make a long-term decision is a bad idea. The very least most businesses and corporations do is make basic forecasts to see trends.

I strongly believe if the forecasting models go in, it would go a long way of making the AI more 'real' and would not require tons and tons of rule based coding based on 'assumptions' of how a good player will be like, as the AI will have access to data that they can be taught to fairly accurately interpret on their own.

The exact formulas used could also be kept under wraps, and since there still are aspects of the Civ III AI mechanics that is not well understood, I have no doubt that short of the developers handing the community the formula (as they did with the cityflip formula) we'll never know how it works exactly and this would also go some ways into countering the human talent of getting ahead of clever AIs by understanding its mechanics.
 
Formula cannot be kept under wraps.

A. They seem to be planning to expose an awful lot to modders.
B. Even if they kept this hidden, players can feel out the shape of its behavior via extensive testing and data collection.

No matter how simple, or complex, the decision-making process, what really counts are the results. Observation alone can feel out the shape of any program's performance, learning what is possible to it and what is not, then pinning down the details via experimentation.

Typical players may not find out, but most who plug in to communities like this one would learn about it through community leaders, who would be sharing their findings back and forth and figuring it all out.


Prediction models could actually backfire. If players find a string they can pull to make the AI dance a certain way, to "fool" it into doing something they want or to avoid doing something (like attacking), it would be a heck of a mess.


- Sirian
 
If anything, I would prefer the AI have simple rules that come together for unexpected results(sort of). Only a few principles that guide their actions. A good example of simple AI doing well was X-COM:UFO DEFENSE. The Aliens used very simple AI in battlescape, but some of the basics allowed the aliens to do unexpected(although predictable) things. One of them was the fact that aliens tried to get behind cover and move around buildings(away from former location) whenever they were under fire. This meant that if you did not get the guy the first time and smoke obstructs your view, then that alien may flank you whenever you move forward.
 
sir_schwick said:
allowed the aliens to do unexpected(although predictable) things.

Eh? Sounds like an oxymoron.

X-com AI was good because it couldn't be predicted to the nth degree. Until you had Mind Probes to learn the type of enemy (soldier, leader, etc) you could not tell at a glance which role a given target would be performing, so you could not predict what it was likely to do. (Leaders avoided combat, for instance, while Soldiers often sought it).

The leader AI differed from the Soldier, from the Engineer, from the Medic, from the Commander. Each alien race had different stats, different possible weapons/items and attack forms, different vulnerabilities, different levels of psionic ability, bravery, etc. There were also variations from Soldier to Soldier, carrying different items/weapons. Some had pistol, some rifle, some grenedes or homing-grenede launchers, some were melee-only.

These WERE simple elements, but they came in enough combination to create a rich experience.


Certainly there are lessons that Civ could draw from X-com, but also keep in mind that X-com aliens didn't really play to win. They scattered around the battlefield so you could pick them off one or two at a time, your SoD (your whole force, or at least a squad of several) combining against one or two targets at a time. If X-com aliens had ever once used even some rudimentary squad tactics, they could have mopped the floor with the player's weaker soldiers.

In fact, there was one scenario where this could happen, with the really huge saucer ships carrying multiple Leaders and armed with the homing missile launchers. The AIs would not really come out of the ship, forcing you to try to storm it through the elevator, which served as a choke point. The AI units were locked in that sardine can, and it was quite difficult to beat them at all, much less to do it without casualties and especially without reloading from any mistakes. But even this challenge, the AI units moved around at random inside the ship, instead of staking out fortified positions and setting up zones of crossfire.

Simple is better with game rules, but not (in my view) with AI. If the goal of game AI is for automated elements to play well, then Smart is more important than Simple.


- Sirian
 
You do bring up a good point about the X-COM Alien AI not playing a squad game. I also agree that seemed like a glaring weakness once you realized it. The main point of bringing that example, as well as Decent, was that sometimes simple can equal smart. If you added some basic guidelines to squad strategy for X-COM, then maybe it would seem even smarter. I am just asking if it would be better to start on the simple end and add as you realize you can go smarter.
 
Sirian said:
Formula cannot be kept under wraps.

A. They seem to be planning to expose an awful lot to modders.
B. Even if they kept this hidden, players can feel out the shape of its behavior via extensive testing and data collection.
That's true, but feeling the shape is not the same as understanding it completely.

Typical players may not find out, but most who plug in to communities like this one would learn about it through community leaders, who would be sharing their findings back and forth and figuring it all out.


Prediction models could actually backfire. If players find a string they can pull to make the AI dance a certain way, to "fool" it into doing something they want or to avoid doing something (like attacking), it would be a heck of a mess.


- Sirian

I think what you describe here is the standard progression of all
AI to Human encounters in context of scripted behaviour. I concede that to be practical, the best solution for Civ4 AI is likely going to be rule based.

What I'm arguing for however is the quality of the information with which the AI can collect to make a rule based decision. As it stand, Civ AI so far has taken the current situation only to make a decision. I'm saying they should get better data, by taking into account both the past and predict the future. Having this ability would allow for a quantitative leap in AI performance. For one, the AI will suddenly perceive the game much closer to a human mind, by having a memory. And the data generated by such a system would allow for many more rule based behaviors that the current 'snapshot' system cannot handle. Ask the Civ III AI who has been nibbling away from its power in the last 50 turns and it wouldn't know or care. An AI which does keep track of this data, would know, and if programmed to, might care and it may decide to take a broad series of actions which can also be programmed. But before we can get to those fun parts, the AI needs the ability to recognize threats in a more realistic fashion.


The forecasting mechanism should be under the hood and it takes in so much data over several turns that cause and effect, I would argue, would not be so easy to spot. The easiest cause>effect observations come with the rule based AI behaviors of (if City is undefended beeline for it). A forecasting model just looks at the data, like the growth values of a Civ's cities, the growth of their economies, troop sizes etc. These are things any empire builders work on, and they'd be hard pressed to try and fool the AI by either stop growing (in which case the AI might attack anyways) or keep growing (which might lead the AI to attack anyways also) because the AI doesn't care too much are a 'target' nominal value "like if city =50 attack" and it doesn't care about a relative value either "like if power is >75% attack", all of which are snapshots of one point in time.

What the AI cares about is the whole package, how each civ stacks up relatively, how each has been growing their variables in the last 5, 10, 20 turns, and finally, how each Civ may place 5, 10 and 20 turns ahead, which is exactly the process human players go through when we size up potential rivals. Albiet we don't crunch the numbers, we visually asses the situation most the time. The political map on the main screen and the histograph gives us more than enough information (both past and present) to assume who will be our biggest threat (our easiest targets to pick on) in the future.

What I'm proposing is an integrated forecasting system that allows the AI to get a feel of the situation past, present and forecast what could be in the future. I don't see how else Firaxis can evolve the diplomacy model without giving the AI an ability to forecast.

This is what you noted in one of your posts here, which is basically diplomatic intelligence and the AI's ability to line up against an opponent at the right time, as opposed to the current system of chaotic nonsenscial alliances and treaties that are easily exploited by the human players.

Also another bonus. From a purely domestic management standpoint, forecasting tools would allow the AI to budget future expenditures, something they've never been able to do before, which has resulted in the bankrupt AI Civs in Civ III and how easily players can extort money out of them today.
 
I think a lot of people overestimate the effectiveness of "prediction" models. It's not something AI really does at all, yet. Faking it is what some AI does (like chess), but they don't predict what the player does so much as looking at all the possible outcomes in the future and steering away from the worst ones for as much control as it can have. And Sirian is right, it doesn't necessarily mean that the AI will become any less fallable.

The issue isn't predicting what the player will do, but making the AI unpredictable.

Part of that means making the game of Civ less predictable, though. Seriously, if you bring 8 riflemen to a mountain right beside a city with 2 muskateers defending it, what do you expect to happen? If you control 25% of the world by 300 AD, and the second place guy is at 15%, and everyone else is even worse off, what do you expect to happen? Not to say that the answer is randomness, but the answer is giving the player more meaningful decisions. Strategies that will work one game, but not necessarily the next game.

Don't leave the winner to chance, leave the winner to choice.
 
I think a lot of people overestimate the effectiveness of "prediction" models. It's not something AI really does at all, yet.

I'm assuming by 'people' you mean me.

DH, we've been through this before. You didn't warm up to it there then and I don't expect to see you support it here. That said, making unsubstantiated claims just so you can shoot down an idea is not how you go about it.

For starters, the capacity of the AI to work with prediction models is only as good as 1) the models 2) the rules given to the AI by the programmer on how work with the data. The claim that the AI has had a poor track record with prediction models ( FYI, they are called forecasting models) is an unfair attack, especially without evidence.

Forecasting models are well known and well understood. They have nothing to do with AI capacities. They are formulas that any 2nd or 3rd year statistics, sciences or business student would come accross as they are applicable in those fields (and yes, humans actually use these models as well as computer AI)

I refer all interested to read this guide to forecasting models.
http://www.marketingprofs.com/Tutorials/Forecast/index.asp

There are many many models out there, and several different sets of models geared at getting different variables and data and some models are quick and dirty while others are more refined. Firaxis has a free hand in picking and choosing which ones they want.

Yes, there are limitations. The financial world for example have moved away from pure modeling into more sophisticated forms of forecasting, including neural networks and the like, but I don't expect Civ4 to ship with an AI of that calibre and since Civ4 is just a game and unlike finance, where all the variables are still not well understood, the developers understand exactly how the game works and the use of these models would be far less risky.

As for the rules they would have to write for the AI to analyze, interpret and take action, we just have to have faith that Soren and whoever else is now the lead AI guy (maybe its no longer him since he is now lead designer) will do a good job of writing a good set of rules.

Part of that means making the game of Civ less predictable, though

Even human opponents are predictable. The problem with the AI is that we're essentially playing against a static opponent all the time and it never evolves. Some learning models might be appropriate but that will be limited to how much resources Firaxis is willing to devote to the coding. Civ3 have a learning AI with its governor function, but it wasn't very well done and was very buggy in vanilla, Soren has since fixed the most glaring problems with the governor and abandoned refining it in PTW and Conquests. It was basically a failure with Civ3 as it required too much direct human input with the need for manual governor configuration.

I'm hopeful a more advanced form of the learning AI will be re-introduced in Civ4. Having both a forecasting function and a learning function aren't mutually exclusive. The learning function may simply affect the decisions an AI take after its forecasting function gathers the data neccessary to alert it to some threat or problem.

Don't leave the winner to chance, leave the winner to choice.

I don't know what you mean by this. Giving the AI the ability to forecast is not leaving it to chance, its giving it better data to work with. Maybe we finally can have an AI who can rush build wonders and manage their gold income better as well when they can forecast ahead and see how their economy is going to be like based on growth trends. The benefits is really huge to forecasting and it applies both internally for domestic functions as well as for foreign policy 'threat assesment' functions.

Let me emphasize again. Forecasting models = give the AI access to better data. How it handles that data has nothing to do with these models. They can be predicable or unpredictable based on how well the AI is programmed to use the information. But basically, everyone is getting ahead and saying we need to do X , Y Z. If the AI gets incomplete, and poor data, no matter how clever you make it behave, its going to behave poorly. The old adage goes, garbage in, garbage out. You have to start with good data to make a good decision.
 
AFAIK, Soren is (at least) dual-hatted doing lead design/programming as well as the AI.
 
dexters said:
the developers understand exactly how the game works...

Judging by how many games ship with moderate to severe imbalances and design flaws, I will have to disagree with you on this point.


- Sirian
 
dexters, i didn't mean it as an attack on you.

I did spend 4 years of university studying Artificial Intelligence. I don't mean that to say you don't know what you're talking about, but to show that this isn't mere difference of opinion. I think you do explain forecasting models and such quite effectively. My beef is that they won't resolve all the problems. It's helpful to add heuristics to an AI like "if X > 50 shift strategies to B" that the programmers pre-define (including what X is, how it's counted, and what strategy B is). But I'm sure Civ already does aspects of this. More of the same might make it harder to exploit, but not unexploitable.

Not to say that I'm against giving the AI access to better data, or the ability to adapt. Those would help, certainly.

I'm not sure what the solution to the AI problem is. Truthfully, I've been one who's advocated cutting losses and letting the AI cheat. But not in the way it cheated in the past, where it gets a flat handicap. More that there's always a handful of civs who try to "keep up' with the player. So if the player declares war and starts conquering like a madman, a few other rivals start to conquer other weak civs to keep up. When the player finally faces off with the strong AI, however, the fight is guaranteed fair, though.

The AI isn't the big beef with the game though. Really, there DOES need to be more variety in strategy. If whoever has the bigger stack wins, whoever has more land can create bigger stacks, and so on, then there's really only one path to victory. Nobody can find a "backdoor" tactic to win. There are no risks to take based on choice -- like paper or rock versus scissors. There are only risks based on chance -- paper versus paper with dice rolls.

Open the game up to more choice, and the strategy becomes more interesting.
 
Sirian said:
Judging by how many games ship with moderate to severe imbalances and design flaws, I will have to disagree with you on this point.


- Sirian

I wasn't clear when I said developers understanding how the game works. I meant in context of the variables that go into say something like economic growth. If they want to create a forecasting model for that, a developer would have a better idea of where to pull data from as opposed to say an economist or a finance guy who would rely solely on history and observation.

I'm not sure what the solution to the AI problem is. Truthfully, I've been one who's advocated cutting losses and letting the AI cheat. But not in the way it cheated in the past, where it gets a flat handicap. More that there's always a handful of civs who try to "keep up' with the player. So if the player declares war and starts conquering like a madman, a few other rivals start to conquer other weak civs to keep up.

If the AI had access to the data and are programmed to red flag a Civ that's been consistently growing and jumping the ranks the past 20, 30 and 50 turns, they wouldn't need to cheat. They'd know it because a basic trend based forecasting tool can also project and say Civ X will be at Rank 2 in variables A, B, C, E, G soon.

I do concede though how well the AI behaves is still highly dependent on how the AI is programmed to handle the models, what actions it takes, etc. It is still at the end of the day, going to be a rule based game. I don't have a lot of expectation in terms of some innovative AI design, because I think with a game as complex as Civilization, its a recipe for disaster. What we can probably all agree on is for Soren and Co. to stick to the well understood AI methods they used in Civ3, but refine it, write more code for it and as I am arguing, give it the ability to do some calculations to see things like past trends and forecast the future. With that data, you can then go in and add more rule based behaviors which can add much more depth to the game.

The AI isn't the big beef with the game though. Really, there DOES need to be more variety in strategy. If whoever has the bigger stack wins, whoever has more land can create bigger stacks, and so on, then there's really only one path to victory. Nobody can find a "backdoor" tactic to win.

This is something that we can both agree on and the proposed use of forecasting models doesn't really handle this problem.

But if the AI is well programmed and is fed the proper forecasting data, It would not be out of the realm of possibility for some very interesting diplomatic alignments in the game that could potentially allow #4 to align with #1 and mop the floor with its weaker neighbours because #4 has forecasted one of its neighbours will outgrow it and it has been programmed to find a partner and star a war to remove that threat.

At the end of the day, what I propose was never pitched as a panacea, but well understood solution to solving one of the most glaring weakness in the AI, which is its inability to formulate a coherent plan because it gathers day on a turn by turn basis. I firmly believe that if the AI can make basic past trend analysis, and forecast certain variables into the future, it can behave much more intelligently.

The nice thing about it is that you don't need a radically different type of AI for this because the tools would just give the AI programmers a new way to approach coding AI behavior by giving the AI more information to work with and behave rather than simply being limited to what they've been doing so far. My biggest fear with Civ4 AI is really back to the same old method of 'present situation analysis' where the AI takes a snapshot of the variables in the current turn and make long-term decisions. As Civ3 has proved, it has its limits and I believe we've hit it with Civ3. The AI needs to broaden its information gathering beyond just 1 turn.
 
Back
Top Bottom