Spellcasting priority for AI

Post Reply
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Spellcasting priority for AI

Post by Alexander82 »

To improve AI it is important to make spellcasters use the right spells at the right moment. To do so we can set into every spell a priority value so that AI will use that spell more than another if conditions are met (e.g. amount of sacrifices or proper targets)

I'd like to know by your experience what are spells AI should use more often that it doesn't.

@Stratego (dev) already changed reanimation to have a higher priority so we should consider improving AI for every caster (included hybrid units and units that have activated abilities such as whirlwind attack or an activated ranged attack).
Age of Fantasy design leader
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Spellcasting priority for AI

Post by Dagravian »

Well, for me passive spells and abilities that grants buffs/debuffs should be used more often...

But i think we should also take note of the conditions of these events, idk if that can be controled by priority only, like for example, how to define the best moment to AI use the sacrifice killer for example? Or why AI doesn't focus buffing one unit with different buffs when this unit owns more than 1 buff already? Or how to make AI use one unit to help one allied unit other than kill one weaker enemy instead?...

For me, we should define weights for events aswell, like lets say that we have a mage that owns 4 spells (healing, fireball, strengthen and disenchant), if we went just to spell priority without knowing the conditions, some spells would still be used in the wrong situations.

So like, a single spell can have many conditions, and the sum of these conditions should be the weight of priority imo.
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Spellcasting priority for AI

Post by Alexander82 »

that would be great but I think that's something that only @Stratego (dev) can do
Age of Fantasy design leader
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Spellcasting priority for AI

Post by Stratego (dev) »

yes AI have many problems making it "dumb" but - guess what i receive daily complaints AI being too clever already :)
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Spellcasting priority for AI

Post by Dagravian »

You probably own a list of ideas of how to improve AI already, but well, probably its time to put some on them into action xD

Btw, AI is not dumb, it does perfectly what it is meant to do, the thing is that it lacks stuff as personality and a better sense of judgement, which the second can be provided by newer conditions... Btw, for personality i would like to put for example, the recent C&C games (that is not that recent tho... XD), you can choose AI dificulty (easy, medium, hard, etc) and personality (balanced, cautious, streamroller, guerrilla, turtle, etc).

While Dificulty imputs how easy it would be for AI to achieve the victory... The dificulty ends allowing to AI some augments that aren't avaliable to the user, as cheaper production and augmented units, stuff that makes you end seeing it as: Very hard for the player = Very easy for the AI, Hard for Player = Easy for AI, Medium = Medium, Easy = hard...

The personality will state the characteristics of this AI... It evaluates how is the best way to treat its units inside these characteristics so they can achieve the victory for it priorizing the conditions settled for it.

~~~~~~~~~~~~~~~~~~

For example, a Balanced AI, would be the current one, but ofc, tunned up with improved conditions.

On a Cautious AI, the first units that would take actions on its turn would be support ones. Also, it will priorize the safety of its units, so if it has a severely wounded unit, it would make this unit retreat to the nearest owned TC to heal/buff when it reaches like, less than <25% of maxHP or <50% *depending of the unit category*... And if a woulded allied unit is on sight of one woulded enemy, the allied unit would not advance to the nearest enemy unit, but would search for healing before advance. This AI has standard unit production priority, but a bit more focused on healing and support.

A streamroller, unlike the cautious, would focus on eliminating a wounded enemy if it is on its turn-atack range without worrying with consequences, it make its units attack when the have an enemy unit on the unit-sight-range, but if there isn't any, then it would seach for heal/buff. Has standard unit priority, but a bit more focused on mounted and hard-hitting units.

A guerrilla AI would push constantly, and would always make its units focus on the enemy that it has bonus against first and not the closest, it also focus on produce a lot of units, so it don't mind to lose some in the process. Its unit priority would be like: 50% militia (cheap units and light calvary up to 3 turns), 10% workers, 10% elite units (anything 4+ turns), 15% on the rest. + 15% on techs.

A Turtle AI would focus on defense, their workers would build towers or siege weapons at every free tile possible after doing their factories, usually starting their push after building at least 3 siege machines. its unit priority would be: 20% in workers, 30% in archers, 20% in siege machinery, 10% on others. +20% on techs.

~~~~~~~~~~~~~

I Hope this can be of help when you decide to mess on that. :)
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Spellcasting priority for AI

Post by Alexander82 »

@Stratego (dev) since we were talking about fractional extra productions for dwarves, what about applying that to AI?

easy has 1x production

medium has 1,5x production

hard has 2x production

that might make for the poor choices of AI since any wrong roduction would be carried at twice speed and that would also allow for extra upgrades

AI might halso have +50% and +100% heal/mend bonus for every unit (so a unit healed with a 10 heal rate spell will get 20 hp instead)

I know it is not the finest way of setting AI options but at least might provide some more challenge.
Age of Fantasy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Spellcasting priority for AI

Post by makazuwr32 »

Alexander82 wrote: Thu Feb 27, 2020 5:29 pm @Stratego (dev) since we were talking about fractional extra productions for dwarves, what about applying that to AI?

easy has 1x production

medium has 1,5x production

hard has 2x production

that might make for the poor choices of AI since any wrong roduction would be carried at twice speed and that would also allow for extra upgrades

AI might halso have +50% and +100% heal/mend bonus for every unit (so a unit healed with a 10 heal rate spell will get 20 hp instead)

I know it is not the finest way of setting AI options but at least might provide some more challenge.
Please only set this as separate from "easy" and "hard" ai which are choosabme at start of the map.
As additional option.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Spellcasting priority for AI

Post by Alexander82 »

Yes, it is probably better to avoid changing more maps.
Age of Fantasy design leader
Post Reply

Return to “Archived - FAQ”