数学之家

建站
数学爱好者的家园
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2192|回复: 5
打印 上一主题 下一主题

[已解决] 三子棋中的各种概率

[复制链接]
跳转到指定楼层
楼主
发表于 2010-3-20 14:54:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
三子棋是一种两人对弈的棋类游戏,如图:
落子规则:要求在9宫格的空格内落子。游戏开始后,由任意一人先落子,然后两人轮流落子,直到分出胜负或平局
胜负判定:最先将棋子在棋盘上排成横或竖或斜一条线的玩家为获胜玩家,另一玩家为失败玩家,若棋子在棋盘上占满以后还未能分出胜负,那么此局判为平局


现设甲为后手,乙为先手,试计算:
(1)甲获胜的概率
(2)乙获胜的概率
(3)平局的概率
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 顶 踩
回复

使用道具 举报

沙发
发表于 2010-3-20 16:21:06 | 只看该作者
:sleepy:
我记得这个东西如果两边都是高手的话,是肯定会平局的.......
回复 支持 反对

使用道具 举报

板凳
发表于 2010-3-20 18:35:07 | 只看该作者
似乎真的是这样的,我还没没平过
回复 支持 反对

使用道具 举报

地板
发表于 2010-3-28 08:26:20 | 只看该作者
我几乎每下每平。。。
回复 支持 反对

使用道具 举报

5#
发表于 2010-3-30 19:13:10 | 只看该作者
Despite its apparent simplicity, it requires some complex mathematics to determine the number of possible games. This is further complicated by the definitions used when setting the conditions.

In theory, there are 19,683 possible board layouts (39 since each of the nine spaces can be X, O or blank), and 362,880 (i.e. 9!) different sequences for placing the Xs and Os on the board; that is, without taking into consideration winning combinations which would make many of them unreachable in an actual game.

When winning combinations are considered, there are 255,168 possible games. Assuming that X makes the first move every time:

131,184 finished games are won by (X)
1,440 are won by (X) after 5 moves
47,952 are won by (X) after 7 moves
81,792 are won by (X) after 9 moves
77,904 finished games are won by (O)
5,328 are won by (O) after 6 moves
72,576 are won by (O) after 8 moves
46,080 finished games are drawn
Ignoring the sequence of Xs and Os, and after eliminating symmetrical outcomes (ie. rotations and/or reflections of other outcomes), there are only 138 unique outcomes. Assuming once again that X makes the first move every time:

91 unique outcomes are won by (X)
21 won by (X) after 5 moves
58 won by (X) after 7 moves
12 won by (X) after 9 moves
44 unique outcomes are won by (O)
21 won by (O) after 6 moves
23 won by (O) after 8 moves
3 unique outcomes are drawn
回复 支持 反对

使用道具 举报

6#
发表于 2010-3-30 19:13:21 | 只看该作者
Strategy
A player can play perfect tic-tac-toe if they choose the move with the highest priority in the following table[3].

Win: If you have two in a row, play the third to get three in a row.
Block: If the opponent has two in a row, play the third to block them.
Fork: Create an opportunity where you can win in two ways.
Block Opponent's Fork:
Option 1: Create two in a row to force the opponent into defending, as long as it doesn't result in them creating a fork or winning. For example, if "X" has a corner, "O" has the center, and "X" has the opposite corner as well, "O" must not play a corner in order to win. (Playing a corner in this scenario creates a fork for "X" to win.)
Option 2: If there is a configuration where the opponent can fork, block that fork.
Center: Play the center.
Opposite Corner: If the opponent is in the corner, play the center.
Empty Corner: Play in a corner square.
Empty Side: Play in a middle square on any of the 4 sides.
The first player, whom we shall designate "X," has 3 possible positions to mark during the first turn. Superficially, it might seem that there are 9 possible positions, corresponding to the 9 squares in the grid. However, by rotating the board, we will find that in the first turn, every corner mark is strategically equivalent to every other corner mark. The same is true of every edge mark. For strategy purposes, there are therefore only three possible first marks: corner, edge, or center. Player X can win or force a draw from any of these starting marks; however, playing the corner gives the opponent the smallest choice of squares which must be played to avoid losing[4].

The second player, whom we shall designate "O," must respond to X's opening mark in such a way as to avoid the forced win. Player O must always respond to a corner opening with a center mark, and to a center opening with a corner mark. An edge opening must be answered either with a center mark, a corner mark next to the X, or an edge mark opposite the X. Any other responses will allow X to force the win. Once the opening is completed, O's task is to follow the above list of priorities in order to force the draw, or else to gain a win if X makes a weak play.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|网站统计|手机版|小黑屋|数学之家    

GMT+8, 2024-12-27 18:13 , Processed in 1.284097 second(s), 23 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表