Disclosure of Invention
The invention aims to provide an algorithm method for optimizing a matching mechanism of a ten-player online competitive game, which can effectively improve the confrontation experience of players, increase the interestingness of the competitive game and promote the development of the game industry.
In order to achieve the above purposes, the invention adopts the technical scheme that:
an algorithmic method for optimizing a ten player online competitive game matching mechanism, comprising the steps of:
1) collection of player gaming information
Collecting the game information of the nearest N fields of each player entering at a certain time, wherein the game information refers to two aspects, namely the score of the nearest N fields of games and the role occupation selection condition of the nearest N fields of games; supplied to step 2);
2) scored 1-D convolution
Carrying out convolution operation on the N field scores score of each player by using 1 row, N columns and 1-D templates respectively, wherein the coefficients of the templates correspond to the N field scores score of each player one by one, so as to obtain convolution operation results equal to the number of matched people in the step 1), and recording the convolution results as G; after all players perform the same operation, each matched player in the step 1) has a G value; provided to step 3), step 6);
3) section setting of score
Randomly sampling all matched players in the step 2) to obtain G values of ten players, namely extracting ten G values, carrying out 1-D convolution on the ten G values by utilizing the template in the figure 4, recording the convolution result as A, and setting A +/-20% as a scoring interval; supplied to step 6);
4) function mapping for role occupations
Respectively executing the same operation on all the players matched in the step 1), performing function mapping on the selection of N game role occupations of each player in the step 1), wherein the mapping function is in the form of t ═ E (role occupations), wherein E is a functional relation, t is a mapping result, t of each occupation in the five types of occupations has uniqueness, counting the same t, and obtaining the number d corresponding to each t, namely a table of fig. 5t-d, wherein all the players matched in the step 1) have a respective table of fig. 5 t-d; supplied to step 5);
5) generation of player combinations
Obtaining the maximum value d of the d (d1, d2, d3, d4, d5) value of each player in the step 4) through a maximum value functionmaxAnd t is one of 000, 001, 010, 011 and 100 and is marked as tdmax(ii) a Arithmetic matching five different tdmaxTraversing all matched players in the step 1) for one player combination to generate a player combination of one group of five persons, namely obtaining a primary player combination, and providing the primary player combination for the step 6) for screening;
6) final player combination derivation
Recording the G value of each group of players in the preliminary player combination obtained in the step 5) as G1, G2, G3, G4 and G5, and calculating Gave(G1+ G2+ G3+ G4+ G5)/5, if GaveIn step 3), the interval is set, and the set of player combinations is the final player combination.
In step 5), the arithmetic matching algorithm realizes five different tdmaxBy the following steps:
step 5.2.1, matching t of all players matched in 1)dmaxForming a queue, the length of the queue is consistent with the number of players, setting a mark p to point to t of the first player in the queuedmax。
Step 5.2.2, take out t of the first player by pdmaxT of the first player, denoted t1, reserved t1dmaxDisappear from the queue, then p moves one bit backwards, pointing to t of the second playerdmax。
Step 5.2.3, the second name is taken out by reusing pT of playerdmaxIf t1 is equal to t of the second playerdmaxOtherwise, t of the second player is reserveddmaxT2 and t1 form a combination, denoted t2, of the second playerdmaxAlso disappear from the queue; otherwise, t of the second player is setdmaxThe home position of the queue is retired. P is shifted back by one bit.
And 5.2.4, repeating the step 5.2.3 to obtain t3, t4 and t5, wherein 5 players corresponding to t1, t2, t3, t4 and t5 are a group of player combinations.
Step 5.2.4-1 if p points to t of the last player in the queuedmaxI.e. the first traversal is finished, it is found that a group of player combinations cannot be formed, then all the processes of the present invention are executed again by the player who has been taken out, the remaining players in the queue and the next player who enters the matching, and step 5.2.5, step 5.2.6 and step 6 are not executed); if at least one set of player combinations is generated after the first traversal, then steps 5.2.5, 5.2.6, and 6) continue.
Step 5.2.5, now again point p move to t of the first player of the remaining players in the queuedmaxAnd repeating the steps 5.2.1 to 5.2.4 to achieve the aim of traversing all players.
Step 5.2.6, when p points to t of the last player in the queuedmaxWhen it is found that a group of t1, t2, t3, t4, t5 combinations is no longer available, all the processes of the present invention are executed again for the player who has taken out, the players who remain in the queue, the player combinations which do not satisfy the scoring interval in step 3) in step 6), and the next group of players who enter the matching.
The invention can effectively reduce the difference of the average game level of the players of the two parties, reduce the probability of conflict of professional choices of the role of the player of one party and improve the game experience of the players of the two parties. The significance of the invention is as follows: on one hand, for the individual player, the body and mind are more fully relaxed in a limited time, the game experience of the player is increased, the industrial purpose of the game for serving life is met, and the construction pace of the harmonious society is accelerated to a certain extent. On the other hand, the crowd base of the multiplayer online competitive game is necessarily and continuously expanded along with the time. The use of the invention promotes the development and growth of the games in the game market and indirectly promotes the development of the whole game industry.
Examples
An algorithmic method for optimizing a ten player online competitive game matching mechanism, comprising the steps of:
1) collection of player gaming information
Collecting game information of a plurality of N fields (in the embodiment, 30 fields are set for N) which enter each player between certain matching time (in the embodiment, 5S-60S), wherein the game information refers to two aspects, namely scoring score of the game of the N fields (in the embodiment, 30 fields) and character occupation selection condition of the game of the N fields (in the embodiment, 30 fields); supplied to step 2);
2) scored 1-D convolution
Carrying out convolution operation on 30 field scores score of each player by using 1 row and 30 columns of 1-D templates in the figure 3, wherein the coefficients of the templates correspond to the 30 field scores score of each player one by one, so as to obtain a convolution operation result equal to the number of matched people in the step 1), and recording the convolution result as G; after all players perform the same operation, each matched player in the step 1) has a G value; provided to step 3), step 6);
3) section setting of score
Randomly sampling all matched players in the step 2) to obtain G values of ten players, namely extracting ten G values, carrying out 1-D convolution on the ten G values by utilizing the template in the figure 4, recording the convolution result as A, and setting A +/-20% as a scoring interval; supplied to step 6);
4) function mapping for role occupations
Respectively executing the same operation on all the players matched in the step 1), performing function mapping on the selection of thirty game role occupations of each player in the step 1), wherein the mapping function is in the form of t ═ E (role occupations), wherein E is a functional relation, t is a mapping result, t of each of the five occupations has uniqueness, counting the same t, and obtaining the number d corresponding to each t, namely a table of fig. 5t-d, wherein all the players matched in the step 1) have a respective table of fig. 5 t-d; supplied to step 5);
5) generation of player combinations
Obtaining the maximum value d of the d (d1, d2, d3, d4, d5) value of each player in the step 4) through a maximum value functionmaxAnd t is one of 000, 001, 010, 011 and 100 and is marked as tdmax(ii) a Arithmetic matching five different tdmaxTraversing all matched players in the step 1) for one player combination to generate a player combination of one group of five persons, namely obtaining a primary player combination, and providing the primary player combination for the step 6) for screening;
6) final player combination derivation
Recording the G value of each group of players in the preliminary player combination obtained in the step 5) as G1, G2, G3, G4 and G5, and calculating Gave(G1+ G2+ G3+ G4+ G5)/5, if GaveIn step 3), the interval is set, and the set of player combinations is the final player combination.
Each step is described in detail below
In step 2), performing convolution operation of scores of each player: the size of the template of fig. 3 should be consistent with the game field, i.e., 30. In addition, according to the characteristic that the correlation degree between the game field closer in time and the current game level is larger, the one-to-one correspondence between the coefficient of the template in fig. 3 and the 30-field score of each player in the step 1) refers to the one-to-one correspondence between the coefficient from large to small of the template in fig. 3 and the 30-field score of each player from near to far in time.
The specific method comprises the following steps:
the value of G resulting from the template convolution of FIG. 2 should reflect the current game level of each matching player of step 1). It is logical that the score correlation degree is higher when the current game level is closer to the time point, and the score correlation degree is lower when the current game level is farther from the time point. To implement the above logic, the 30-field score of each player in step 1) is recorded as 1 st field, 2 nd field, n.n.n.30 th field according to the sequence of time points from far to near, and corresponds to the template coefficients f (1), f (2).. f (n)... f (30) in fig. 3, and the value of f (n) is determined by the following formula:
f(n)=(1/2)f(n-1)+(1/4)f(n-2)+(1/8)f(n-3)+......+(1/2n-1) f (1) +1(f (1) ═ 1, n ═ 2,3,4.. 30), the values of the template coefficients in fig. 2, i.e. in fig. 3, are finally determined.
score (n) represents the score of the nth field, then for step 1) each matched player G ═ (1/(f (1) + f (2) +. ·. · f (30))) (f (1) × score (1) + f (2) × score (2) +. ·.
Step 3) significance:
the convolution result a in step 3) represents the average level of all matched players in step 1), and to achieve this, the following steps can be performed:
step 3.1, recording step 3) the G values of the ten players are G0, G1,. to.. G9, and the coefficients of the templates of fig. 4 are a0, a1 and a2.. to.. a9, respectively;
3.2, G0 and A0, G1 and A1.... G9 and A9 correspond to each other one by one;
step 3.3, normalizing the template coefficients of FIG. 4: g0+ G1+, + G9,
determining the template coefficients of fig. 4 by calculating a0 ═ G0/T, a1 ═ G1/T.. a9 ═ G9/T;
step 3.4, after which a is determined by: a × G0 × a0+ G1 × a1+. a9 × a 9.
Step 4):
the character professions can be divided into five types in total, which is consistent with the number of players on one side of a ten-player online competitive game. The embodiment is provided for ten-player online competitive games, players are divided into two camps, each of the camps is five, each player has a game task, and the game tasks correspond to five different professions.
In step 4), t is coded in a three-bit binary manner, and five different t respectively correspond to 000, 001, 010, 011 and 100 and correspond to d1, d2, d3, d4 and d 5.
t takes 000001010011100 five three-digit binary numbers to encode, and the five binary numbers correspond to five roles, so the corresponding relation E of the function independent variable and the dependent variable is single-to-single.
All players matched in the step 1) are respectively provided with a t-d table matched with the players per se shown in fig. 5, the use frequency of each occupation of the players in the last thirty times is reflected exactly, the larger the value of d is, the more favored the players are in the corresponding occupation, and the smaller the value of d is, the more contradictory the players are in the corresponding occupation.
Step 5):
the arithmetic matching is characterized in that all t consistent with the number of matched players in the step 1) can be matcheddmaxIn matching five different tdmaxCombined as a group of players and up to the point where the remaining players fail to satisfy five different t' sdmaxThis condition is up to.
Suppose now that step 1) matches 101 players, each of them dmaxCorrespond to respective tdmax(dmaxThe corresponding t is denoted as tdmax) That is, there are 101 t in totaldmax,
At this time at 101 tdmaxIn, there may not even be a way to find five different tdmaxOne group, it is also possible to find two and three groups but at most twenty groups, as this is necessarily limited by the total number of approaches 101. At least one player can not participate in the combination in any way, and then the players which cannot be combined and the next round of matched players are required to perform all processes again.
Number of players matched in step 1) and t generated in step 5)dmaxIs consistent, the arithmetic matching algorithm realizes five different tdmaxBy the following steps:
step 5.2.1, matching t of all players matched in 1)dmaxForming a queue, the length of the queue is consistent with the number of players, setting a mark p to point to t of the first player in the queuedmax。
And 5. step 5.2.2, take t of the first player with pdmaxT of the first player, denoted t1, reserved t1dmaxDisappear from the queue, then p moves one bit backwards, pointing to t of the second playerdmax。
Step 5.2.3, take t of the second player again with pdmaxIf t1 is equal to t of the second playerdmaxOtherwise, t of the second player is reserveddmaxT2 and t1 form a combination, denoted t2, of the second playerdmaxAlso disappear from the queue; otherwise, t of the second player is setdmaxThe home position of the queue is retired. P is shifted back by one bit.
And 5.2.4, repeating the step 5.2.3 to obtain t3, t4 and t5, wherein 5 players corresponding to t1, t2, t3, t4 and t5 are a group of player combinations.
Step 5.2.4-1 if p points to t of the last player in the queuedmaxI.e. the first traversal is finished, it is found that a group of player combinations cannot be formed, then all the processes of the present invention are executed again by the player who has been taken out, the remaining players in the queue and the next player who enters the matching, and step 5.2.5, step 5.2.6 and step 6 are not executed); if at least one set of player combinations is generated after the first traversal, then steps 5.2.5, 5.2.6, and 6) continue.
Step 5.2.5, now again point p move to t of the first player of the remaining players in the queuedmaxAnd repeating the steps 5.2.1 to 5.2.4 to achieve the aim of traversing all players.
Step 5.2.6, when p points to t of the last player in the queuedmaxWhen it is found that a group of t1, t2, t3, t4, t5 combinations is no longer available, all the processes of the present invention are executed again for the player who has taken out, the players who remain in the queue, the player combinations which do not satisfy the scoring interval in step 3) in step 6), and the next group of players who enter the matching.
The maximum function is of the form dmaxF (d1, d2, d3, d4, d5) for obtaining the maximum value or one of the maximum values among d1, d2, d3, d4, d5 of each player. F is a function corresponding relation, and the algorithm comprises the following steps:
step 5.1.1, first dmaxD1, i.e., assume that d1 is the maximum or one of the maxima.
Step 5.1.2, mixing dmaxIf d2 is greater than d, as compared to d2maxThen let dmaxD2 otherwisemaxThe value is unchanged.
Repeat step 5.1.2, dmaxComparing with d3, d4 and d5 in sequence to finally obtain the maximum value or one of the maximum values d of d1, d2, d3, d4 and d5max。
For example, a player has a t-d table as shown in FIG. 5, where 5 d values are recorded as d1, d2, d3, d4, d5, and the maximum value or one of the maximum values of the 5 d values is recorded as dmax
That should determine how to dmaxIs there?
Assuming that the player's d-value is 45665 respectively,
suppose dmax4, 4 corresponds to d1, dmaxComparison with d2, i.e. 4 and 5, since 5>4, so update dmaxLet dmax=5;dmaxComparison with d3, i.e. 5 and 6 (because dmaxHas been updated) because 6>5, continuously updating dmax,dmax=6;dmaxCompare with d4, i.e. 6 and 6, because 6 ═ 6, d is not updatedmax,dmaxIs still 6; dmaxComparison with d5, i.e. 6 and 5, since 5<6, do not update dmax,dmaxIs still 6;
thus dmaxWith 6, i.e. d3, corresponding to t being 010.