主题
Search

井字棋


Tic-Tac-Toe

井字棋游戏,也拼写为 ticktacktoe,也称为三连棋或“圈圈叉叉”,是一种游戏,玩家轮流将棋子(通常第一个玩家用 X,第二个玩家用 O)放在一个 3×3 棋盘上。第一个将三个棋子排成一行(垂直、水平或对角线)的玩家获胜。对于通常的 3×3 棋盘,总是可以获得平局,使其成为一个无用游戏

Wolfram (2022) 将 2×23×3 井字棋分析为多计算过程,包括通过使用分支图

广义的 n 连棋也可以在 k×m 棋盘上考虑,也可以推广到三维“棋盘”。在大小被认为是 13×1315×15 的棋盘上,将五个(或更多)连成一线的游戏被称为五子棋。4×4×4 井字棋的具体情况被称为立体井字棋

对于任何大于 1×2 的棋盘上的二连棋,先手玩家都有必胜策略。在“复仇”井字棋(其中 n 连棋获胜,但如果对手在下一步可以形成 n 连棋则输)中,即使是二连棋也不是微不足道的。例如,在 n=21×5 棋盘上,如果先手玩家从第二个或第四个方格开始,则会获胜,但如果他从其他地方开始则不会赢。

在三连棋中,对于至少 3×4 的任何棋盘,先手玩家都会获胜。先手玩家在带有增强角格的 3×3 棋盘上也获胜,有三种不同的获胜先手走法 (Gardner 1978)。

如果棋盘至少是 5×6,则先手玩家可以为 n=4 获胜(5×5 棋盘是平局)。据信对于 4×7 游戏是平局,对于 4×8 游戏结果未定,据信对于 4×9 游戏先手玩家必胜,并且已被证明对于 4×11 游戏先手玩家必胜,这是通过变异树(Ma)证明的。

对于 n=5,在 5×5 棋盘上总是可以获得平局,但如果棋盘至少是 15×15,则先手玩家可以获胜。对于 n=6 和 7 的情况,对于 n×n 棋盘尚未完全分析,尽管对于 n=8 和 9 总是可以强迫平局。

在更高维度中,对于任何 n 连棋,都存在一个维度为 d 的棋盘 (n×n×...×n),先手玩家有必胜策略 (Hales and Jewett 1963)。Hales-Jewett 定理是 拉姆齐理论 中的一个核心结果,即使有超过两名玩家,仍然会存在一个维度 d,使先手玩家获胜。对于 3×3×34×4×4,先手玩家总是可以获胜 (Gardner 1979),从而确定了 d=3 对于 n=3n=4 的情况。对于 n=8,Golomb 已经证明了 d>3 具有 Hales-Jewett 配对策略 (Ma 2005)。对于其他 nd 值是未知的,Hales-Jewett 定理没有帮助,因为它是存在性的,而不是构造性的。


另请参阅

棋盘, 四子连线, 连接游戏, 五子棋, 非三点共线问题, 碰哈棋, 立体井字棋

使用 Wolfram|Alpha 探索

参考文献

Ball, W. W. R. and Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, pp. 103-104, 1987.Browne, C. Connection Games: Variations on a Theme. Wellesley, MA: A K Peters, p. 9, 2005.de Fouquières, B. Ch. 18 in Les jeux des anciens, 2nd ed. Paris: 1873.Gardner, M. "Ridiculous Questions." Ch. 10 in Mathematical Magic Show: More Puzzles, Games, Diversions, Illusions and Other Mathematical Sleight-of-Mind from Scientific American. New York: Vintage, pp. 138-142, 1978.Gardner, M. "Mathematical Games: The Diverse Pleasures of Circles That Are Tangent to One Another." Sci. Amer. 240, 18-28, Jan. 1979.Gardner, M. "Ticktacktoe Games." Ch. 9 in Wheels, Life, and Other Mathematical Amusements. New York: W. H. Freeman, pp. 94-105, 1983.Hales, A. W. and Jewett, R. I. "Regularity and Positional Games." Trans. Amer. Math. Soc. 106, 222-229, 1963.Ma, W. J. "Generalized Tic-Tac-Toe." http://www.klab.caltech.edu/~ma/tictactoe.html.Steinhaus, H. Mathematical Snapshots, 3rd ed. New York: Dover, pp. 10-11, 1999.Stewart, I. "A Shepherd Takes A Sheep Shot." Sci. Amer. 269, 154-156, 1993.Wolfram, S. "Games and Puzzles as Multicomputational Systems." Jun. 8, 2022. https://writings.stephenwolfram.com/2022/06/games-and-puzzles-as-multicomputational-systems/.

在 Wolfram|Alpha 中被引用

井字棋

引用为

Weisstein, Eric W. “井字棋。” 来自 MathWorld——Wolfram Web 资源。 https://mathworld.net.cn/Tic-Tac-Toe.html

主题分类