Some conclusions Game Theory

Thanks https://www.luogu.org/blog/user38385/solution-p2252

Since yesterday took the test a program of fill-in game theory, game theory will cloud has been hovering in my mind, today to fill in the pit.

A. Game Bash (Bash Game)

A and B are a number of newspaper, reported that a minimum of every person, up to four newspaper to see who report to thirty. This should be the oldest game Bash game on the bar.

In fact, if you know the principle, this game is a little luck are not only related to hand and has, for example, for the first time reported that the number, A reported number k, then the number of 5-k B report, the number of reported problems after B becomes a and B into a number of newspaper who should report to the 25, and then becomes 20,15,10,5. when that time 5, no matter how a number off, the last one is in the affirmative B is reported, it can be seen as B in FLAC not lose the game.

So if we want to report the number n, each reported at least one newspaper a maximum of m, so that we can find an integer k and r, the

n = k * (m + 1) + r, into the above example, we can know, if r = 0, then the upper hand will be lost, otherwise the upper hand win.

Second Weizuo Fu Game (Wythoff Game):

There are a number of piles of each article, the two turns taken from a stack wherein the at least one article, not up, or from the same piles of items simultaneously, by taking a predetermined final finish victory.

Conclusion (ztm strange):

If the initial value of piles of articles (x, y) and x <y, so that z = yx, denoted w = (int) ((sqrt (5) +1) / 2 * z)

if (w == x) losing sente; else the upper hand win.

III. Nimes Game (Nim Game)

Nimes game means: there any heap objects, the number of items per stack is arbitrary, the two sides take turns taking items from each can only take part or all of the items from a pile of articles, at least take one, take the last man to win an item.

in conclusion:

The number of items per stack XOR and losing the upper hand to zero, otherwise the upper hand to win.

 

Four Fibonacci Qi Bo Yi:

There are a bunch of articles, the two take turns retrieving items, taking the upper hand at least one and up to no upper limit, but it can not take complete article, several items can not be taken after each made a number of items and is at least twice more than the one taken take the last item of the people to win.

in conclusion:

Wins the upper hand if and only if n is not a Fibonacci number (n is the total number of items)

Guess you like

Origin www.cnblogs.com/Wangsheng5/p/11707582.html