I'm making a roguelike in which enemies wander around the map until they're detected by the player. They each have random destinations, so sometimes their destinations conflict and they block each other in corridors.
Enemies can't go through each other
Is there any approach that can avoid this issue? Only idea I have right now would be to detect which ones are at the end of the "trafic block" and made them change destination until their path is free... But maybe there's a better design solution for this problem?