Give a 3-by-3 grid with 8 square blocks and 1 blank.
Rearrange the block to make it in order, using as few moves as possible.
Return the result of sequence. Like this below:
1 3 1 3 1 2 3 1 2 3 1 2 3
The best-first search is that from initial broad to the goal, we do our each step at the best, or small cost move.
First, we need to define our start and goal. We use a terminology called