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

This Month's Specials

BCT Commander- Save $6.00
World Supremacy- Save $10.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old November 15th, 2004, 12:09 PM
Chazar's Avatar

Chazar Chazar is offline
Captain
 
Join Date: Feb 2004
Location: within 200km of Ulm
Posts: 919
Thanks: 27
Thanked 0 Times in 0 Posts
Chazar is on a distinguished road
Default Re: Bug-like Battle AI behavior

[*]Endoperez:
Hmm, maybe, but the wishlist threat is pretty overcrowded and all I have are some vague ideas. Now that we have this, why dont we elaborate on this topic further and then post it to the wishlist thread?
[*]PDF:
Sure, but what is the perfect yet still implementable algorithm to determine "the most powerful threat" as perceived by most players under all imaginable cirumstances?
Reply With Quote
  #2  
Old November 15th, 2004, 12:52 PM
Kristoffer O's Avatar

Kristoffer O Kristoffer O is offline
General
 
Join Date: Aug 2003
Location: Sweden
Posts: 4,463
Thanks: 25
Thanked 92 Times in 43 Posts
Kristoffer O is on a distinguished road
Default Re: Bug-like Battle AI behavior

PDF: perhaps the Jarl was protected from lightning. Killing fleing giants might be better than shooting at an immune target. If thats not it I'm at a loss.
__________________
www.illwinter.com
Reply With Quote
  #3  
Old November 15th, 2004, 12:58 PM

PDF PDF is offline
Colonel
 
Join Date: Apr 2002
Location: Near Paris, France
Posts: 1,566
Thanks: 0
Thanked 0 Times in 0 Posts
PDF is on a distinguished road
Default Re: Bug-like Battle AI behavior

Quote:
Kristoffer O said:
PDF: perhaps the Jarl was protected from lightning. Killing fleing giants might be better than shooting at an immune target. If thats not it I'm at a loss.
IIRC he wasn't (I'll check though). But even if he was I don't understand why even the Wolves didn't go at him, or why the Seraphs didn't try False Fetters against him (they did against the other Niefels before).

Chazar,
Sure I don't have the algorithm, but sure also ANY fighting unit (and certainly an equipped berzerk Niefel !) at 5 squares is more threatening than routers 20 squares across ...
Reply With Quote
  #4  
Old November 15th, 2004, 01:12 PM
Alneyan's Avatar

Alneyan Alneyan is offline
General
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 3,603
Thanks: 0
Thanked 22 Times in 22 Posts
Alneyan is on a distinguished road
Default Re: Bug-like Battle AI behavior

I believe he was Shock Resistant, from what I recall reading about this battle (it would make sense too).

Why they didn't try other spells is another matter, which does not seem to make much sense. Could it be because the AI treats the whole enemy army as "threatless" once they start routing, despite the presence of Berserkers, and hence start firing everyone since nobody should be a danger?
Reply With Quote
  #5  
Old November 15th, 2004, 01:39 PM
Chazar's Avatar

Chazar Chazar is offline
Captain
 
Join Date: Feb 2004
Location: within 200km of Ulm
Posts: 919
Thanks: 27
Thanked 0 Times in 0 Posts
Chazar is on a distinguished road
Default Re: Bug-like Battle AI behavior

Quote:
PDF said:
Chazar,
Sure I don't have the algorithm, but sure also ANY fighting unit (and certainly an equipped berzerk Niefel !) at 5 squares is more threatening than routers 20 squares across ...
I disagree:
Consider a single militia man, gone berserk by spell, which was in his own squad, put on a rear flank with "hold and attack rearmost". Now the battle is almost over, the wounded enemy masses are fleeing into a friendly province just to heal, regroup and attack again, but your heavy infantry which has advanced to the other end of the battlefield (since it was ordered to attack archers) could easily dispatch those fleeing units. But instead, they let those fleeing units unharmed and chase after that single militia man, which they wont even reach in time!

I would rather have my infantry finish of those fleeing units, or at least I would want some of them to chase the militia man, but certainly not all of them! Different circumstances should really matter (including distance as you have already pointed out), hence my suggestion below!
Reply With Quote
  #6  
Old November 15th, 2004, 01:56 PM

PDF PDF is offline
Colonel
 
Join Date: Apr 2002
Location: Near Paris, France
Posts: 1,566
Thanks: 0
Thanked 0 Times in 0 Posts
PDF is on a distinguished road
Default Re: Bug-like Battle AI behavior

Quote:
Chazar said:
Quote:
PDF said:
Chazar,
Sure I don't have the algorithm, but sure also ANY fighting unit (and certainly an equipped berzerk Niefel !) at 5 squares is more threatening than routers 20 squares across ...
I disagree:
Consider a single militia man, gone berserk by spell, which was in his own squad, put on a rear flank with "hold and attack rearmost". Now the battle is almost over, the wounded enemy masses are fleeing into a friendly province just to heal, regroup and attack again, but your heavy infantry which has advanced to the other end of the battlefield (since it was ordered to attack archers) could easily dispatch those fleeing units. But instead, they let those fleeing units unharmed and chase after that single militia man, which they wont even reach in time!

I would rather have my infantry finish of those fleeing units, or at least I would want some of them to chase the militia man, but certainly not all of them! Different circumstances should really matter (including distance as you have already pointed out), hence my suggestion below!
Bah, you're taking an extreme example to show that dealing with a real threat, but a very feeble one, can be sub-optimal. Yes it is !
To be more precise I agree that the AI should only dispatch forces proportionate to a threat, not necessarily all the army vs "the" main threat. Else everyone would gang up against 1 unit/group..
But anyway I'd still prefer that to seeing a whole army destroyed by *not* dealing with a very potent threat !
Reply With Quote
  #7  
Old November 15th, 2004, 03:50 PM
Chazar's Avatar

Chazar Chazar is offline
Captain
 
Join Date: Feb 2004
Location: within 200km of Ulm
Posts: 919
Thanks: 27
Thanked 0 Times in 0 Posts
Chazar is on a distinguished road
Default Re: Bug-like Battle AI behavior

PDF: I am not disagreeing with you, all I say is that it might be pretty difficult to make the AI behave in the way you desire...
Reply With Quote
  #8  
Old November 16th, 2004, 04:47 PM

Pocus Pocus is offline
Lieutenant Colonel
 
Join Date: Apr 2003
Location: Nuts-Land, counting them.
Posts: 1,329
Thanks: 1
Thanked 0 Times in 0 Posts
Pocus is on a distinguished road
Default Re: Bug-like Battle AI behavior

a 'potency' (threat in this case) parameter have not to just take into account what is the current status of the unit (routing, or being a badass Niefel berseked), it can also use a memory of what the unit did, by counting the gold/gem value of units killed by this threat. For example, as soon as the Niefel start to kill Seraphs, his threat value would go through the roof, and he would be targetted again by the seraphs?
just my two eurocents.
__________________
Currently playing: Dominions III, Civilization IV, Ageod American Civil War.
Reply With Quote
  #9  
Old November 15th, 2004, 01:23 PM
Chazar's Avatar

Chazar Chazar is offline
Captain
 
Join Date: Feb 2004
Location: within 200km of Ulm
Posts: 919
Thanks: 27
Thanked 0 Times in 0 Posts
Chazar is on a distinguished road
Default Improving the Battle AI behavior

Ok, what I would like to see is some thematic rules for AI targetting. Let me focus on spellcasting targeting first, since I would assume that meele targeting is mostly a subset of this (meele-attacks might be considered similar to low-fatigue short-range damaging spells doing ordinary damage).

The basic problem would be whether to choose a spell or a target first. How does the AI resolve that now? It would be helpful to built on top of the existing system...

Addressing the problem right now, I would propose as a base for discussion to order all enemies by the threat they propose, then choosing an appropriate spell for each enemy (or the first ten threats) and then considering the product of threat rating and estimated spell-effectiveness.

Ordering enemies by the threat they pose:
  • Visibility: This should be the major factor of target selection.
    I can hardly estimate the threat of something that I cannot see; it also rewards clever tactical placement of units and it naturally encourages targeting of units that are closer to the caster (thus addressing the original target-retreating-units issue).

    Determining visibility:
    - Sum of Sizes of units on the direct line of sight. The size of the target and the unit doing the targeting should affect the values added to this sum, i.e. a couple of hoburgs between two dragons should not count very much.
    - Auras and Mists should affect visibility. A unit with a fire shield is easier to spot, while a unit with a fire shield hides units behind it much more easily. Maybe each such aura-effect should simply increase size to the sum-of-sizes-calculation.
    - Flight: Unit that actually were in air during that round should be easier to spot and should not obstruct sight at all. A flying unit should have better sight if it is considered flying during that (or the Last) round.
  • Deathcount:The number of units either killed or made fleeing by a creature. I think that this is indeed the major factor which makes me perceive a unit as dangerous. The number of killed units seems to be available anyway, so it should be used here as well.

    It might be questionable how a unit knows how many units another one has killed so far, but we need some simple value to determine strength, and this one seems simple and appropriate, sind it naturally encompasses specific circumstances. Strength, for example, is even harder to spot and not a really good measure!

    I also like that the strength of the defeated number shall play no role here: Of course, some SC's battling each other will have a smaller bodycount and hence less priority than an elephant trampling hordes of hoburgs, but I feel that the elephant would righteously look more dreadful in such a case to me!

    Of course, this will also make havoc-spreading mages to be of top priority, but this is ok, since large-area spell effects are easy to spot and easy to recognize as lethal if they indeed are. However I assume again that poor visibiliy will usually protect these mages from always ending up as the choosen target.

    The deathblow might however be dealt by simple milita man which was just standing next to his worhsipped pretender-dragon helping him. Thus instead of a bodycount, I would rather prefer the sum of damage dealt and moral loss inflicted.
  • Command: Of course, the tactical command should be a major factor. If a player sets targeting to 'flyers', those should gain a big increase in their threat rating, but it should not override visibility completely (if there is a single flyer somewhere in the back, it should not be the automatic target!)
  • Distribution and Friendly Fire: Each friendly unit that has already targetted that creature should decrease its priority somewhat. Any friendly unit that already caused some damage within that round should correspond to a somewhat higher decrease in priority.
  • Fear & Berserking: Fear & Berserkers should also be a direct factor in estimating the threat of a unit, however this is dangerous, since the number of units sent fleeing is already counted and likely much higher for units having fear. Nevertheless, a rampaging or fear spreading unit should appear a bit more menacing than another unit which has achieved the same bodycount, although the non-berserker or non-fear-spreade is actually much stronger game-wise, but normal killing simply doesnt get as much attention...
  • Steadiness: Units should continue to pursue their current foe instead of indecisevly moving between targets. So previouly targeted unit should receive a slight increase in priority. This shall also cause units to pursue fleeing units somewhat, but it should be less than the visibility loss of several squares, so that fleeing units are not pursued if there are equally dangerous units closer by than a turn's move. This might also help light cav to wreak more havoc once it penetrated the main battle lines...
  • Experience: As usual, the threat list should be randomized a bit for several reasons. However, an experienced unit should judge the threat of an enemy much better than a novice, hence the random-range should decrease with the number of experience points.

So, that are my naive ideas how I would address the target choosing-problem. I have no idea whether that would indeed lead to sensible system, or whether it might cause units to indecisevly move back and forward. If have also no ideas about the specific weights one should attach to each factor. Comments!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 04:33 AM.


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