A Mahjong data processing method and related device
By using the card throwing model and the bar-touching model to make dynamic decisions in mahjong data processing, the problem of poor decision-making effect caused by logical judgment in the prior art is solved, and the effect of mahjong data processing is improved.
Patent Information
- Application Number
- CN202111487150.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-12-07
AI Technical Summary
In the mahjong data processing, the use of limited logical judgment leads to poor decision-making effect, which reduces the effect of automated cards.
By determining whether the received request is a card throw request, if so, the corresponding card throw data will be calculated and sent according to the card throw model. If not, the corresponding action data will be calculated and sent according to the bar-to-bar-to-be model.
It improves the processing effect of mahjong data, avoids decision-making problems caused by limited logical judgments, and enhances the accuracy and effectiveness of automated cards.
Smart Images

Figure CN114146400B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular, to a method for processing mahjong data, a device for processing mahjong data, a server, and a computer-readable storage medium. Background Art
[0002] With the continuous development of information technology, in the field of game technology, due to the problem of insufficient participants in the game, it is necessary to automatically process the data in the game in order to realize the virtual game process and improve the sense of participation of the actual game participants.
[0003] In the related art, mainly artificial writing of limited logical relationships is used to abstract all the card faces into a limited number, and then specific decisions are made for these limited situations one by one in order to realize the automatic card-playing decision. However, no matter what the situation is, as long as the card-playing conditions are met, the decision is fixed. In the actual game data, problems such as poor decision-making effects occur, reducing the effect of automatic card-playing.
[0004] Therefore, how to improve the processing effect of mahjong data is the key issue that those skilled in the art are concerned about. Summary of the Invention
[0005] The purpose of the present application is to provide a method for processing mahjong data, a device for processing mahjong data, a server, and a computer-readable storage medium. By determining whether the received request is a discard request, if so, calculating and sending the corresponding discard data according to the discard model, if not, calculating and sending the corresponding action data according to the pong / kong / hu model, rather than making decisions using limited logical judgments, the processing effect of mahjong data is improved.
[0006] To solve the above technical problems, the present application provides a method for processing mahjong data, including:
[0007] The data processing server determines whether the request sent by the mahjong game server is a discard request;
[0008] If so, the discard model is used to calculate the game environment data to obtain the discard data, and the discard data is sent; wherein, the discard model is trained according to the discard training data;
[0009] If not, the pong / kong / hu model is used to calculate the game environment data to obtain the action data, and the action data is sent; wherein, the pong / kong / hu model is trained according to the pong / kong / hu training data.
[0010] Optionally, using the discard model to calculate the game environment data to obtain the discard data, and sending the discard data, includes:
[0011] Calculate the game environment data according to the discard model based on the fixed discard card type to obtain the discard data; wherein, the fixed discard card type is obtained by calculating the initial game environment data using the fixed discard model;
[0012] Send the discard data.
[0013] Optionally, the step of calculating the fixed discard card type by using the fixed discard model for the initial game environment data includes:
[0014] Perform an environment initialization operation to obtain the initial game environment data;
[0015] Calculate the fixed discard card type according to the fixed discard model for the initial game environment data; wherein, the fixed discard model is obtained by training according to the fixed discard training data.
[0016] Optionally, it further includes:
[0017] Extract discard training data, pong / kong / hu training data, and fixed discard training data from the obtained training data.
[0018] Optionally, using the discard model to calculate the game environment data to obtain the discard data and send the discard data includes:
[0019] Use the discard model to calculate the game environment data to obtain the probability value of each card type;
[0020] Take the data of the card type with the maximum probability value as the discard data.
[0021] Optionally, using the pong / kong / hu model to calculate the game environment data to obtain the action data and send the action data includes:
[0022] Use the pong / kong / hu model to calculate the game environment data to obtain the probability of hu operation, the probability of pong operation, the probability of kong operation, and the probability of passing;
[0023] Take the operation with the maximum probability as the action data.
[0024] This application also provides a mahjong data processing device, including:
[0025] A request judgment module for judging whether the request sent by the mahjong game server is a discard request;
[0026] A discard execution module for, when the sent request is a discard request, using the discard model to calculate the game environment data to obtain the discard data and send the discard data; wherein, the discard model is obtained by training according to the discard training data;
[0027] A Pong, Kong, Hu execution module, which is used to calculate the game environment data using a Pong, Kong, Hu model to obtain action data and send the action data when the sent request is not a discard request; wherein, the Pong, Kong, Hu model is trained based on Pong, Kong, Hu training data.
[0028] Optionally, the discard execution module includes:
[0029] A discard data calculation unit, which is used to calculate the game environment data using the discard model according to the fixed discard card type to obtain the discard data; wherein, the fixed discard card type is obtained by calculating the initial game environment data using a fixed discard model.
[0030] A discard data sending unit, which is used to send the discard data.
[0031] Optionally, the discard data calculation unit is further used to perform an environment initialization operation to obtain the initial game environment data; calculate the fixed discard card type according to the fixed discard model for the initial game environment data; wherein, the fixed discard model is trained based on fixed discard training data.
[0032] Optionally, it further includes:
[0033] A data extraction module, which is used to extract discard training data, Pong, Kong, Hu training data, and fixed discard training data from the obtained training data.
[0034] This application also provides a server, including:
[0035] A memory, which is used to store a computer program;
[0036] A processor, which is used to implement the steps of the above-mentioned mahjong data processing method when executing the computer program.
[0037] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the above-mentioned mahjong data processing method.
[0038] A mahjong data processing method provided by this application includes: a data processing server determines whether the request sent by a mahjong game server is a discard request; if so, it calculates the game environment data using a discard model to obtain discard data and sends the discard data; wherein, the discard model is trained based on discard training data; if not, it calculates the game environment data using a Pong, Kong, Hu model to obtain action data and sends the action data; wherein, the Pong, Kong, Hu model is trained based on Pong, Kong, Hu training data.
[0039] By determining whether the received request is a discard request, if so, calculate and send the corresponding discard data according to the discard model, if not, calculate and send the corresponding action data according to the pon / kong / hu model, rather than making decisions using limited logical judgments, which improves the processing effect of mahjong data.
[0040] This application also provides a mahjong data processing device, a server, and a computer-readable storage medium, which have the above beneficial effects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0042] Figure 1 It is a flowchart of a mahjong data processing method provided by an embodiment of the present application;
[0043] Figure 2 It is a schematic structural diagram of a mahjong data processing device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] The core of this application is to provide a mahjong data processing method, a mahjong data processing device, a server, and a computer-readable storage medium. By determining whether the received request is a discard request, if so, calculate and send the corresponding discard data according to the discard model, if not, calculate and send the corresponding action data according to the pon / kong / hu model, rather than making decisions using limited logical judgments, which improves the processing effect of mahjong data.
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0046] In the related art, mainly artificial writing of limited logical relationships, abstracting all card faces into a limited number, and then making specific decisions for these limited situations one by one to achieve automated card-playing decisions. However, no matter what the situation is, as long as the card-playing conditions are met, the decisions are fixed, and in actual game data, problems such as poor decision-making effects occur, reducing the effect of automated card-playing.
[0047] Therefore, the present application provides a method for processing mahjong data. By determining whether the received request is a discard request, if so, the corresponding discard data is calculated and sent according to the discard model; if not, the corresponding action data is calculated and sent according to the pong / kong / hu model, rather than making a decision using limited logical judgments, which improves the processing effect of mahjong data.
[0048] The following uses an embodiment to illustrate a method for processing mahjong data provided by the present application.
[0049] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for processing mahjong data provided by an embodiment of the present application.
[0050] In this embodiment, the method may include:
[0051] S101, the data processing server determines whether the request sent by the mahjong game server is a discard request; if so, S102 is executed; if not, S103 is executed;
[0052] It can be seen that this step aims to determine whether the request sent by the mahjong game server is a discard request by the data processing server. Further, the data processing server makes a decision and returns the corresponding playing card data to participate in the game in the mahjong game server, realizing a virtual player in the mahjong game server.
[0053] Among them, when the mahjong game server sends a request to the data processing server, it is mainly that the current mahjong game executes a discard action or a pong / kong / hu action. Moreover, the decision-making ideas for executing the discard action and the pong / kong / hu action are different, and different decision-making operations need to be executed. Therefore, it is necessary to determine whether the request is a discard request to execute different decision-making operations.
[0054] Further, before this step, if the game is just starting to be executed, corresponding environment initialization operations can be performed, and the current fixed-deficiency card type can be determined using the fixed-deficiency model, and then the subsequent data processing process can be executed.
[0055] S102, calculate the playing card data for the game environment data using the discard model, and send the playing card data; among them, the discard model is trained according to the discard training data;
[0056] Based on S101, this step aims to calculate the playing card data for the game environment data using the discard model, and send the playing card data; among them, the discard model is trained according to the discard training data.
[0057] Among them, the discard model is the training data trained before the game.
[0058] When the received request is a card-discarding request, the corresponding card-playing data can be calculated through the card-discarding model, and finally the card-playing data is sent to implement the card-playing operation.
[0059] Furthermore, for the accuracy of the card-playing data, this step may include:
[0060] Step 1: Use the card-discarding model to calculate the game environment data according to the fixed-discard card type, and obtain the card-playing data; where the fixed-discard card type is obtained by calculating the initial game environment data using the fixed-discard model.
[0061] Step 2: Send the card-playing data.
[0062] It can be seen that this optional solution mainly explains how to calculate the card-playing data. In this optional solution, first, the card-discarding model is used to calculate the game environment data according to the fixed-discard card type to obtain the card-playing data; where the fixed-discard card type is obtained by calculating the initial game environment data using the fixed-discard model; then, the card-playing data is sent.
[0063] Furthermore, the steps of training the fixed-discard model in the previous optional solution may include:
[0064] Step 1: Perform environment initialization operations to obtain the initial game environment data;
[0065] Step 2: Calculate the fixed-discard card type according to the fixed-discard model for the initial game environment data; where the fixed-discard model is trained according to the fixed-discard training data.
[0066] It can be seen that this optional solution mainly explains how to determine the fixed-discard card type. In this optional solution, first, environment initialization operations are performed to obtain the initial game environment data; then, the fixed-discard card type is calculated according to the fixed-discard model for the initial game environment data; where the fixed-discard model is trained according to the fixed-discard training data.
[0067] S103: Use the Peng Gang Hu model to calculate the game environment data to obtain the action data, and send the action data; where the Peng Gang Hu model is trained according to the Peng Gang Hu training data.
[0068] Based on S101, this step aims to use the Peng Gang Hu model to calculate the game environment data to obtain the action data, and send the action data; where the Peng Gang Hu model is trained according to the Peng Gang Hu training data.
[0069] Among them, the Peng Gang Hu model is the training data trained before the game.
[0070] When the received request is a pengganghu request, the corresponding discard data can be calculated through the pengganghu model, and finally the discard data is sent to implement the pengganghu operation.
[0071] In addition, this embodiment may further include:
[0072] Extract discard training data, pengganghu training data, and fixed-deficiency training data from the obtained training data.
[0073] It can be seen that in this alternative solution, it mainly describes how to obtain the data for training. In this alternative solution, discard training data, pengganghu training data, and fixed-deficiency training data are extracted from the obtained training data.
[0074] In summary, in this embodiment, by determining whether the received request is a discard request, if so, the corresponding discard data is calculated and sent according to the discard model, if not, the corresponding action data is calculated and sent according to the pengganghu model, rather than making a decision using limited logical judgments, which improves the processing effect of mahjong data.
[0075] The following further illustrates a mahjong data processing method provided by this application through another specific embodiment.
[0076] In this embodiment, the data of Sichuan mahjong can be processed. This game uses 108 mahjong tiles, and the corresponding tile types are "wan", "tong", and "tiao". Each tile type has 9 tile values composed of 1 to 9, and there are 4 identical tiles for each tile. The whole game is a 4-player game, and the tile-drawing order starts from the dealer and proceeds clockwise. The game has two playing methods. One is "Fight to the End". When a player wins, they no longer participate in the game (that is, they can no longer draw tiles, discard tiles, win, or claim melds. Nor do they participate in the game settlement, such as when others win by self-drawing). The end condition of the game is that 3 players win or all the tiles are drawn. The other is "Blood Flows Like a River". When a player wins, it is settled in real-time, and at the same time enters the "semi-escrow" state, automatically drawing tiles, discarding tiles, and winning until the end of the game; the only option is whether to claim a kong, and it also participates in the game settlement. The normal end condition of the game is that and only that all the tiles are drawn. Both modes support operations such as fixed-deficiency, peng, gang, win, and discard.
[0077] This embodiment uses deep learning to train three models, namely the card-deficiency determination model, the card-discarding model, and the Hu-Peng-Gang model. The network selected is the BERT (Bidirectional Encoder Representations from Transformers) neural network commonly used in natural language processing. The reason for choosing the neural network of NLP (Neuro-Linguistic Programming) here is that it is easier to process the information input of chess and cards compared to the CNN (Convolutional Neural Networks) in the visual field. The original BERT model contains the encoding layers of the Transformer Encoder, namely BERT with 12 layers and 24 layers respectively.
[0078] The network in this embodiment first goes from the data layer to the one-dimensional convolutional layer, and then passes through 4 encoder layers of BERT. The 4 encoders are the same, and the encoding dimension of each encoder is 128, and the internal fully connected encoding dimension of each encoder is 256. In the standard encoder layer of BERT, the information is first encoded into a vector, then each attention vector is obtained through multi-head attention, and finally they are integrated and output.
[0079] Among them, after passing through the batch normalization layer after the 4-layer encoder, it is input to the fully connected layer. The output dimension of the fully connected layer is 256, and finally it is output through the fully connected layer with noise. The output dimension is 27, corresponding to 27 different cards (3 card types, 9 card values, a total of 27 possible cards). The network training is iterated 20,000 times in total, and the batch data size for each time is 512. The learning rate is 0.0001 in the first 50,000 times and 0.00001 in the last 150,000 times.
[0080] All three models of deep learning adopt the above network structure. The differences lie in the different input data and output dimensions. First, data cleaning is performed. The data comes from the data of expert players, with a total of 110,000 game rounds. Data cleaning mainly involves removing the data of losing players in the current game, that is, only retaining the behavioral data of non-losing players. The data is transformed into the form required by the model and the corresponding labels, and then used to train the corresponding model. To train the Dingque model, only the Dingque behavior of the starting player is used as the label, and the player's hand cards are used as the input data, thus forming a data-label pair, and then training the model. To train the Throwing Card model, only some information seen by the player during the game process is used as the input data, and the player's throwing card result is used as the label. To train the PengGangHu model, only some information seen by the player during the game process is used as the input data, which is similar to the data of throwing cards, and the player's selection behavior is used as the label. After the models are trained, independent models can be obtained. The models with different data have different functions. The input and output forms of the three models will be introduced in detail below.
[0081] Among them, the Dingque model is used to determine the Dingque card type at the start of the game. The input of the model is the hand card information. As shown in the following table, it is a 3-row and 9-column matrix. Each row represents a different card type, each column represents a different card value, and the numbers in the matrix represent the number of cards. The example in the following table shows that the hand cards are 3 three-tubes, 3 four-tubes, 3 five-tubes, 3 six-ten-thousands, 1 seven-stripe, and 0 means there is no card of this type in the hand. The output of the model is the probability values of the three Dingque card types of "ten-thousand", "tube", and "stripe", and their sum is 1. The one with the largest probability value is the final Dingque card type output by the model.
[0082] Then, for the Throwing Card model, when a throwing card request is sent from the game environment, the data processing server must determine a card from the hand card tree, and it needs to be a legal card. For example, a card that has been ponged or konged cannot be thrown, or a card that is not in the hand cannot be thrown either. The input of the Throwing Card model is the known information in the current situation, which is encoded into a matrix with a dimension of (3, 9, 22). The first and second dimensions are the statistical representations of the cards, and their meanings are similar to the input in the Dingque model. The third dimension behind is a total of 22 different channels, representing 22 different meanings of information. Each channel is a matrix with a dimension of (3, 9). All the inputs of the Throwing Card model are not only the (3, 9) -dimensional matrix encoding of the hand cards, but also the encoding of other information. The detailed meanings of each channel are as shown in the following table.
[0083] Table 1 Information Encoding Table
[0084]
[0085] The first column in the above table represents the number of channels, a total of 22. The second column represents the information it represents. For example, for channel 0, it represents the current hand cards, and the meaning is the same as the input of the fixed discard model. Channel 1 is the statistical history of the cards discarded by oneself, channel 2 is the statistical history of the cards discarded by the previous player, and so on. The model output is the probability values of 27 different types of cards, and the sum is 1. The largest one is selected as the output and is legal.
[0086] Finally, the hu-peng-gang mode mainly targets requests for winning, ponging, and konging. In the game, in addition to discarding cards, players can also pong and kong cards. Here, the hu-peng-gang is combined and output. The input information is the same as that of the above-mentioned discard model, and the output is a 4-way selection, choosing one from winning, ponging, konging, and passing. Among them, "passing" means not outputting any action this time.
[0087] In the starting stage, the environment is initialized, including operations such as shuffling the cards and dealing the cards, which are all completed by the game environment. Then, after the data processing server gets the hand cards, it calls the fixed discard model to calculate the fixed discard hand pattern and returns this hand pattern to the game environment. After that, the game will proceed normally. During the game process, it will first check whether the game has ended. If not, it will send requests to the data processing server. These requests will be divided into two types, one is the request for discarding cards, and the other is the request for hu-peng-gang. The game environment will only have one request at a time. The data processing server needs to first determine which type of request the game sent. If the sent request is for discarding cards, the data processing server will call the discard model to calculate the cards that need to be discarded and return these cards to the game. If it is a request for hu-peng-gang, the data processing server will call the hu-peng-gang model to calculate the action that needs to be executed, and the model will select an action from ponging, konging, winning, and passing and return it to the game. After the game server receives the information sent by the data processing server, it will send out a new request, and so on in a loop until the game ends.
[0088] It can be seen that in this embodiment, by determining whether the received request is a request for discarding cards, if so, the corresponding discard data is calculated and sent according to the discard model, if not, the corresponding action data is calculated and sent according to the hu-peng-gang model, rather than making a decision using limited logical judgments, which improves the processing effect of mahjong data.
[0089] Next, the mahjong data processing device provided by the embodiment of the present application will be introduced. The mahjong data processing device described below can be mutually corresponding and referred to the mahjong data processing method described above.
[0090] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a mahjong data processing device provided by an embodiment of the present application.
[0091] In this embodiment, the device may include:
[0092] A request judgment module 100, configured to judge whether a request sent by a mahjong game server is a discard request;
[0093] A discard execution module 200, configured to, when the sent request is a discard request, calculate game environment data by using a discard model to obtain discard data, and send the discard data; wherein, the discard model is obtained by training according to discard training data;
[0094] A pong / kong / hu execution module 300, configured to, when the sent request is not a discard request, calculate game environment data by using a pong / kong / hu model to obtain action data, and send the action data; wherein, the pong / kong / hu model is obtained by training according to pong / kong / hu training data.
[0095] Optionally, the discard execution module 200 may include:
[0096] A discard data calculation unit, configured to calculate game environment data by using a discard model according to a fixed discard card type to obtain discard data; wherein, the fixed discard card type is obtained by calculating initial game environment data by using a fixed discard model;
[0097] A discard data sending unit, configured to send the discard data.
[0098] Optionally, the discard data calculation unit is further configured to perform environment initialization operations to obtain initial game environment data; calculate the fixed discard card type according to the fixed discard model for the initial game environment data; wherein, the fixed discard model is obtained by training according to fixed discard training data.
[0099] Optionally, the apparatus may further include:
[0100] A data extraction module, configured to extract discard training data, pong / kong / hu training data, and fixed discard training data from the obtained training data.
[0101] An embodiment of the present application further provides a server, including:
[0102] A memory, configured to store a computer program;
[0103] A processor, configured to implement the steps of the mahjong data processing method as described in the above embodiments when executing the computer program.
[0104] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the mahjong data processing method as described in the above embodiments are implemented.
[0105] The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0106] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0107] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0108] The above has introduced in detail a mahjong data processing method, a mahjong data processing device, a server, and a computer-readable storage medium provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for processing mahjong data, characterized in that, it includes: The data processing server determines whether the request sent by the mahjong game server is a discard request; If so, use the discard model to calculate the game environment data to obtain the discard data, and send the discard data; wherein, the discard model is a BERT model trained according to the discard training data; the discard training data includes discard input data and discard labels, the discard input data is the information seen by the player during the game, and the discard label is the player's discard result; If not, use the pong / kong / hu model to calculate the game environment data to obtain the action data, and send the action data; wherein, the pong / kong / hu model is a BERT model trained according to the pong / kong / hu training data; the pong / kong / hu training data includes pong / kong / hu data and pong / kong / hu labels, the pong / kong / hu data is the information seen by the player during the game, and the pong / kong / hu label is the player's selection behavior.
2. The mahjong data processing method according to claim 1, characterized in that, Using the discard model to calculate the game environment data to obtain the discard data, and sending the discard data, includes: Using the discard model to calculate the game environment data according to the fixed discard card type to obtain the discard data; wherein, the fixed discard card type is obtained by calculating the initial game environment data using the fixed discard model; Sending the discard data.
3. The mahjong data processing method according to claim 2, characterized in that, The step of obtaining the fixed discard card type by calculating the initial game environment data using the fixed discard model includes: Performing an environment initialization operation to obtain the initial game environment data; Calculating the initial game environment data according to the fixed discard model to obtain the fixed discard card type; wherein, the fixed discard model is trained according to the fixed discard training data.
4. The mahjong data processing method according to claim 1, characterized in that, Using the discard model to calculate the game environment data to obtain the discard data, and sending the discard data, includes: Using the discard model to calculate the game environment data to obtain the probability value of each card type; Taking the data of the card type with the largest probability value as the discard data.
5. The mahjong data processing method according to claim 1, characterized in that, Using the pong / kong / hu model to calculate the game environment data to obtain the action data, and sending the action data, includes: Using the pong / kong / hu model to calculate the game environment data to obtain the probability of the hu operation, the probability of the pong operation, the probability of the kong operation, and the probability of the pass operation; Taking the operation with the largest probability as the action data.
6. The mahjong data processing method according to claim 1, characterized in that, It further includes: Extracting discard training data, pong / kong / hu training data, and fixed discard training data from the obtained training data.
7. A mahjong data processing device, characterized in that, it includes: A request judgment module for judging whether the request sent by the mahjong game server is a discard request; The discarding execution module is used to calculate the game environment data using a discarding model to obtain the card-playing data and send the card-playing data when the sent request is a discarding request; wherein, the discarding model is a BERT model trained according to discarding training data; the discarding training data includes discarding input data and discarding labels, the discarding input data is the information seen by the player during the game, and the discarding label is the discarding result of the player. The pong / kong / hu execution module is used to calculate the game environment data using a pong / kong / hu model to obtain the action data and send the action data when the sent request is not a discarding request; wherein, the pong / kong / hu model is a BERT model trained according to pong / kong / hu training data; the pong / kong / hu training data includes pong / kong / hu data and pong / kong / hu labels, the pong / kong / hu data is the information seen by the player during the game, and the pong / kong / hu label is the player's selection behavior.
8. The mahjong data processing device according to claim 7, characterized in that the discarding execution module includes: The card-playing data calculation unit is used to calculate the game environment data using the discarding model according to the fixed discard card type to obtain the card-playing data; wherein, the fixed discard card type is obtained by calculating the initial game environment data using a fixed discard model. The card-playing data sending unit is used to send the card-playing data.
9. A server, characterized in that it includes: a memory for storing a computer program; a processor for implementing the steps of the mahjong data processing method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the mahjong data processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for generating natural language model
CN111611808A
Egg-whipping game card type data acquisition method and related device
CN113274738A