Combined game (game)

Source: Internet
Author: User

Yesterday I read the big white book and turned to the combined game chapter. I found that it was originally a game theory, so I went on to watch it. I really don't know. I only know how weak my level is at first glance, but I have concentrated on most of my views. Starting from the NIM game (N piles of stones, each person can get at least one and at most one heap of stones from any heap each time, but not the loser, introduce the concept of winning and losing --

1. A State is a "fail" State, and only when all its successors are a "fail" state.

2. A State is a winning state. If it has at least one successor, it will be defeated.

This is what Liu rujia said. To put it bluntly, all the successors of the defeat will be victorious, the winning state only requires one successor to be defeated (here, the winning state and the defeated State all mean victory and defeat for the first hand ). It can be seen that the mandatory defeat meets more stringent conditions than the mandatory victory. If there is no successor status, it will be defeated (that is, the final state). Generally, the rule is that players that cannot operate are defeated (on the premise that both sides are smart enough ), then, a directed acyclic graph can be used to represent the two-person game process. In fact, this is not necessary. For Nim games, scientists have come up with a theorem: State (x1, x2 ..... ...... ^ xn = 0, that is, all numbers are used for an exclusive or sum operation, also known as Nim sum. It can be proved that if the value of Nim sum is 0, it will be defeated. If the value is not 0, it will be defeated. This is because the current status is 0, A certain operation can always change Nim sum to non-zero (because it changes any number (that is, any pile of stones), its binary form will change one or more digits, at this time, the NIM sum, which was originally set to 0, will change (some bits will change to 1), that is, all the successors will win. When the current status is not 0, there must be an operation that can change Nim sum to 0 (you only need to start on the bit whose value is 1 on the NIM sum binary), that is, there must be a successor State to the defeat state. This is the Bouton theorem.

However, I can see that the Bouton theorem is actually a specific application of the SG theorem. What is the SG theorem? First, introduce the SG function: For any State X, define SG (x) = Mex (s), where S is the set of SG function values in the subsequent State of X, while Mex (s) indicates the smallest non-negative integer not within S. Do you feel a little recursive? That's right. In fact, it can use recursion to find the values of each SG function (pay attention to the calculation order and analyze the values based on specific questions ), you can also use the deep search and Backtracking Method with memory added (not recommended ). The SG theorem means that the winning (failed) state of the game and the game are equal to the NIM sum of the SG function of each sub-game. In this way, each sub-game can be managed separately, greatly simplifying the problem. In fact, although many questions can be analyzed using these theories (this is true, the SG function is the king to solve the Game Problem !), But it is often not so hard to ask you for various sub-SG functions. When doing these game questions, you must read the meaning of the question and grasp the essence of the question... Apply to all questions), just do it (0.0), as long as you find the winning and losing states in the position of what features (usually there will be a cycle ), obviously, one or two cycles can be used up. Don't think too much. (sometimes I think too much about the problem. I always want to include some specific algorithms, templates, and so on. I cannot think about the results -. -| )...... In a word, a lot of questions and get experiences are king. There are a lot of classic game questions on hangdian, don't despise me. I will only seek questions on hang Dian for the time being.) I will go to the game questions under water in a few days. If I have time, I will try to solve them one by one ~

  

-- The above theories are based on Liu lujia's big white book. With his own opinions, I feel that if I am not very clear about it, I can go to the section on the 2.4 combo game in the big white book to read it in detail, don't like it, don't spray it, hope all the great gods pass.

Combined game (game)

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.