Jump to content

new AI bug: Incorrect unitAI state behavior on fishing boats


Recommended Posts

There is a strange behavior how fishing boats behave after the fish resource is used up. I have my AI to reassign the fishing boat when it becomes IDLE but some fishing boat never seem to enter INDIVIDUAL.GATHER.IDLE at all. Instead it does the never-ending loop of INDIVIDUAL.GATHER.APPROACHING and INDIVIDUAL.GATHER.GATHERING (gathering what? there is no fish resource there anymore). Some won't enter IDLE status when fishing boat is sitting doing nothing. I have to assign it manually to reset the never-ending loop status bug.

I've attached the saved file (it has my AI bot, but I think this behavior still occur without my bot). Remove .txt extension (board won't let me its orginal format otherwise.


There used to be more but I had to manually assigned all but one (that in screenshot).

This behavior could cause unexpected bug in AI with water units


Edited by rjs23
Link to comment
Share on other sites

You're correct, this is reproducible on a test map without AIs. I'm not sure it's fishing boat specific though. The problem seems to be when a unit is gathering from a resource supply such that the gatherer reaches max capacity at the same time the resource supply becomes exhausted - which is quite likely if there's a single gatherer and the supply is an integer multiple of that gatherer's capacity (multiplied by the gather rate?). The gatherer never becomes aware that the supply was exhausted (which would cause it to give up on the current target) so it enters the infinite loop of gathering "near" the last target, which of course no longer exists.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...