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
- 版权声明： 本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！