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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old November 15th, 2004, 07:49 AM

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 Bug-like Battle AI behavior

A very nasty thinhg just occurs to me : my Caelian army (10 so Seraphs, a couple Mammoths, 20 or so archers) gets attacked by Niefelheim Jotun - 20-30 various giants, amongst them a couple Niefel Gts, and a Niefel Jarl.
Jotun has a Nat-9 blessing, and the N Jarl is a SC type, with some equipment : Wraith Sword, Boots of Flying mainly.

Battle starts, Caelian mages are all set to LB/OL after a WG and Mistform, Jotun troops gets mauled and mostly routs, except the Niefels.
The Niefels battles the Mammoths, eventually get killed, except the Jarl, who gets berserk. Turn is now 6+, scripts are over and battle AI casts mostly P Wolves for my Seraphs.

Jotunheim routs, the remaining giants flee, except the Jarl - he is berserk and happily fight the Mammoths and the archers.
From that point on and for 10-some turns, the Seraphs *only* targeted the fleeing giants, even the Wolves chased them, and no one bothered of the Jarl that killed everyone, flying from seraph to seraph after slaughtering the troops and cutting them with his Wraith Sword !!
Caelians didn't flee either, all were killed, and battle ended only with the N Jarl remainign, a Jotun victory...

While I'm not sure the Seraphs could have killed the Jarl - OL could have done it, but not sure-, it's VERY frustating to see they didn't even react to him !

Did someone else experiment this - ie a "winning" army disregarding berserk remaining enemies to eventually lose to them ?
Reply With Quote
  #2  
Old November 15th, 2004, 08:23 AM
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

I cannot recall a similar instance involving a berserked unit, but I do recall many dead seraphs which must have said the famous Last words "Look, let us do some target practice with those easy fugitives!"

Sometimes it is good that fleeing targets are pursued and that a single unit is ignored in favour of a mass of troops (I dont want my enemies to preserve their troops); sometimes it is plain bad (e.g. fleeing hydras or berserked SCs).

Let's hope that the Battle AI gets improved with Dom3. Choosing targets should always be somewhat erratic and dependant on vision, but the choice-propabilities should also be influenced by certain cirumstance (berserking units shold get more attention since they are easier to spot while raging; same holds for large units; I would also suggest that the number of units killed in meele should increase the attention a unit gets, but not so for ranged attacks, since it is not easy to track the person responsible).
Reply With Quote
  #3  
Old November 15th, 2004, 11:30 AM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: Bug-like Battle AI behavior

Chazar: You might want to put that to the Dom3 Wishlist -thread. You could also come up with more rules for targetting, I believe that Illwinter appreciates *anything* that is more defined than simple "I want"...

Not that my Posts to that thread were much better, though!
Reply With Quote
  #4  
Old November 15th, 2004, 11:47 AM

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

Whether it's for Dom2,3 or 4 , and whatever the circumstances I'd like to see battle AI routines reacting to "most powerful threat" rather than some other mechanism making them slaughter harmless units while getting slaughtered by others ...
Reply With Quote
  #5  
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
  #6  
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
  #7  
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
  #8  
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
  #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
  #10  
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
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 07:21 AM.


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