Summary of simple game theory and the analysis of the examples

Source: Internet
Author: User

(a) Bashbor (Bash game): only a pile of n items, two people take turns from this heap of goods, rules
Take at least one at a time, whichever is more than M. Finally the light winner wins.

Obviously, if the n=m+1, then because at most can take m at a time, so, no matter how many first take away,
The latter will be able to take the remaining items one at a time, which will win. So we found the law of how to win: if
N= (m+1) R+s, (R is any natural number, s≤m), then the first person to take the s items, if the latter take away
K (≤m), then take the first take m+1-k, the result is left (m+1) (r-1), and then keep such
The first pick-up is sure to win. In short, to keep a multiple of the opponent left (m+1), you can win the final.
This game can also have a disguised play: Two people take turns off, at least one at a time, up to ten
A, who can report 100 wins.
(ii) Witzov (Wythoff game): There are two piles of several items, two people take turns from a heap or the same
When taking the same number of items from the two piles, the rule is to take at least one at a time, many more, and finally the winner wins.

In this case it is quite complicated. We use (AK,BK) (AK≤BK, K=0,1,2,...,n) to express
Two piles of goods and called it the situation , if a face (0,0), then A has been lost, this situation we
Called the singular situation . The first few strange situations are: (0,0), (3,5), (4,7), (6),
10), (8,13), (9,15), (11,18), (12,20).

As can be seen, A0=b0=0,ak is not in front of the smallest natural number, while bk= AK + K, the singular situation has
Three properties in this article:

1. Any natural number is contained in one and only one singular situation.
AK > Ak-1, and bk= AK + K > AK, due to the minimum natural number not appearing before
-1 + k-1 = bk-1 > Ak-1. So the nature of 1. Was founded.
2. Any operation can transform the singular situation into a non-singular situation.
In fact, if only one component of the singular situation (AK,BK) is changed, the other component cannot be
In his singular situation, so must be the non-singular situation. If the two components of the (AK,BK) are reduced at the same time, the
It is not the same, and it cannot be the difference of other singular situations, so it is also a non-singular situation.
3. The non-singular situation could be transformed into a singular situation by appropriate means.

Assume that the situation is (A, a, b), if the second = A, then take a object from both piles, it becomes
Singular situation (0,0); If a = AK, B > BK, then take the B–BK object and change to a singular board.
If a = AK, b < BK, the AK–AB + AK object is removed from both piles and changed to a singular station.
(Ab–ak, ab–ak+ B–ak); If a > AK, b= AK + K, take the excess from the first heap
The number of A–ak can be, if a < AK, b= AK + K, in two cases, the first type, A=aj (J < k)
, take b–bj from the second pile, and the second, A=BJ (J < K), take b–a from the second pile.
J can.

According to the nature of the above, two people if all use the correct operation, then face the non-singular situation, the first to win the winner
On the contrary, the latter wins.

So let's give a situation (a, B), how do you judge if it is a singular situation? We have the following formula:

AK =[k (1+√5)/2],bk= AK + k (k=0,1,2,...,n square brackets denote rounding function)

The wonderful thing is that the number of golden Divisions (1+√5)/2 = 1 appears. 618 ..., so that the rectangle made up of AK,BK is nearly
Like a golden rectangle, because 2/(1+√5) = (√5-1)/2, you can first find out j=[a (√5-1)/2], if a=[
J (1+√5)/2], then a = AJ,BJ = AJ + j, if not equal, then a = Aj+1,bj+1 = Aj+1
+ j + 1, if not, then it is not a singular situation. And then follow the above-mentioned rules, you will encounter strange
Situation.

(iii) Nimbo (nimm game): There are three piles of various items, two people take turns from a heap of any number of
Articles, the provisions of at least one at a time, more than open, and finally the winner of the light wins.

For the situation of a Nim game (A1,a2,..., an), it is p-position when and only if a1^a2^...^an=0, where ^ represents XOR (XOR) operation. More game theory knowledge see http://www.cnblogs.com/kuangbin/archive/2011/08/28/2156426.html ba Shi Game (a pile, a limited number of each acquisition) 1.hdu1846 ba Shi game naked problem 2.hdu1847 simple analysis can be found if the current situation is a multiple of three, that is a singular situation, the initiator will lose, if the initiator can take the corresponding stones to make it into a multiple of three, then the initiator wins. Witzov Game (two heap of stones, a heap to take any number or two heaps to take as much as) 1.hdu1527 Witzov game naked problem 2.hdu2177 and the previous question the only difference is that if the initiator wins, the output of the situation after he took one. Judging or directly judging if the current situation is not a singular situation, let him become a singular situation there are two situations, one is the overall reduction, the other is to reduce the overall reduction because the difference K constant, you can calculate the AK, if the A>ak output (ak,ak+k) can, another case of violent enumeration can be, The concrete change which pile is two kind of situation, pay attention to the situation of a==b, only judge one kind can.

Summary of simple game theory and the analysis of the examples

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.