Early versions of the code used Manhattan distance instead of BFS to find the movements. Turns out this was covering about 80% of all cases.