AI Ideas

DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #16
There is some good stuff here, but I think I have to clarify a few things.

First of all, I was strictly thinking of this hierarchical model for the computer opponent. The player could be given the option to control the units in the classical way, or to introduce commander units and the likes, who would carry out more general orders than "move to x,y", but rather "see what's going on at x,y and do what you think necessary". The player would take the position of all virtual AIs (eg AIs which are not actual units on a map). But, some cool things, such as supply or strategy advisors would be trivial to implement, as they simply have to be fed with info just as if they were part of the NPC.

Second, things like pathfinding (which will most certainly not be the most difficult task here) are not really specific to any one AI type, and so would be implemented generally, and only be fed for specific info of a tank or foot soldier. Though, the AI might get the possibility of evaluating the path considering thing such as the enemy's position, too. It could simply mark areas of terrain as "not preferred" and tell the pathfinder to find a different path. Of course, it doesn't have to be this simple.

Third, I have not even considering a learning AI, although it would surely make the game fun, especially if you were given the ability to keep your units from game to game. It would like petting your monster in B&W. If the AI should learn, we would need some kind of genetic algorithm, i guess, which is not trivial to implement. But if it was possible to come up with a general learning algorithm, it is not far to say that each unit could be promoted (not by changing its behavior, but putting it into a different place in the chain of command), and eventually take over the whole army if he becomes smart enough.

This learning thing would be cool, imagine you could train your soldiers like you level up in an RPG. Maybe this would even give us the possibility to give our soldiers new weapons, and they would eventually learn how to use them best, or they could learn how to drive a tank. Also, after you train a unit, it might be made available for production as an AI clone, with proportional cost to the training time. This would mean that if you find a faster way to train your units, they will be cheaper! There is the possibility for a lot of individualism, which might infer with online playing though. There would not be the possibility to make a master server, as the AIs are local. This is not necessarily bad, just something unusual.

Anyhow, some priorites must be hard coded, such as that the soldier must obey a given command, otherwise they could run amok.

Also, I must stress that my focus is a bottom-up approach, where individuals can only do simple tasks and are practically useless on their own, but perform meaningful, maybe even smart, actions when working together.

- D.G
Quote this message in a reply
Founder
Posts: 1,139
Joined: 2002.04
Post: #17
Ok, the link below is NOT to the AI paper I mentioned that talks about what you brought up, however there some interesting things that he says..

Read on..

http://www.jlc.net/~bhough/Article2.html

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
Founder
Posts: 1,139
Joined: 2002.04
Post: #18
Ah.. now after a bit searching....

Hierarchal AI
http://www-cs-students.stanford.edu/~ami...halAI.html

Project AI
I think you can think of his "Levels" as different levels in the military chain.
http://www.geocities.com/SiliconValley/B...rojai.html

AI Engine Design Doc (http://ailoom.sourceforge.net/)
Part of the AI Loom project (Open-Source) It seems like in their design doc, they argue against this hierarchal style approach.
http://ailoom.sourceforge.net/docs/aisystem.html

Hierarchical AI in Clash
Back to what you are thinking of doing
http://home.akademie.de/~DToussaint/clash/clash_ai1.htm

Hierarchal AI (I think this was the paper I referred to in my first post.)
http://www.gamedev.net/reference/article...cle199.asp

Amit's Game Programming page also has a slew of AI links.

As a test. I wonder if you could do this...
Make a grid world. Play capture the flag. The "characters" would be various levels of commands. In this world, the "countries" will need to capture more than one countries flag. So your top character, the general must start the game by barking out orders.... Better to test it on something simple like this. (And would be interesting for us to watch. Grin )

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
Feanor
Unregistered
 
Post: #19
OK, so let me get this straight since I misunderstood what was suggested. Do you want to simulate the actual hierarchy of the military force, by which I mean simulating the various minds in each commander role, or do you want to create a single opponent system, meant to simulate another player, which has a hierarchical design? Or some combination?

Depending on how you look at it the distinction may not matter. If all the A.I. routines have access to the exact same input data, then it really makes no difference.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #20
Quote:Originally posted by Feanor
OK, so let me get this straight since I misunderstood what was suggested. Do you want to simulate the actual hierarchy of the military force, by which I mean simulating the various minds in each commander role, or do you want to create a single opponent system, meant to simulate another player, which has a hierarchical design? Or some combination?

Depending on how you look at it the distinction may not matter. If all the A.I. routines have access to the exact same input data, then it really makes no difference.


I have not interest in simulating the exact military hierarchy, I just thought a similar model would be a good AI.

I want to primarily simulate a computer opponent by creating a bunch of independent AIs which, acting together should behave like a computer opponent. But, there is no reason against treating the AIs as individuals, to give it all an RPG like touch.

- D.G
Quote this message in a reply
Founder
Posts: 1,139
Joined: 2002.04
Post: #21
Perhaps he is striving for this....

Say in Warcraft 2 a village is under attack, the AI will respond accordingly. It knows everything that is going on. Of course the human player does too. (Less any F.O.W.)

In a proposed system, a village comes under attack the local troops take an action based on the local commander's programming. (ie Defend at all costs, Run-away, run-away, Defend until forces are depleted by 1/2, etc) If no message is sent out that they are under attack, they are perhaps doomed. But if commander sends a dispatch to a nearby garrision that they are under attack, perhaps the commander there will decide to offer troops. But he also has orders to hold his garrison (area) so he may not send many troops, or perhaps he will send a dispatch to their Duke asking for orders. (The old pass the buck method.) Duke may decide that the enemy is trying to get him to commit forces to one area which may lead to an opening for a larger force to attack. So what does he do? Perhaps he sends out scouts to evaluate the situation and also sends a dispatch to the King that the western region has been come under attack. King learns of the attack but also knows that a large army from the east is also approaching and is a greater threat and thus acts.

Not sure if I explained that well. Not sure if a hierarchal would make the game more realistic then some "blanket", all-knowing AI in the scheme of things. But it does make things interesting like.... If only your Generals had known where the attack was taking place! Or if only that scout who was about to report a large force advancing hadn't been killed. Or would a local platoon seeing that the village was clean of rebels, decide not to fire bomb it (order of Captain.)

When I think of this topic, one thing that comes to mind is the difference between warfare today and warfare in the past, where it often took much time to convey orders and get reports.

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #22
Quote:Originally posted by Camacho
Perhaps he is striving for this....

...

Not sure if I explained that well. Not sure if a hierarchal would make the game more realistic then some "blanket", all-knowing AI in the scheme of things. But it does make things interesting like.... If only your Generals had known where the attack was taking place! Or if only that scout who was about to report a large force advancing hadn't been killed. Or would a local platoon seeing that the village was clean of rebels, decide not to fire bomb it (order of Captain.)

When I think of this topic, one thing that comes to mind is the difference between warfare today and warfare in the past, where it often took much time to convey orders and get reports.


I dont have a time shifted, realistic messaging in mind, but rather an immediate one, where the messages are only delayed by the time the AI needs to process them. Of course, for a medieval game, messaging could be handled differently, but we could run into problems if the player only sees things time shifted, i think this is a no-brainer.

But, the indivdual units could have a unique FOV like the units in Commandos (darn, how could i forget to mention this game for favourites).

Furthermore, the system would be easily adoptable. For example, if I don't want special FOV then there is no need to implement it, and I parts of the AI (being independent) could be more easily replaced and improved than with some omniviscent AI, where everything is intervowen. It may behave the same is a conventional AI, but would be more easilly adoptable.

- D.G
Quote this message in a reply
Post Reply