.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 3: The Awakening

Reply
 
Thread Tools Display Modes
  #11  
Old October 4th, 2010, 01:07 PM

Muse Muse is offline
Corporal
 
Join Date: Jul 2010
Posts: 62
Thanks: 2
Thanked 1 Time in 1 Post
Muse is on a distinguished road
Default Re: Battle AI hooks

Quote:
Originally Posted by WraithLord View Post
edit: another caveat of this suggestion is that it doesn't take into acct the circumstances. i.e a whole different set of spells are required when the mage is on:
a- support role (i.e. please buff my soldiers)
b- mass kill (i.e. fireball those militias)
c- eliminate elites (i.e. put that SC to sleep/charm/frozen heart etc)
It may be possible to assign a category to each spell, then utilize the current script of the mage to determine which category the mage is expected to cast post-script.
Perhaps the category of the last spell scripted is given higher priority weight.

Though, this does run the risk of reducing the delicious quirkiness of the AI-- it may be useful to add an On/Off toggle, default to Off, for such a feature. Thus modders can control the 'Obedience Level' of a particular mage.

Last edited by Muse; October 4th, 2010 at 01:15 PM..
Reply With Quote
  #12  
Old October 4th, 2010, 01:13 PM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: Battle AI hooks

yes, or just add a sixth slot to script with role, something like:
spell1,...,spell5,anti-SC
or
spell1,...,spell5,buffer
etc.
Reply With Quote
  #13  
Old October 4th, 2010, 01:24 PM

Muse Muse is offline
Corporal
 
Join Date: Jul 2010
Posts: 62
Thanks: 2
Thanked 1 Time in 1 Post
Muse is on a distinguished road
Default Re: Battle AI hooks

Quote:
Originally Posted by WraithLord View Post
yes, or just add a sixth slot to script with role, something like:
spell1,...,spell5,anti-SC
or
spell1,...,spell5,buffer
etc.
I'm uncertain-- there is a finesse to positioning, equipping, and scripting mages to gain the desired effect.
An overt behavior-directing addition would take a bit of the cleverness out of it. (And a significant portion of the entertaining 'AI Manipulation' skill requirement.)

A larger project that may preserve such an element would most likely involve: multiple categories per spell, algorithm for determining weights from script, mage-personality modifier.
As a side note: While 'mage personalities' may be somewhat thematic, they may also serve to 'lock' a particular faction into playing a certain way, reducing tactical diversity.

Dominions has an appeal partially stemming from the semi-organic unfolding of battle events due to the complex AI structure.
A good bit of fun is had from SP testing, in chaos theory fashion, to find the most optimal starting arrangement.

Last edited by Muse; October 4th, 2010 at 01:52 PM..
Reply With Quote
  #14  
Old October 4th, 2010, 03:01 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: Battle AI hooks

The problem with assigning roles is that there would never be agreement on it. And to get it totally good for most of the players would involve way too long a list of IF statements. The hosting would take forever.

Even now, the AIs recognition of SCs is continually questioned (the AI sending gods to war and to the arena)
Reply With Quote
  #15  
Old October 4th, 2010, 05:22 PM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: Battle AI hooks

I think the AI is clueless when it comes to SCs. It doesn't recognize them, it can't build, equip or script them and its certainly unable to counter them. SCs would have been seriosly toned down as well as MM hell of nurturing them (equipment, scripting etc) if the (friendly) AI had a clue what they are and how to counter them (by making sure your mages cast the anti-SC spells and not some junk that fatigues them until they pass out).

Even if you manually script a bunch of N mages to charmX5 and face the enemy's SC on holdX5 (out of range) you're likely to lose all your mages due to that limitation of the AI. In-fact however you'd script your mages you'll most likely lose them in said scenario.
Reply With Quote
  #16  
Old October 4th, 2010, 06:21 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: Battle AI hooks

Its not clueless. Not great, but not clueless.
The computer players common complaint "sending god sto war and arena" is definitely mitigated by not giving it an SC god.

The AI for both player and computer, does make decisions based on who its combating despite the complaints. But recognitions are general such as scout, infantry, cavalry, archer, mage, priest, assassin, seducer, thug, SC. There wasnt room for tons of IF statements defining things further. Most of the complaints about what the AI casts, purchases, etc are based on wanting IF's

The problem there is that hosting would take a day. Which is something I voted for.
Reply With Quote
  #17  
Old October 5th, 2010, 02:54 AM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: Battle AI hooks

The source code is in C or C++ right?- If so, there are optimizations for compound IF statements that the compiler can do when writing the assembly code. Also, IIRC the dev can "help" the compiler optimize by keeping to certain forms. I don't recall the details as my course on this was 12 years ago and I'm not doing this as common practice.

Anyway, lots of IFs shouldn't have such an impact on performance. It's usually IO and blocking threads that kill performance - both not relevant to turn processing.
Reply With Quote
  #18  
Old October 5th, 2010, 04:39 AM

fantasma fantasma is offline
Corporal
 
Join Date: Feb 2008
Posts: 150
Thanks: 0
Thanked 10 Times in 9 Posts
fantasma is on a distinguished road
Default Re: Battle AI hooks

I doubt the AI uses a lot of ifs, it rather assigns priorities given circumstances and then takes the one with the best result.

Given that, whatever was suggested can be done by applying a high bonus to single target kill spells when facing one strong opponent. To a certain extent this appears to be implemented. The issue is finding the correct weighting. My suggestions for the two mod commands could address many problems.

Now, please, don't mix the tactical AI with the strategic AI (the one that does the turns for AI players), since they don't have much to do with each other. The AI is not aware of a concept like thug or SC. He does not try to optimise a build for MR, protection or defense, give it AOE attacks and necessary resistances while trying to stay economic. This part is simply missing in the AI code, unfortunately, As is the contrary, how to specifically create a task force to deal with deliberate opponents. Now, this is a completely different cup of tea, where even many human players struggle, and is far from trivial to implement at this stage of development.
Reply With Quote
  #19  
Old October 5th, 2010, 08:33 AM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: Battle AI hooks

I've seen little evidence to suggest that the tactical AI is any better than the strat. AI when it comes to thugs and SCs.
The tact. AI doesn't know to script and deploy them so much so as it doen't know what spells to cast in order to stop them.

Now, I'm not looking for perfection here but you know the Pareto principle?- Some measure to let the AI or us (modders) have the means to make some rough improvements.

Example: plant these hooks I was talking about and expose them to us.
Example: Add mod commands for including categories/tags/weights to spells.
Example: Add to AI rough "behavioral" guidelines so you could script mages as I suggested.
Reply With Quote
  #20  
Old October 5th, 2010, 09:05 AM

fantasma fantasma is offline
Corporal
 
Join Date: Feb 2008
Posts: 150
Thanks: 0
Thanked 10 Times in 9 Posts
fantasma is on a distinguished road
Default Re: Battle AI hooks

Oh, sure, it would be nice to add the hooks, but I was trying to suggest something more close to the existing code to keep it realistic.

I do agree that the tactical AI could do better at finding specific weaknesses to exploit and not committing suicide with invulnerability in a poison environment, etc.

I am not so sure I like your AI behaviour, not so much for its usefulness but rather for flavour.
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 11:59 PM.


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