![]() |
Re: Battle AI hooks
Quote:
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. |
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. |
Re: Battle AI hooks
Quote:
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. |
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) |
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. |
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. |
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. |
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. |
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. |
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. |
All times are GMT -4. The time now is 04:40 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.