Thanks for the feedback!
Their moves are not based on priority. They choose their moves in a way to get to the goal and back as fast as possible.
Ahh that makes sense! Priority being fastest path possible. having fun with this, still not done but level design is great, challenging and fun puzzles :)