.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Star and the Crescent- Save $8.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old May 11th, 2004, 02:02 PM
tinkthank's Avatar

tinkthank tinkthank is offline
Lieutenant Colonel
 
Join Date: Jan 2004
Posts: 1,276
Thanks: 0
Thanked 2 Times in 2 Posts
tinkthank is on a distinguished road
Default Strategic vs. Tactical AI

There has been a lot of debate recently about AI, alleged AI deficiencies and possible AI improvements.

Although much of the discussion was nothing more than value judgement ("tastes great!" "less filling!") and causes some of the very good ideas (such as Arralen's interesting threads) to get, perhaps, overseen, one thing seems to have become a bit undifferentiated: the difference between strategic and tactical AI, or AI calculations used in strategic and in tactical usage.

It seems to me that a lot of the recent discussion about the lack of AI quality has been addressing the strategic AI -- that AI which makes a computer play a nation in a clever, efficient manner: by setting good goals to reach and implementing the means to produce them. I think Arralen has addressed two key issues which both have to do with this area of the AI.

I call it "strategic", because it affects the way the computer carries out goals which will enable it to act as a human carrying out the main goal of winning the game. It is strategic AI, I think, which makes up a large portion of that which enables a person to have both a satisfying challenge and a worthy opponent in SP experience, whereby lots can be done, as people like mlepinski have pointed out, to enhance the SP experience without changing the strategic AI.

Although I dislike the tone used by many who "complain" about the alleged lack of "good AI", I also feel that the *strategic AI* could be optimized (or: made even better than it already is), and that Arralen has put his or her finger on some ways of being able to do that. (Whether his algorithm ideas can be implemented is another question entirely.)

But there is one other area which affects our gameplay and involves AI, and this I would call "tactical AI", since it chooses which actions are implemented during battles, such as movement of individual troops, targeting, spellcasting, retreating, etc. There have also been lots of cries to have *this* AI improved, whereby (to my knowledge) no one has actually been able to say *how* (that is: no concrete solutions to the strategic AI improvement a la Arralen). Instead, there have been many suggestions for improving the way the AI should deal with our wishes, such as toggles for spells which should not be cast, etc.

It has been said that the AI can not (reasonably) be improved because of the sheer complexity of things between which it must choose. DomII is not like Chess.
The point of my ramble so far is this: I think this can be truthfully said of many aspects of the "tactical" AI (sure, one could optimize the tactical AI even more, but at what cost?), but that the "strategic" AI might benefit from a troop-building, castle-building, and attack-a-province calculus quite a lot. Would those things be actually hard to write and test?

One more question: I would like to ask whether the tactical AI also takes into account target analysis, for example: if there is only one valid target, and this target has the property (say) "immobile", then greatly lower the priority of casting movement-inhibiting spells on it. I don't know how this AI works, but it does often seem to choose spells against which the target is either immune or unfitting.
Reply With Quote
  #2  
Old May 11th, 2004, 02:15 PM

proteus proteus is offline
BANNED USER
 
Join Date: May 2004
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
proteus is on a distinguished road
Default Re: Strategic vs. Tactical AI

Strategic AI:
-Building troops
-Building castles/temples
-Searching
-Researching
-Making magic items
-Summoning
-Moving armies
-Making items & equipping heroes/leaders
-Supercombattants! [I've never seens SCs controlled by the AI.]
etc.

Tactical AI:
The tactical aI IMO is the core "battlefield AI".
-Fielding troops
-Battlefield tactics
-Spellcasting AI

I think, that the strategic AI what needs to be improved, the tactical AI is not that bad! Sure the AI should use more battlefield tactics etc, but the problems of the strategic AI are lot bigger.

Important note. Mr. Parker was right, this is a very complicated game, so we cannot compare it to anything else. Still, the majoirty of the troops/spells are sorta useless/weak, so the AI should be scripted to use the more important spells/troops ONLY.
I guess that would be easier to code as well.
Reply With Quote
  #3  
Old May 11th, 2004, 02:25 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Strategic vs. Tactical AI

Quote:
Originally posted by proteus:
Important note. Mr. Parker was right, this is a very complicated game, so we cannot compare it to anything else.
It would be easier to write a good AI for chess than to write one for this game. (and how long have AI experts been trying to do that?) All we can hope for are some improvements. I dont think we can get a good player. In fact sensible moves would make it easier to beat.

The base comparison is an AI which is completely random. People want to improve that by giving it sensible moves. But sensible moves can be guessed by a human player which might make the AI less frustrating but not harder to beat.


Quote:
Still, the majoirty of the troops/spells are sorta useless/weak, so the AI should be scripted to use the more important spells/troops ONLY.
I guess that would be easier to code as well.
What are you playing? Ulm? Do you win alot with it? Do you lose alot playing races like Caelum, or Jotun? Or Pangaea? I think you might find you are ignoring those "weak" troops/spells when playing those.

If that were true that the majority of troops/spells were weak then the AI would be easy to program. Just limit it to the "good" choices. Please, come up with your list of good spells and units. I think we would find that it would be a list good for only 1 or 2 nations, and too easily beat if even those nations stuck to it.

[ May 11, 2004, 13:26: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #4  
Old May 11th, 2004, 02:59 PM

Tris Tris is offline
Corporal
 
Join Date: Apr 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Tris is on a distinguished road
Default Re: Strategic vs. Tactical AI

Theory:

(Examples in brackets)

Good human players pursue a strategy.

(Kill the players nearest me by pushing directly on their capital to create expansion room.)

It is possible to summarise this strategy, at the cost of some detail and effectiveness.

(Buy expensive troops and send spies to find enemy capital, send expensive troops straight there.)

Several such strategies might exist for each nation. By randomly picking one when it knew which nation it was playing the AI would have variety and competance, to a degree.

You would not know if the AI was going to try to rush your capital, push your dominion, research for a specific spell/spell combo/summon...

It could also switch given certain conditions (eg if you don't find an enemy castle within 7 turns, switch to random other strategy for this nation)
Reply With Quote
  #5  
Old May 11th, 2004, 03:46 PM

proteus proteus is offline
BANNED USER
 
Join Date: May 2004
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
proteus is on a distinguished road
Default Re: Strategic vs. Tactical AI

Nop, I am never playing Ulm.
I think you've got some point again Mr. Parker.
It is too simple to say things like this..
eh my post was a little far away from 'detailed'.
Well I was subjective as well. Iam never using light infantry for example, maybe others do.
Also I found lot spells not worth to cast, thus I am never using them. I am operating with my favourite spells all the time, and they are working great. However those are specific strategies, I dont think that it is a way for the AI...well maybe, but than the AI personalities/race specific strategies coming in, what would be hellish hard to code I guess.

[ May 11, 2004, 14:47: Message edited by: proteus ]
Reply With Quote
  #6  
Old May 11th, 2004, 04:45 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Strategic vs. Tactical AI

Tris: interesting breakdown. Im not sure how it would be done for this game without alot of rewrite.

For the standard player tactic to be available for the AI it would need to build scouts and send them out. But sending them "out" would need some code for selecting provinces.

Then if the scout finds someone the army would need to do the same thing. And to do it intelligently would mean wavering to go around difficult provinces, but not too wide from the course.

Then we are back to having different nations using different tactics. For Caelum to use this tactic well would mean recognizing that they can choose provinces without having to take them in a direct walk (they can fly over hard provinces). For Pangaea to avoid doing a "stupid AI" thing they would need to realize that they can march straight there without taking any of the provinces in between. For either Caelum or Pangaea to do it in an Ulm fashion would be stupid and weakening to them.

Random wandering of scouts and armies might still have a better "score". Yes it makes it easy to campaign against them, and makes it hard for the AI to win the game, but intelligent choices by the AI would be even easier to beat.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #7  
Old May 13th, 2004, 09:42 AM

Tris Tris is offline
Corporal
 
Join Date: Apr 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Tris is on a distinguished road
Default Re: Strategic vs. Tactical AI

Grrrr.... you're too smart for my ideas own good, Mr Parker :-)

I see your point. There would be problems implementing some of the behaviour desirable in following the strategies. I did specify the strategies could be chosen from a pool set for that nation.

A few (non ideal, but hopefully useful, behaviour patterns:

Scout Behaviour - look at all adjacent provinces. Try to move further from your own capital, favouring enemy territories over neutral ones.

Army Behaviour - (if you have a 60% or better chance of beating the largest army your scout has found)

(If not entirely stealthy army)
Look at shortest route to enemy castle. Look at all routes which take up to 20% longer (eg if shortest route is 5, look at all 5 or 6 province routes) Rate according to strength of strongest province. Go via route with lowest high-strength province.

Well, you get the idea. An alternate (and perhaps less predictable) method is to assign "desire values" to each action an army can take, giving each some random weighting, then acting on most desirable. This would let the AI switch between strategies on the fly, expanding its holdings early on, and if it spotted a weak enemy capital close by, sending an army at it.

Eg
If enemy castle found and within 5 turns then desire{push towards castle} = %chance of beating strongest enemy army/10.

If limiting factor on troop deployment at capital is gold then desire{take province} = (gold income of province/20)*chance of winning vs defenders.

and so on. Ok, this would be hard to implement :-) I wish I was an expert programmer - I'd offer my help. As it is

10 print "Tris is cool"
20 goto 10

is about the limit of my coding ability.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:40 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.