Nonsense not much to say, look at the basic algorithm:
About game:
As for the game, Xie has given a non-technical definition in the theory of economic game: the game is that some individuals, teams or other organizations, in the face of certain environmental conditions, under certain rules, one or more times, at the same time or successively, from the respective allowed to choose the action or strategy to choose and implement, The process of achieving the respective results. A simple definition is that the decision to make before predicting a winning percentage is a game.
The elements of the game: 1. Game side, 2. Decision making, 3. Profit, 4. The number and order of games, 5. Game and information.
The classification of games:
(from the number of games) [single player game] [two-player game (0 and game) (non-zero-sum game)] [multiplayer Game (Alliance) (aligned)];
(from game times) [one game (static game)] [multiple game (dynamic game) (repetition game)];
(from information classification) [Full information game (static game) (dynamic game)] [Incomplete information game (static game) (dynamic game)];
0 and game:
0 and game refers to the parties involved in the game under strict competition in the next party's earnings necessarily means the loss of the other party, the sum of the gains and losses of the game parties always equal to zero.
There are 0 saddle points and the game:
In the matrix, a number in the row where the maximum value, in the column is the minimum, or in the columns where the maximum value, where the minimum value of the exercise, then this number is called the saddle point. In 0 and the game, this number is the maximum return of one party and the other's minimum income. 0 and the game has a saddle point situation is not very common, most of the 0 and the game is not saddle point.
The solution of the game:
The solution of the game is a pair of equilibrium strategies that both sides have to accept in order to maximize their profits. 0 of the saddle Point and the solution of the game is a strategy pair, is determined by the game situation, in the other side of the constraints, the two sides finally have to accept the outcome of the corresponding pair of strategies.
0 and game solving methods with saddle points:
Select the smallest number in each row of the game matrix, select the largest number in these minimum numbers, select the largest number in the column, and then select the smallest number in the maximum number, and if the row and column values are equal, then this number is the value of the game, and the corresponding row and column strategy is the solution to the problem.
0 and Game Von.neumann and mogenstern the general description of the maximum minimum or minimum maximum strategy solution:
The game party is party A and party B II, party A's strategy is I1 to in, party B's strategy is II1 to IIM, the income matrix:
The minimum value that can be obtained under the maximum minimum policy is:
b The maximum allowed for a under the minimum maximum strategy is:
It can be proved that:
If
It is called the maximum minimum or minimum maximum criterion of the game under the value, recorded as V, at this time the strategy for the maximum minimum policy or the minimum maximum strategy solution.
In fact, the game with a saddle point is not always there. But for chess the next algorithm has a little auxiliary understanding on the line.
Next, we can see the Alpha-beta pruning algorithm of Chinese chess commonly used algorithm:
Alpha-beta algorithm is an optimization of the minimax algorithm, it is in the search process, the current has the best results after the decision whether to continue the deep search down. The Alpha-beta algorithm can only be implemented using recursion, in the recursive operation, the alpha and beta values are passed in, Alpha is the best value to search, any value smaller than alpha is cut off directly; Beta is the worst value for the opponent, so This value is also acceptable to the opponent of the worst worthy of the bottom line, according to the strategy, if the search process is returned a better than beta value, for our moves side will not have this opportunity, we should directly return the worst value, but because of the other side of the situation, he will always find a better than the beta value.
The algorithm generation of Chinese chess:Because the average of every situation in Chinese chess is20To60, which is relatively complex, on average each situation is40 a walk;
Chinese Chess value evaluation: Chinese chess can not be directly from a situation to search and calculate the winning and losing, only a limited search for the pros and cons of the situation.
(1) The value of a piece: The total value of a piece is equal to the sum of all pieces multiplied by the value of the corresponding piece. In short, that is to say, the situation that the party has the basic situation of chess pieces;
(2) Location value: Because different pieces play different roles in different positions, therefore, each piece in each situation corresponding to the position will have a different value value;
(3) Relationship value: The relationship between chess pieces is also an important factor to evaluate the pros and cons of both sides;
In the game tree, for example, Black wins chess situation is a maximum value, then the red side is the minimum value, draw is 0. Then, the black side will let the situation of the score has been large, and the red side can only reduce the situation score. As a result, black chooses a node with a greater score, and the red side chooses the smallest node that can be accepted within the range.
Practice summary of Online games (3)