Sliding puzzle solver