Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#1914 closed defect (fixed)

Units often refuse to mine metal and stone

Reported by: Pippijn van Steenhoven Owned by: Itms
Priority: Should Have Milestone: Alpha 19
Component: UI & Simulation Keywords: pathfinding
Cc: Patch:

Description

Since alpha 13, worker units sent to mine metal and stone now, more often than not, move to the mine, but then stop and just stand there. It happened with the metal mine on a generated map and both types of mines on Death Canyon 3.

Attachments (3)

quicksave-0010.0adsave (461.3 KB ) - added by Pippijn van Steenhoven 11 years ago.
Savegame in Alpine Valley
commands.txt (345.5 KB ) - added by historic_bruno 11 years ago.
commands.2.txt (122.2 KB ) - added by Stan 9 years ago.
I watched AI play on that map and units would often get stuck moving in the void, don't know if it's directly related, but they would bogus in front of trees or CC

Download all attachments as: .zip

Change History (29)

comment:1 by zoot, 11 years ago

I believe this is due to r13277 and r13288.

Last edited 11 years ago by zoot (previous) (diff)

comment:2 by wraitii, 11 years ago

It should not happen unless the mine is full though. I haven't encountered this: do you have a specific procedure to reproduce the issue? Or a savegame with the issue?

Note also that Death Canyon 3 starts with champion units who can't collect resources, so that will trigger said behavior.

by Pippijn van Steenhoven, 11 years ago

Attachment: quicksave-0010.0adsave added

Savegame in Alpine Valley

comment:3 by Pippijn van Steenhoven, 11 years ago

The Death Canyon 3 issue was indeed due to champion units. However, I have been able to reproduce it in the attached savegame. After some minutes, one metal miner will stop, apparently because it is blocked by other miners. Later, other miners will probably also stop. The more severe issue of miners refusing to even start working could not yet be reproduced. If I encounter that issue again, I will add another savegame.

comment:4 by zweigousefen, 11 years ago

Happened to me too. I will try to reproduce to get some data. I also had merchant ships refusing to trade, I don't know if it's related (could be related to the "ships blocking each other" issue).

comment:5 by wraitii, 11 years ago

In 13586:

Fix a rare issue where units could get stuck in Individual.Gather.Gathering state forever because of worker limits. Refs #1914 (might even fix it).

comment:6 by wraitii, 11 years ago

In 13587:

Change my fix from revision [13586] to use something faster. Still Refs #1914

comment:7 by leper, 11 years ago

In 13589:

Fix the fix of the fix. Refs #1914.

comment:8 by historic_bruno, 11 years ago

Milestone: BacklogAlpha 14

comment:9 by historic_bruno, 11 years ago

Is this fixed, can someone confirm?

comment:10 by sanderd17, 11 years ago

I haven't seen this in any game anymore.

comment:11 by historic_bruno, 11 years ago

Resolution: fixed
Status: newclosed

by historic_bruno, 11 years ago

Attachment: commands.txt added

comment:12 by historic_bruno, 11 years ago

Milestone: Alpha 14Alpha 15
Resolution: fixed
Status: closedreopened

I saw something like this in a multiplayer game with A14. I had tasked units to gather from a metal mine. After some time, 3-4 of my miners were standing around idle. It didn't seem related to gatherer limits, more likely a pathfinding issue. I'm reopening and attaching the commands.txt from the game.

comment:13 by wraitii, 10 years ago

Milestone: Alpha 15Alpha 16
Priority: Release BlockerShould Have

Given Ben's input above, I'm moving this to A16 as a "should have".

comment:14 by Stan, 10 years ago

Milestone: Alpha 16Alpha 17

Pushed for further research.

comment:15 by Stan, 10 years ago

Does that occur with Petra ? If not this should be closed

comment:16 by mimo, 10 years ago

Hi stan, it has nothing to do with the AIs, but with UnitAI, and certainly because of the pathFinder: in comment 12, it happened to historic_bruno who is hopefully not a bot :)

comment:17 by Stan, 10 years ago

Okay. Is there a way we can find the source ?

comment:18 by Itms, 10 years ago

Milestone: Alpha 17Alpha 18

Pushing this since it's likely related to the pathfinder and won't be fixed individually.

comment:19 by Itms, 9 years ago

Keywords: pathfinding added

comment:20 by Itms, 9 years ago

Milestone: Alpha 18Alpha 19

comment:21 by Itms, 9 years ago

In 16751:

New long-range pathfinder.

Based on Philip's work located at http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/pathfinder
Includes code by wraitii, sanderd17 and kanetaka.

An updated version of docs/pathfinder.pdf describing the changes in detail will be committed ASAP.

Running update-workspaces is needed after this change.

Fixes #1756.
Fixes #930, #1259, #2908, #2960, #3097
Refs #1200, #1914, #1942, #2568, #2132, #2563

comment:22 by Stan, 9 years ago

Does that still happen with new pathfinder ?

comment:23 by Itms, 9 years ago

I don't know. The problem is that units can get stuck or stop without reason, regardless of mining metal and stone. So marking as invalid might be nice, but maybe the bug is still present somewhere.

I'd like to leave this ticket as it is, and push it at the last minute if nothing is done until then.

comment:24 by Itms, 9 years ago

Milestone: Alpha 19Backlog

Backlogging because no reports were made.

by Stan, 9 years ago

Attachment: commands.2.txt added

I watched AI play on that map and units would often get stuck moving in the void, don't know if it's directly related, but they would bogus in front of trees or CC

comment:25 by Itms, 9 years ago

Owner: set to Itms
Resolution: fixed
Status: reopenedclosed

In 16998:

Based on previous experimental changes, major update to the unit motion.

With this change, units will not check their movement against all obstructions when moving: terrain and static obstructions are assumed to be handled by the long-range pathfinder.
However, when static obstructions are changed, the paths have to be invalidated. In order to minimize the performance impact, units will check for obstructions when they move after a passability change. If they collide with something, they will recompute a path that will take into account the new passability map.

Also includes some code cleanup. This patch should not change performance a lot: the lower number of checks should give a small performance improvement while using the message broadcasting system should hurt it a bit.

Fixes #3376, #3337, #1914.

comment:26 by Itms, 9 years ago

Milestone: BacklogAlpha 19

I think that the unit motion change I just committed should get rid of such situations.

Note: See TracTickets for help on using tickets.