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

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
Nyanyanyan
Posts: 10
Joined: May 11th, 2018, 10:40 pm

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

Post by Nyanyanyan » October 29th, 2018, 4:21 pm

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.

User avatar
Ravana
Moderator
Posts: 1873
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 » 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.

Nyanyanyan
Posts: 10
Joined: May 11th, 2018, 10:40 pm

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

Post by Nyanyanyan » November 4th, 2018, 7:47 pm

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).

User avatar
Celtic_Minstrel
Developer
Posts: 1246
Joined: August 3rd, 2012, 11:26 pm
Contact:

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

Post by Celtic_Minstrel » November 9th, 2018, 3:43 am

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.
Maintainer of Steelhive.

Post Reply