maze walk with a set of visited positions