Three basic game knowledge and their own summary

Source: Internet
Author: User

PS: The game analysis is too frustrating. I used to see that the game Knowledge of kuangbin is more comprehensive than I have reproduced. I deleted this article, copied the previous article, and published it.

This is from the recycle bin. I have previously summarized it. Includes the first three basic game Knowledge in the previous article.

The content is the same, but I still feel that this article is clear.

However, it would be better to read the previous article if you want to know more about it.

Reprinted from: http://hi.baidu.com/qq578117961/item/ab6255f7c9fa7108d99e724e

Game Theory-there is an interesting game about Stone acquisition, that is, there are several heaps of objects, which can be matchsticks or pawns. Two people take things from the heap in turn

The final winner of the light object is required. This is an ancient game in China. Although this game is extremely simple, it contains

Mathematical principles. Next we will analyze how we can win.

(1) bash game ):
There are only one pile of N items, and two people take things from the pile of items in turn, each time at least one, a maximum of M. The final winner wins.

Obviously, if n = m + 1, a maximum of M can be obtained at a time. Therefore, no matter how many ones are taken by the first accessor, the latter can be retrieved at a time.

Take the remaining items and the latter wins. Therefore, we discovered the rule of How to Win: If n = (m + 1) R + S, (R is any natural number, S

≤ M), then the first accessors must take s items. If the latter takes K (≤ m) items, the first accessors take m + 1-K items, and the result is left

(M + 1) (r-1), after the keep this way, then the first accessors certainly win. In short, we need to keep the number of times (m + 1) to the opponent.

To win.
This game can also have a disguised gameplay: two people report at least one message each time, and a maximum of ten messages each time. Who can report 100 messages?

Winner. Sub-questions Drill

(2) wythoff game ):
There are several items in two stacks. Two people take the same number of items from one or both stacks in turn. It is required that at least one item be obtained at a time. There are no restrictions on the number of items, and the final winner wins.

In this case, it is quite complicated. We use (AK, BK) (Ak ≤ BK, K =, 2,..., n) to represent the number of items in two stacks.

It is said as a situation. If Party A faces (0, 0), Party A has lost. This situation is called a strange situation. The first few strange situations are:

(), (12

, 20 ).


It can be seen that a0 = b0 = 0, AK is the minimum natural number that has not appeared before, and BK = ak + K, the singular situation has
Three properties are as follows:

1. Any natural number is contained in one and only one singular situation.
Since AK is the minimum natural number that has not appeared before, so there is Ak> ak-1, and BK = ak + k> ak-1 + k-1 = bk-1

> Ak-1. So the property 1. Yes.
2. Any operation can change a singular situation to a non-singular situation.
In fact, if only one component of the singular situation (AK, BK) is changed, it is impossible for the other component

It must be a non-singular situation. If the two components of (AK, BK) are reduced at the same time, the difference will not change, and it is impossible to be other singular bureaus.

This is a non-singular situation.
3. An appropriate method can be used to convert a non-singular situation into a singular situation.

Assume that the situation is (A, B). If B = A, A is taken from both heaps to a strange situation (0, 0)

If a = ak, B> BK, then the objects B-BK are taken away, which becomes a singular situation. If a = ak, B <BK

When the AK-AB-ak objects are taken from the two heaps, it becomes a strange situation (AB-ak, AB-ak + B-ak); If a> AK,

B = ak + K, then the excess A-ak can be taken from the first heap. If a <AK, B = ak + k, there are two cases: the first,

A = AJ (j <K), just remove B-BJ from the second heap; 2, A = BJ (j <K), and remove B-AJ from the second heap.

You can.

From the above nature, we can see that if both of them adopt the correct operation, the first attacker will win in the face of non-singular situations. Otherwise, the latter will win.

Win.

How can we determine whether a situation (A, B) is a singular situation? We have the following formula:
Ak = [K (1 + √ 5)/2], BK = ak + K (k = 0, 1, 2,..., n square brackets indicate the entire function)
What's amazing is that there is a golden split (1 + √ 5)/2 = 1. 618... therefore, the rectangle composed of AK and BK is approximately a golden rectangle,

Because 2/(1 + √ 5) = (√ 5-1)/2, you can first find J = [A (√ 5-1)/2], if a = [J (1 + √ 5)/2], then a = AJ, BJ

= AJ + J. If it is not equal to, a = AJ + 1, BJ + 1 = AJ + 1 + J + 1. If it is none, it is not a strange situation. Then press

According to the above rules, there will be a strange situation.

Conclusion: Determine whether the situation (A, B) is a different situation: Ak = [K (1 + √ 5)/2], BK = ak + K (k = 0, 1, 2 ,..., N square brackets indicate taking the entire function) k = [A (√ 5-1)/2], if a = [K (1 + √ 5)/2], then a = ak, BK = ak + K. If not, A = ak + 1, BK + 1 = ak + 1 + k + 1. If none of them are, this is not a singular situation (3) nimm game ):
There are three stacks of several items. Two people take any number of items from one pile in turn, and each time at least one item is required. There are no restrictions on the number of items, and the final winner wins.

This situation is the most interesting. It is closely related to binary. We use (a, B, c) to indicate a situation, first (0, 0, 0)

However, it is a singular situation, and no matter who faces a singular situation, it will inevitably fail. The second singular situation is (0, n, n), as long as you take one with your opponent

Multiple items will eventually result in (0, 0, 0 ). After careful analysis, (, 3) is also a strange situation, no matter how the opponent gets it,

Next, you can change it to (0, N, N.

In computer algorithms, there is an operation called bitwise modulo 2 plus, or an exclusive or operation. We use the symbol (+) to represent this operation. This operation

The difference between calculation and general addition is that 1 + 1 = 0. First, let's look at the result of adding (1, 2, 3) the bitwise modulo 2:

1 = binary 01
2 = binary 10
3 = binary 11 (+)
-------
0 = binary 00 (do not carry)Equivalent to an exclusive or ^

For singular situations (0, n, n), the result is also 0.

Any singular situation (a, B, c) has a (+) B (+) C = 0.

If we are dealing with a non-singular situation (A, B, C), how can we change it to a singular situation?

Suppose a <B <C, we only need to change C to a (+) B,

The result is as follows: a (+) B (+) (a (+) B) = (a (+) A) (+) (B (+) B) = 0 (+) 0 = 0.

To change C to a (+) B, subtract C-(a (+) B) from C.

Example 1. (14,21, 39), 14 (+) 21 = 27,39-27 = 12, so take 12 objects from 39 to create a strange situation (14

).

Example 2. (121, 102,121), 55 (+) 81 = 102-121 = 19, so taking 19 items from forms a strange situation.

(55,81, 102 ).

Example 3. (29,45, 58), 29 (+) 45 = 48, 58-48 = 10, take 10 from 58 and change to (29,45, 48 ).

Example 4. Let's take a look at the actual game:
A: (, 9)-> (, 9) singular situations
B: (, 9)-> (, 4)
A: (, 4)-> (, 4) singular situations
B: (, 4)-> (, 4)
A: (, 4)-> (, 4) singular situations
B :( 0, 4, 4)-> (0, 4, 2)
A: (0.4, 2)-> (, 2) singular situations
B :( 0, 2)-> (0, 2, 1)
A: (0, 2, 1)-> (0, 1) singular situations
B: (0, 1)-> (0, 0)
A: (0, 0)-> (0, 0) singular situations
Jia Sheng.

Original (http://hi.baidu.com/alpc__ak47/blog/item/033eca25ecceaa3ac9955965.html)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.