In this replay : https://www.codingame.com/replay/317467036 I believe there's a weirdness in the path finding algorithm, unless I'm misunderstanding the rules.
The rules says that if two paths have the same length, then the wanderer will use directions in the following order of preference : UP, RIGHT, DOWN, LEFT.
However, at turn 18, wanderer 6 (at 1,11), targeting explorer 3 (at 9,7), which is 12 steps away both using the path going UP (1,10) and the path going RIGHT (2,11), choose to go RIGHT instead of UP. Even if we take into account the explorer movement (going UP), it shouldn't change the paths.
Is there something wrong with my assumptions?
EDIT: Then, on the same replay, at turn 78, the wanderer 16, in almost the same situation, choose to go UP instead of RIGHT.