赛派号

sweeper扫地机器人官网 A Beginner's Guide to Minesweeper

Basic paterns of minesweeper

To simplify the explanation, assume that there are no marked mines around the number to be judged (for cases where there are marked mines around, please refer to the 'subtraction principle' later).

The irrelevant numbers in the picture he been omitted. The blue dot represents an empty square, and the red dot represents a mine.

The number string is in horizontal or vertical direction, with no diagonal direction, but the unclear squares can be in diagonal direction.

Edge Paterns

"Edge" refers to a situation where a certain number only shares unknown squares with other numbers and does not he any exclusive squares. In general, this means that the number is adjacent to the border or that the three squares vertically outside it are empty.

① '11' patten: If one '1' is next to the edge, then the corresponding squares of the other '1' are not mines.

A '1' next to the border, then the three squares outside of another '1' are not mines.

If a '1' is floating, then the three on the outside of the other '1' are not mines. This is like digging a hole. If it still shows '1' after opening it, it still conforms to the 11 pattern and can be dug again.

Separated '11'. There is only a shared block for the top '1' of the picture, then the green dots in the picture are not mines.

[Inference] The '111' pattern: When there are three '1's with both ends close to the edge, the one in the middle is a mine, and the other two are not mines.

Expand 'nn' pattern:if one n is against the edge, then the exclusive squares of the other n are not mines. Here, n=2,3.

Any position paterns

② '12' patern. '1' and '2' he shared unknown blocks. '2' has one exclusive block, then this block is mine. And all exclusive blocks of '1' are not mines.

'1' and '2' are adjacent

'1' and '2' are Separated

Extend: '1n' patern. In addition to the unknown blocks shared by 1 and n, if n has n-1 exclusive blocks, then these n-1 blocks are all mines, and none of the exclusive blocks of 1 are mines. where n = 3,4.

③ '121' patern. The number 1,2,1 is next to each other, the middle is mine, and the two ends are not mines;

④ '1221' patern. The number 1221 is next to each other, and two '2' share two unspecified squares, then these two squares are mines, and the rest are not mines.

In the above paterns, the direction is the same, the left and right, horizontal and vertical.

Subtraction principle:

If some blocks around a number are marked with mines, then subtract the number of mines from the number, and make the blocks blank in your mind, before applying the above formula.

Below picture: It is actually 11 patern, and the green dot can be opened

Below: There are two mines around 3, 3-2=1, and there is a mine around 2, 2-1=1, so it is simplified to 11 patern, and the two squares of the dot can be opened directly.

Below: After subtracting, it is 12 patern, and the red dot is mine.

Below: According to the number 3 above, it can be judged that the two unspecified squares enclosed by the ellipse he and only one thunder. Then the following 3 becomes 2, and the '12' patern is applicable, the blue dot is not mine, and the red dot is mine.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了