怎么玩井字棋?
井字棋(又叫三连棋、圈叉棋)是世界上最广为人知的策略小游戏之一。棋盘是 3×3 共九格,两位玩家轮流落子——你执 X,电脑执 O。谁先把自己的三枚棋子在横、竖或斜方向连成一条直线,谁就获胜;若九格填满仍无人连线,则为平局。
本作内置两档对手:简单(电脑随机落子,适合放松或带新手)与 困难(电脑使用「极小化极大」算法,永不犯错——你最好的结果是逼平它)。
操作方式
- 点击任意空格放置你的 X,电脑会立即应招。
- 用上方的「简单 / 困难」切换对手强度。
- 每局结束后点击「新一局」继续;累计战绩会保存在本机。
必胜(必不败)策略
- 先占中心。中心格参与四条连线,是最强的起手位置。
- 抢角防边。角格参与三条线,价值高于边格。
- 制造「双威胁」。当你同时有两条即将连成的线时,对手只能堵一条。
- 永远先堵对手的三连。进攻之前,先确认对方下一步不会获胜。
掌握以上原则后,你在「困难」模式下至少能稳稳逼平——这正是井字棋作为博弈论入门范例的迷人之处。
关于这款游戏
这是昼夜工坊原创的 井字棋网页版,内置由极小化极大算法驱动的智能对手。免费、无需下载、手机电脑通用,三十秒一局,是练习逻辑与预判的绝佳小游戏。
常见问题
困难模式能赢吗?
几乎不能。算法是「不可战胜」的,最佳结果是平局——这是井字棋的数学特性。
战绩会保存吗?
会,你的胜 / 平 / 负累计保存在本机浏览器中。
可以两人对战吗?
当前为人机对战。如果你希望加入双人本地对战模式,欢迎在「联系我们」告诉我们。
How to play Tic-Tac-Toe
Tic-Tac-Toe is one of the most familiar strategy games in the world. On a 3×3 grid, two players take turns — you play X, the computer plays O. The first to line up three marks in a row — horizontally, vertically or diagonally — wins. If all nine squares fill with no line, it's a draw.
There are two opponents: Easy (the computer plays semi-randomly) and Hard (it uses the minimax algorithm and never makes a mistake — the best you can do is force a draw).
Controls
- Click any empty square to place your X; the computer replies instantly.
- Switch opponent strength with the Easy / Hard toggle.
- Hit New round after each game; your win / draw / loss record is saved locally.
Winning (or never-losing) strategy
- Take the centre. It sits on four winning lines — the strongest opening.
- Grab corners over edges. A corner belongs to three lines, an edge to only two.
- Create a "double threat". Two near-complete lines at once means your opponent can only block one.
- Always block first. Before attacking, make sure the opponent can't win next move.
About this game
This is an original Tic-Tac-Toe by Day & Night Studio with a minimax-powered opponent. It's free, no download, phone and desktop. Why can't you beat "Hard"? Read Tic-Tac-Toe: A Game Humanity Completely Solved.
FAQ
Can I beat Hard mode?
Almost never. The algorithm is unbeatable — a draw is the best possible result, by the game's mathematics.
Is my record saved?
Yes — your cumulative win / draw / loss is stored locally in your browser.
Is there two-player mode?
Currently it's player vs computer. Want local two-player? Tell us via the Contact page.