Game personal opinion and Game Opinion

Source: Internet
Author: User

Game personal opinion and Game Opinion

The weekly test was abused. after a long time of game questions, I found a lot of information about the game. I felt like I was still moving a little bit. Before going to bed, I would like to give a brief summary. I hope I can feel something later !!

Next is the question.

When talking about games, it is actually about finding rules, but knowing the general game type can quickly and conveniently solve the problem.

There are roughly the following types of games:The bashe game, vizov Boyi, and Nimes game. In addition, there are Fibonacci games and sg templates..

Bashi game:(From Baidu Library)

Bashi game(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 items can be taken at a time. Therefore, no matter how many items are taken by the first accessor, the latter can take the remaining items at a time, the latter wins. Therefore, we discovered the rule of How to Win: If n = (m + 1) r + s, (r is an arbitrary natural number, s ≤ m ), the first accessors must take s items. If the second accessors take k (≤ m) items, the first accessors take m + 1-k items, and the result is (m + 1) (r-1), and later to maintain such a method, then the first accessors certainly win. In short, we need to leave a multiple (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 to the 100 winner.


The main content of the Bashi game is: whether n % (m + 1) is zero. If it is zero, it means losing first, otherwise, winning first


Weizoboyi: (The following statements are taken from the Baidu Library on the Internet to maintain the integrity and accuracy of the description. They are not described below)

Weizoboyi(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 to take at least one item each time, the final winner wins.
In this case, it is quite complicated. We use (ak, bk) (ak ≤ bk, k = 0, 1, 2 ,..., n) indicates the number of items in two heaps and the situation. If a faces (0, 0), 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 the following three properties:
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, the other component cannot be in another singular situation, so it must be a non-singular situation. If the two components of (ak, bk) are reduced at the same time, it is a non-singular situation because the difference remains unchanged and cannot be the difference of other singular situations.
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 ); if a = ak, B> bk, then the objects B-bk are taken away, which becomes a singular situation. If a = ak, B <bk, the ak-AB-ak objects are taken from the two stacks at the same time to change to a singular 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; second, a = bj (j <k ), remove B-aj from the second heap.
From the above nature, we can see that if both of them adopt the correct operation, the winner will win in the face of non-singular situations. Otherwise, the winner will 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 integer 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 obtain j = [a (√ 5-1)/2] first. 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, according to the above rules, we will surely encounter a strange situation.
Situation.


The thought of weizoboyi is that formula: judge whether the equal signs are equal. a (a is a small number) = floor (B-a) * (sqrt (5.0) + 1)/2 ))

If they are the same, they are the first to lose. Otherwise, the first to win.


Nimes game:

Nimes gameBasic Idea:

The two take any number of items from the n-heap, and win the first win.

The number of n-heap items is equal to or different. If the value is 0, the first hand is defeated.

If the number of methods that require first-hand victory is measured in a singular situation, then, compare the value of the exclusive or with the original value (the result should indicate that the heap does not participate in the exclusive or exclusive value) and the original value,

If the value is smaller than, add one to the number of methods. After the corresponding method, the heap's number strain is an exclusive or different value from the original value of each heap.


The main content of the Nimes game is to perform an exclusive or operation on the quantity of each heap.


Fibonacci's Game)
The Fibonacci game model is similar to the following:
There are a pile of stones with n numbers, and the game sides take turns to take stones to meet the following requirements:
1. You cannot finish taking all the stones for the first time;
2. The number of stones that can be obtained each time is between 1 and 2 times the number of stones that the opponent just picked (including 2 times the number of stones that the opponent just picked ).
The winner of the last stone is agreed to be defeated.

 

(Conversion) Analysis:
Output second when n = 2;
When n = 3, it is also the output second;
When n = 4, the first person must take one to win, and the remaining stones are three. No matter how the second person gets it, the first person can win and output first;
When n = 5, first won't win, because when he gets 2, second directly removes the remaining three to win. When he gets 1, in this case, n is 4, so the output is second;
When n = 6, if first is removed, the situation can be changed to the case where n is 5, so first is output;
When n = 7, the first node gets two and the first node gets the first node. The first node wins because the first node gets the first node;
When n = 8, when first gets 1, the situation turns 7, the second wins, and the first gets 2, the situation turns n to 6, this is also the second winner. In the case of 3, second directly removes the remaining 5, so when n = 8, the output is second;
............
From the above analysis, we can see that when n is 2, 3, 5, and 8, these are the outputs of second, that is, the point of defeat. Careful people will find that these rules meet the Fibonacci number, it can be inferred that 13 is also a must-have point.
With the help of zeckenddorf's theorem, any positive integer can be expressed as the sum of several discontinuous Fibonacci numbers. When n = 12, anyone who can make the stone 8 left and the Child acquisition does not exceed 3 will be able to win. Therefore, we can regard 12 as 8 + 4 and 8 as a station, which is equivalent to performing a "panic operation" on 4 ". Another example is that 13, 13 = 8 + 5, 5 is a mandatory defeat, and 13 is also a mandatory defeat. That is to say, as long as it is a Fibonacci number, it is a point of defeat.
So we can use the Fibonacci number formula: fib [I] = fib [I-1] + fib [I-2], as long as n is the Fibonacci number, output No.

This is basically the common game type. In the future, I will discuss more.



I want to teach you some insights on Game Theory. As long as you have a personal understanding, do not leave a message if you copy and paste the information on the Internet.

I just met one thing some time ago and thought it was quite a game match. I posted a short article on my blog. You can take a look at it ~~ Link: xing2007.07.blog.163.com/...47114/

What is the meaning of the word game?

The game is about playing chess. Think about how the two sides make decisions when playing chess, that is, to consider the impact of the decision of the other Party on their own decisions and the impact of their decisions on the other party.
In short, when you make decisions, you should not only consider your preferences and budgets, but also others' responses.

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.