N Puzzle (数字推盘游戏)

N Puzzle [数字推盘游戏]

puzzle /ˈpʌzl/:n. 谜,智力游戏,疑问,不解之谜,令人费解的事 vt. 迷惑,使困惑

1. 15 Puzzle

https://en.wikipedia.org/wiki/15_puzzle

The 15 puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and more) is a sliding puzzle. It has 15 square tiles numbered 1 to 15 in a frame that is 4 tile positions high and 4 tile positions wide, with one unoccupied position. Tiles in the same row or column of the open position can be moved by sliding them horizontally or vertically, respectively. The goal of the puzzle is to place the tiles in numerical order (from left to right, top to bottom).
数字推盘游戏 (N Puzzle) 是一种最早的滑块类游戏,常见的类型有十五数字推盘游戏和八数字推盘游戏等,数字推盘也被称为数字华容道。

Named after the number of tiles in the frame, the 15 puzzle may also be called a 16 puzzle, alluding to its total tile capacity. Similar names are used for different sized variants of the 15 puzzle, such as the 8 puzzle, which has 8 tiles in a 3x3 frame.
八数字推盘又名重排九宫。

gem [dʒem]:n. (经切割打磨的) 宝石,难能可贵的人,风景优美的地方,美妙绝伦的事物 adj. (珠宝) 最佳品质的 v. 用宝石装饰
tile [taɪl]:n. 地砖,瓦片,(棋盘游戏的) 棋子 v. 铺瓦,铺地砖,贴瓷砖,平铺显示
mystic ['mɪstɪk]:n. 神秘主义者,潜修者 adj. 不可思议的,引起惊奇的,秘诀的,秘传仪式的

在这里插入图片描述

Versions of the 15 puzzle include a different number of tiles, such as the 8-puzzle or 24-puzzle.
十五数字推盘游戏的板上会有十五个方块和一个大小相当于一个方块的空位,供方块移动之用。而八数字推盘游戏,为九宫格布局,有八个方块和一个空位。

2. N Puzzle

https://n-puzzle.baletskyi.me/

The N-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing.

The puzzle also exists in other sizes, particularly the smaller 8-puzzle. If the size is 3x3 tiles, the puzzle is called the 8-puzzle, and if 4x4 tiles, the puzzle is called the 15-puzzle named for the number of tiles and so on.

The object of the puzzle is to place the tiles in order by making sliding moves that use the empty space.

在这里插入图片描述

在这里插入图片描述

shuffle ['ʃʌf(ə)l]:n. 洗牌,拖着脚走,曳步舞 v. 拖着脚走,(笨拙或尴尬地) 把脚动来动去,坐立不安,洗 (牌)

The N Puzzle is a classical problem for modeling algorithms involving heuristics.
寻找数字推盘游戏的一个解相对容易,但寻找最优解是一个 NP 困难问题。十五数字推盘的最优解至多有 80 步,而八数字推盘的最优解至多有 31 步。

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] The 15 Puzzle, Fifteen Puzzle, 14-15 Puzzle, Boss Puzzle, https://www.mathematische-basteleien.de/15puzzle.htm
[3] N-Puzzle, https://tristanpenman.com/demos/n-puzzle/
[4] Implementing A-star(A*) to solve N-Puzzle, https://algorithmsinsight.wordpress.com/graph-theory-2/a-star-in-general/implementing-a-star-to-solve-n-puzzle/
[5] 8-puzzle, https://www.cnblogs.com/magic-sea/p/12081180.html

相关推荐

  1. C++箱子游戏开发

    2024-07-18 00:08:03       52 阅读
  2. 箱子小游戏C++

    2024-07-18 00:08:03       36 阅读
  3. 牛刀小试 - C++ 箱子小游戏

    2024-07-18 00:08:03       57 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-18 00:08:03       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-18 00:08:03       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-18 00:08:03       58 阅读
  4. Python语言-面向对象

    2024-07-18 00:08:03       69 阅读

热门阅读

  1. go recover

    2024-07-18 00:08:03       22 阅读
  2. docker从0到1 部署gitlab 纯干货

    2024-07-18 00:08:03       21 阅读
  3. C# —— var

    2024-07-18 00:08:03       23 阅读
  4. 【VUE】10、VUE项目中多环境管理使用

    2024-07-18 00:08:03       23 阅读
  5. React学习记录 ---第六章

    2024-07-18 00:08:03       20 阅读
  6. python 读取 hdfs 数据

    2024-07-18 00:08:03       19 阅读
  7. 营销策划方案模板

    2024-07-18 00:08:03       21 阅读
  8. C#模式匹配 关系模式,多个输入

    2024-07-18 00:08:03       21 阅读
  9. NumPy中np.clip()的用法

    2024-07-18 00:08:03       21 阅读
  10. geojson的数据格式是什么

    2024-07-18 00:08:03       18 阅读