 |
|  |
 |
|
Velociryx
|
 |
of Candle'Bre
Apr 1999 time: 05:36
|
|
'k...here's a topic I know NOTHING about, so this should be fun...
Was just bouncing ideas around in my head, and thought I'd put them here to generate some discussion 'bout AI in general.
Is this intended for inclusion in Candle'Bre? Heck if I know....this is just me thinking out loud. If it makes it into the game, awesome, if it's impractical, then I'm sure some code guru will come along shortly and tell me so! 
I was thinking about what makes a good AI, and it seems to me that there are a number of excellent approaches to the problem.
One, and this was an idea I embraced whole heartedly early on, is to give the AI a simplified rules set to operate from.
Players love choices. The more the better.
AI's don't tend to cope well with so many choices, so by streamlining the AI's rule set, we limit the number of choices they have to make, and thus, limit their ability to make foolhardy mistakes.
While this approach is a good idea, IMO, and would make for a pretty lean and mean AI, perhaps there's another way.
The methodology mentioned above is still rules based, and as such, carries a certain amount of predictability.
What would be cool, however, is to create a "Predator AI" - an AI with no rules to follow, but only a few high level mandates and an open-ended set of instructions to facilitate meeting those mandates.
There are companies, mostly writing software for businesses, which are, right now, creating AI's that mimick various animal behaviors. Ants. Flocks of birds, and so forth.
Would it not be possible then, to creat a Predatory AI whose goals were survival and reproduction, and turn him loose on the player?
Such an AI would measure the relative strengths of the other predators around him, and either seek to dominate them (become the alpha male) or to meekly serve if the differences in strength were overwhelming. Reproduction would take the form of conquering new provinces and/or building population base, money would be "food," and so forth.
Give the AI a survival instinct, and some broad-based instructions for reproduction, and then give it some form of "memory" so it can learn what works and what doesn't, and turn it loose....
Might make for a fun little experiment...
-=Vel=-
|
|
|  |
 |
|
H Tower
|
|
for the AI, it's been said that you can't build monestaries in the same towns that you build Pubs in, right? wel what if you had the indevidual AIs start out with one set thing in mind, focus only on the faith technologies for AI #1, have AI #2 focus only on the "sin" technologies for lack of a better word.
|
|
|  |
 |
|  |
 |
|  |
 |
|
strategy
|
|
It's never a good idea to tack on the AI as an afterthought (even if this sometimes seems to be the industry norm). My own belief is that games should at least partially designed around the AI (cf. my own attempt, Imperium); mostly because, in addition to the balance between "realism vs gameplay" that is often claimed, there is also the balance of "AI vs gameplay" to be considered. "Cool" gameplay ideas can easily defeat the work of even the best AI programmers by producing mathematically intractable problems.
If I understand CCB correctly, then single player is not the focus of the design, but these are still things you need to keep in mind while working on the game if you want to include an AI. Some comments below:
quote: One, and this was an idea I embraced whole heartedly early on, is to give the AI a simplified rules set to operate from.
Players love choices. The more the better.
AI's don't tend to cope well with so many choices, so by streamlining the AI's rule set, we limit the number of choices they have to make, and thus, limit their ability to make foolhardy mistakes. |
This only works if the Game design itself allows the limitation of gameplay to a few options - in which case your game design probably has a problem (i.e., if you have lots of actions but only a few of them make sense). If this is not the case (i.e., there are lots of good actions but the AI uses a narrow set of them), then the players are going to walk all over your rule-based AI.
In general, a rule-based AI can be lean and mean only if the game design is lean and mean as well (i.e., something slightly more complex than tic-tac-toe). In all other cases, it will either be monstrously complex, or nothing but a stumbling block for a half-competent player.
quote: Would it not be possible then, to creat a Predatory AI whose goals were survival and reproduction, and turn him loose on the player? |
Although you start by referring to flocking, I think your thoughts here range more towards genetic algorithms. Genetic algorithms are a very interesting field, but - unfortunately - probably not all that useful for complex turn-based strategy games of this type. GAs are great for small intelligent agents, where the cause and effect are very easy to understand. The trick is to determine "genetic fitness"; i.e., when is the AI being success, and then to determine how to crossbreed "fit" AIs in order to improve the "breed".
This is fairly easy for something like a FPS, for instance, since the "fitness" is determined easily by number of kills/number of deaths, and the number of viable strategies are rather limited. In a strategy game like CCB, however, you have the problem: 1) How do you determine "fitness"? In the face of uncertainty in the game, winning alone is hardly sufficient. 2) How do you cover all the possible strategies? You could spend years evolving an AI for the game, only to see it taken down because its "DNA" failed to take into account some silly little strategy that was not included in the ancestor AIs.
What Bladerunner and Dale are on about in the last couple of posts relates to Hierarchial AIs. This seems to be quite popular these days (I'm doing something similar myself for Imperium); simply because they - in theory - allow you to break down a big and complex problem into a small and tractable one. How well this actually works is another matter.
There is a quite nice discussion about this as well as strategic dispositions archived on the GameAI page.
Of course, the rest of the gameAI page is also an excellent ressource on game AI.
Finally, AIWisdom.com is an excellent and extensive catalogue of game AI articles.
Hope this helps. Building a competitive AI is probably the hardest part of developing a computer strategy game - one reason who most games have pretty lame AIs (the other being that graphics sell more than a good AI).
A thought: assuming you are focusing primarily on the multi-player aspect of the game, it might be worth considering leaving the AI parts entirely alone until everything else in the game is completed. It may be better to have people complain about something that doesn't exist, rather than having them slate the game over an AI that wasn't intended to be "taken seriously" in the first place.
|
|
|  |
 |
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:36
|
|
I agree with the coders out there. In Clash, we use a hierarchical ai (though it's not full fledged):
Each civ has a military ai and a policies ai.
The military ai has several sub ai's (plans) each in cgarge of an objective (typically attack, defense), and the main ai decides how many resources should go to which sub plan. Each sub ai manages task forces and gives them objectives. Each unit is assigned to a task force by the sub plan that got the unit. Knowing that there's a list of awaited reinforcements which help dispatch units to the good task forces.
About buildings, we don't have them in Clash, and the tech tree is still too limited to need an ai. However, you can probably make choices easily with f.e. two main plans, one sinner and one religious (or more), and each one bids for a building to be built. The important is that bidding: You must evaluate whether following your strategy will yield good results. If it doesn't, then you should switch to plan B. That evaluation is what drives evolutionary algorithms by the way.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:36. Apolyton Time is 00:36. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|