This is the official forum for the free, fan-made Age of Empires III modification, Wars of Liberty.

Welcome to the New Forum

We hope you enjoy the official new forum of the Wars of Liberty mod for Age of Empires III! Visit this thread to get acquainted with the new forum, and let us know if there's anything we can fix. Feel free to dismiss this message at any time by clicking the "X" in the top right corner.

Thanks!
The Wars of Liberty Team

Forum rules

  • Welcome to The Hospital! This forum is for bugs and error reporting.
  • The official language in this forum is English.
  • Be nice to other members, don't spam comments or smilies, and don't do anything illegal.
  • Posts that don't fit this forum will be moved or deleted.
 
Osiris
Topic Author
Volunteer
Volunteer
Posts: 40
Joined: Mon Nov 20, 2017 9:17 am

Weird AI codes that cause lags

Sun Dec 24, 2017 9:46 am

So, I was exploring WoL's AI files because of curiosity, and I found some weird (dangerous) codes that, I theorize, might slow the game down seriously. I will try to give as much details as possible.
The bug surprisingly simple: several techs are never researched. Inside several rules, the AI checks if there is already an active plan trying to research a specific tech. If that's the case, the AI destroys that plan and creates a new fresh one. However, the call interval is so little that the plan doesn't even have the time to perform the research. Also, multiple plans are created at the same time. For example, all Africans create one research plan per market tech once, which is not good for both AI player and the game's performance: the AI spends resources very rapidly, and the game occupies a lot of memory. To sum up, they want to keep their work clean by destroying old plans and creating new fresh ones, but they think about it so often that the freshly created plans are destroyed right after they are born. Sounds like a mass kill of chicken in a slaughterhouse...
And that's my bug report. I hope it was clear despite my completely broken english :p
 
User avatar
rahadian.ramadhan
Jesuit Priest
Jesuit Priest
Posts: 30
Joined: Fri Apr 28, 2017 11:54 am
Location: Indonesia
Favorite Civilization: Habsburgs

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 11:50 am

Maybe @AlistairJah can help here.
 
User avatar
AlistairJah
Wars of Liberty Team
Wars of Liberty Team
Posts: 378
Joined: Wed Sep 06, 2017 10:10 am
Location: Madagascar
Favorite Civilization: French
Contact:

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 2:28 pm

Thank you @Osiris for taking the time to write this report! Unfortunately, for a reason that I don't know yet, my computer refuses to turn on so I cannot look at the AI file. If you don't mind, would you please try to tweak it a bit to see if it can be solved? I can explain you the steps to follow if you need to be guided.
@rahadian.ramadhan
Do you still get the lag after winning, even after making the AI3 read-only?
(fr) Regarde à travers et vois le cygne et ce qui vit au-delà de l'au-delà.
 
User avatar
rahadian.ramadhan
Jesuit Priest
Jesuit Priest
Posts: 30
Joined: Fri Apr 28, 2017 11:54 am
Location: Indonesia
Favorite Civilization: Habsburgs

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 2:56 pm

Tested it today, so far none although i only tested one playthrough. @AlistairJah
 
User avatar
AlistairJah
Wars of Liberty Team
Wars of Liberty Team
Posts: 378
Joined: Wed Sep 06, 2017 10:10 am
Location: Madagascar
Favorite Civilization: French
Contact:

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 3:23 pm

Okay, so we're waiting for @Osiris till I get my computer back.
(fr) Regarde à travers et vois le cygne et ce qui vit au-delà de l'au-delà.
 
Osiris
Topic Author
Volunteer
Volunteer
Posts: 40
Joined: Mon Nov 20, 2017 9:17 am

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 4:09 pm

I increased the call intervals from 2 to 30, and I made sure that the AI researches only one tech at a time for each rule. Now rules are shut down if all techs are active. With Africans and Australia, lags are a very little bit better now. Egypt causes lags when there are many units.

More bugs I found :
[*] For some reason, Bedouins have strange behavior, moving constantly without any precise direction, and always trying to get to the bottom of the map...
[*] Africans get rocks but they never gather from it.
[*] Italians take ages before making buildings.
[*] AI gathers from Mills very, very rarely.
[*] Played against a civ, dunno which one, that had bears performing weird movements around a certain building. I will try to find it again.
And... that's all for now. I'm not yet familiar with all of the mod's new contents, so I want to enjoy it first before tracking bugs :P
 
User avatar
Circle of Ossus
Acá-Caraya
Acá-Caraya
Posts: 181
Joined: Fri Mar 31, 2017 9:48 am
Location: Belgium
Favorite Civilization: Romanians

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 4:28 pm

@ Osiris: the dancing bears civ is Romania (currently my favorite civ, but I am rethinking this choice since the recent nerf of Seimen in late-game). Those dancing bears is one of the amazing things Alistairjah has managed to learn the AI do. The bears are dancing to reduce unit creation time without spending population for doing this.
<a href="viewtopic.php?f=8&t=768&p=6612#p6612" class="postlink" >Swiss UA Proposal</a>
 
Osiris
Topic Author
Volunteer
Volunteer
Posts: 40
Joined: Mon Nov 20, 2017 9:17 am

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 5:45 pm

@Circle of Ossus, so it's not a bug? Hmm, so weird :D
@AlistairJah, Romanians and Greek cause terrible lags! I suspect that it's because of crops, as myself I am experiencing lags when I have more than ~5 crops - even when I'm in the scenario editor.
 
User avatar
AlistairJah
Wars of Liberty Team
Wars of Liberty Team
Posts: 378
Joined: Wed Sep 06, 2017 10:10 am
Location: Madagascar
Favorite Civilization: French
Contact:

Re: Weird AI codes that cause lags

Sun Dec 24, 2017 5:52 pm

Well, it's a bug but it's not a bug. I tried forcing them to work on Circus because they always try to scout.
As for Romanians and Greek, I'm not sure if what you said is true. @Circle of Ossus, could you please verify that - since you love Romania so much :P.
(fr) Regarde à travers et vois le cygne et ce qui vit au-delà de l'au-delà.

Who is online

Users browsing this forum: No registered users and 1 guest