Closed andy5995 closed 6 years ago
I'm not sure exactly.. I assume it means the AI will try to expand more.
I think "max expansions" relates to how many castles with "active" mining operations the cpu can have at a time.
Copied from Discord
Just to note, I am suspicious that my "ai hack" could eat up memory. This is because the way the AI works, is that it pushes tasks to a list of tasks and pops and executes the tasks in the list over time. However, if the list is pushed to faster than it is popped, that's gonna put some severe pressure on memory.... and my hack increases the rate at which the AI pushes tasks. Also, the more commands piled on by the AI, the more network traffic there will be. The problem may be unrelated to the AI hack and due to network throttling on windows.
It should be noted, I've never experienced concrete evidence of this lagging problem myself. Also, it happened for Issh and David at ~1000+ units (but note that, we did not have this problem on megaglest).
Thanks for the extra info and feedback, @Jammyjamjamman .
To be honest, I'm quite satisfied with the standard MG Mega AI (renamed to Zeta in ZetaGlest). The way I see it, it's not difficult to set up a game that's unwinnable. For example... There's no player that could beat 7 4.9 Zeta CPU factions. If 3 humans were playing against 5 Zeta 4.9 factions, it would be extremely challenging.
I would like to see the AI expand more, which seemed to be happening with your patch, but other than that, the AI has always been plenty difficult for me. ;)
@Jammyjamjamman suspects the AI patch from commit https://github.com/ZetaGlest/zetaglest-source/commit/464860aa023e4089f4c6f108e019d66d60052581#diff-d96c21449fc203a306589b5bd1f8aaa1 may be causing extra lag when playing mp with Windows clients.
This patch reverts most of that commit. Max expansions I set to 5, the MG setting was 2.
If this fixes the lag, then we can consider looking at making these changes again, but one at a time, making sure lag isn't a result before making more changes.
Anyone can review this to learn some of the code, but I'd like to hear feedback from Jammy before finally merging.