Slow Experimental AI with custom Era, likely caused by WML abilities

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Nyanyanyan
Posts: 73
Joined: May 11th, 2018, 10:40 pm

Slow Experimental AI with custom Era, likely caused by WML abilities

Post by Nyanyanyan »

Hallo everyone,
I've made a multiplayer Era and whenever I use Experimental AI with that Era (particularly with a certain unit which has an ability that calls for an event on every attacker hit in every fight with a unit of it's faction as attacker which contains over 500 lines of WML code) the AI takes incredibly long and uses a lot of resources to the point where the game becomes unresponsive.
I assume this is because it tries to check the consequences for every action and just gets overloaded.
So my questions are these: Is this likely the cause of the problem and if it is, is there any way to make the AI ignore a certain part of the code to not make this happen?

Thanks in advance.
Author of Age of Lords and the Revolution and Civil War and Expendable Leaders 2 multiplayer mods.
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Slow Experimental AI with custom Era, likely caused by WML abilities

Post by Ravana »

Instead, the consequences are not looked at all, any event basically means that AI calculation is quite inaccurate.

Exception would be if you used those 500 lines within predefined weapon special filters.
User avatar
Nyanyanyan
Posts: 73
Joined: May 11th, 2018, 10:40 pm

Re: Slow Experimental AI with custom Era, likely caused by WML abilities

Post by Nyanyanyan »

Ravana wrote: October 29th, 2018, 8:05 pm Instead, the consequences are not looked at all, any event basically means that AI calculation is quite inaccurate.

Exception would be if you used those 500 lines within predefined weapon special filters.
I guess I'll do some tests to see if the experimental AI is also very slow on a clean installation.
It's basically unplayable like this, taking about 2 minutes to make one move (not turn).
Author of Age of Lords and the Revolution and Civil War and Expendable Leaders 2 multiplayer mods.
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Slow Experimental AI with custom Era, likely caused by WML abilities

Post by Celtic_Minstrel »

If you can identify any significant performance issues with the experimental AI under specific identifiable conditions, feel free to open an issue about it so that we can try to address the problem.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply