Author Topic: A little change for AI  (Read 859 times)

stone33

  • Guest
A little change for AI
« on: 6 December 2012, 00:17:47 »
Hi, I have worked in a mod of Magic faction adding particle effects and other modifications to get a better AI perfomance, I ask for one of this two AI features:

-When the initiates(workers) get stuck to harvest any resource the AI disperse them in different places, generally the initiates walk a long distance when this happens, this affects the AI perfomance, I have put an "attack boost" to reduce the distance that the initiate walks, this improve the attacks of the faction but also it makes impossible explore with initiates, it would be good that the AI use a different "move skill" when it disperse the initiates and make possible to modify it like any other "move skill" in the initiate´s  xml file

-When a unit that uses energy points is created, it start with 0 EP, it would be nice that I could give instruction in the xml file, in order to the unit started with full energy points.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: A little change for AI
« Reply #1 on: 6 December 2012, 01:16:07 »
The key problem you are likely encountering is a group of units blocking each other trying to harvest a resource and not much space to do so. We have logic to move them out of the way in this case (scatter them) to try to get room to move around. Many things could be done to try to help with this but it speaks to a map that has very limited resources and a faction with lots of harvesters. This is not the best idea since you will always be crowded and fighting to get somewhere and will affect performance constantly.

stone33

  • Guest
Re: A little change for AI
« Reply #2 on: 6 December 2012, 21:55:14 »
thanks for the fast reply.

The key problem you are likely encountering is a group of units blocking each other trying to harvest a resource and not much space to do so.
yes, exactly

Many things could be done to try to help with this but it speaks to a map that has very limited resources and a faction with lots of harvesters. This is not the best idea since you will always be crowded and fighting to get somewhere and will affect performance constantly.

-I forgot to say, that the atack-boost is not to "neutralize" this AI behavior but to "regulate" the distance the initiates walk, I agree with you that If this Behavior is deleted it would be a shambles. the attack boost just lets walk enough distance to the initiates to get room and move around, of this way the scatter behavior do its work and the faction have a better performance.

-The AI sometimes use this behavior of scattering, after attacking with a group of initiates when the enemy attack its base, this affects the faction too, although there´s this  problem only in factions with workers that can attack. The attack boost help to minimize these two behaviors and get better the perfomance of the faction.

-But there is a colateral effect with the attack boost, you cant explore the map with initiates with the normal move command, you have to give a construction, repair or harvest command to can explore (this is the problem that I want to solve). the only idea that I have its that "scatter behavior"  use other "move skill" diferent to the normal "move skill" and this diferent move skill can be in the initiate´s xml file to put the attack boost in it.

This attack boost give to Magic faction a good help, that´s the reason I want to keep it in the mod, but you like coder  maybe you have another idea to resolve this flaw.
« Last Edit: 6 December 2012, 22:39:30 by stone33 »

 

anything