Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

AI Unit Clumping

Open DracoCretel opened this issue 6 months ago • 4 comments

Units for AIs sometimes bunch up and clump behind the frontlines. They barely respond to threats to that AIs own builds. The AI was working perfectly fine in the start. It's as if something in the logic told the AI to retreat and gather units with move commands, but never sends them out again. This happens for mid and long length matches. This has been happening as of the recent major patches to the game. It was not happening a year ago.

Northeast AI clumps up and idles their hovercraft army on the northern mountain at around 70% through the match. https://zero-k.info/Battles/Detail/2420117

DracoCretel avatar May 07 '26 02:05 DracoCretel

This?

Image

GoogleFrog avatar May 09 '26 01:05 GoogleFrog

My guess is that the AI can't see a path.

Image Image

GoogleFrog avatar May 09 '26 01:05 GoogleFrog

Good point. When I encounter it again I will attempt to restore the terrain to see if it fixes allows the AI too move its units.

DracoCretel avatar May 09 '26 07:05 DracoCretel

Edit; I made this comment before I realized CircuitAIBrutal is not the "CAI" in this codebase. It's CAI that potentially has this issue described below.

I think in battleGroupHandler, the grouped units will only re-evaluate its target when it reaches its aim cell. So, maybe the path is blocked legitimately or not, either way the units are just commanded to regroup into a clump and won't be turned towards other opportunities instead.

Perhaps some sort of timer can be used to measure distance to the target, and if no meaningful progress is made for 15-20 seconds, force the group to either retarget or disband? In any case, some sort of exit other than 'reached the target cell' might be in order.

D0ubleD0uble avatar May 30 '26 01:05 D0ubleD0uble