Go setting detection method, device and equipment and storage medium
By performing fixed detection in the game interface, using the first winning rate and the second winning rate to reflect the advantages and disadvantages of the Go fixed pattern, the problem of inaccurate detection of fixed patterns in the prior art is solved, and the accuracy and flexibility of the detection are improved.
Patent Information
- Application Number
- CN202510292802.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-13
AI Technical Summary
When the prior art detects the advantages and disadvantages of Go fixed patterns, there are limitations in the overall winning rate, which leads to the inaccurate advantages and disadvantages of the fixed patterns.
By displaying the drop distribution in the game interface and responding to the chessboard area selection operation, a fixed-form detection is performed to display the first winning rate and the second winning rate, reflecting the advantages and disadvantages of the fixed-form distribution and the advantages and disadvantages of the next move position.
It improves the accuracy and flexibility of Go fixed detection, can more comprehensively reflect the advantages and disadvantages of the fixed pattern, and enhances the convenience of users in Go fixed learning.
Smart Images

Figure CN120132332A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of artificial intelligence technology, and in particular, to a method, device, equipment, and storage medium for detecting Go fuseki. Background Art
[0002] With the continuous development of artificial intelligence technology, artificial intelligence technology provides resources and tools for chess games or the learning of game skills. Taking Go as an example of the game mode, by watching the process of Go games, the learning of Go fuseki can be carried out. As an important layout means in the opening stage of Go, the advantages and disadvantages of Go fuseki directly determine the trend and outcome of the subsequent game situation. Therefore, detecting the advantages and disadvantages of Go fuseki helps to understand the game strategy.
[0003] In the related art, during the process of watching a Go game, the Go artificial intelligence (AI) analyzes the game situation to determine the overall winning rate, and using the overall winning rate to determine the application effect of Go fuseki has certain limitations, so the determined advantages and disadvantages of Go fuseki are not accurate enough. Summary of the Invention
[0004] Embodiments of the present application provide a method, device, equipment, and storage medium for detecting Go fuseki. The technical solutions provided by the present application include the following aspects.
[0005] According to one aspect of the embodiments of the present application, a method for detecting Go fuseki is provided. The method includes:
[0006] Display a game interface including the piece distribution, where the piece distribution represents the distribution of the pieces dropped at each position on the chessboard;
[0007] In response to a chessboard area selection operation on the game interface, display the selected chessboard area, where the selected chessboard area is an area including any corner of the chessboard;
[0008] Perform fuseki detection on the piece distribution of the selected chessboard area, and display the fuseki detection result. The fuseki detection result includes a first winning rate and a second winning rate. The first winning rate represents the advantages and disadvantages of the fuseki distribution in the selected chessboard area, and the second winning rate represents the advantages and disadvantages of the position of the next piece drop on the chessboard.
[0009] According to another aspect of the embodiments of the present application, a device for detecting Go fuseki is further provided. The device includes:
[0010] A display module, configured to display a game interface including the piece distribution, where the piece distribution represents the distribution of the pieces dropped at each position on the chessboard;
[0011] The display module is further configured to, in response to a chessboard area selection operation on the chess game interface, display the selected chessboard area, where the selected chessboard area is an area including any corner of the chessboard;
[0012] The display module is further configured to perform a joseki detection on the piece placement distribution in the selected chessboard area and display the joseki detection result, where the joseki detection result includes a first winning rate and a second winning rate. The first winning rate characterizes the quality of the joseki distribution in the selected chessboard area, and the second winning rate characterizes the quality of the next piece placement position on the chessboard.
[0013] In a possible implementation manner, the display module is configured to, in response to a chessboard area selection operation on the chess game interface, display an adjustable area. The adjustable area includes a fixed point located at a corner of the chessboard and a movable point located on the chessboard. The movable point is used to adjust the size of the adjustable area; determine the selected chessboard area based on the position of the determined movable point and the position of the fixed point in the adjustable area.
[0014] In a possible implementation manner, the display module is further configured to, in response to an adjustment operation on the piece placement in the selected chessboard area, display the adjusted piece placement distribution in the selected chessboard area. The adjustment operation includes at least one of an operation of adding a piece, an operation of deleting a piece, or an operation of moving a piece;
[0015] The display module is configured to perform a joseki detection on the adjusted piece placement distribution in the selected chessboard area and display the joseki detection result.
[0016] In a possible implementation manner, the device further includes a determination module. The determination module is configured to determine an initial winning rate based on the Go rules and the piece color, where the initial winning rate characterizes the winning rate corresponding to the state without piece placement; determine the current winning rate based on the piece placement distribution in the selected chessboard area; and determine the difference between the current winning rate and the initial winning rate as the first winning rate.
[0017] In a possible implementation manner, the device further includes a determination module. The determination module is configured to determine the current winning rate and each reference position based on the piece placement distribution in the selected chessboard area, where each reference position is a position with a probability of the next piece placement; determine the winning rate corresponding to the next piece placement based on each reference position and the piece placement distribution in the selected chessboard area; and determine the difference between the winning rate corresponding to the next piece placement and the current winning rate as the second winning rate.
[0018] In a possible implementation, the device further includes a determination module, configured to determine adjustment information based on the position of the selected chessboard area in the chessboard. The adjustment information is determined based on the piece placement distribution of the selected chessboard area and a fixed pattern tree, and the fixed pattern tree is used to record the piece placement sequences of Go fixed patterns; perform fixed pattern detection on the black and white piece shapes of the adjusted piece placement distribution respectively with the fixed pattern tree.
[0019] In a possible implementation, the display module is configured to match the piece placement distribution of the selected chessboard area with a fixed pattern tree to obtain a matching result. The fixed pattern tree is used to record the piece placement sequences of Go fixed patterns; when the matching result indicates that the piece placement distribution is a fixed pattern distribution, display the fixed pattern detection result corresponding to the piece placement distribution.
[0020] In a possible implementation, the display module is further configured to, when the matching result indicates that the piece placement distribution is a non-fixed pattern distribution, display a first prompt message, where the first prompt message is used to prompt that the piece placement distribution is a non-fixed pattern distribution.
[0021] In a possible implementation, the display module is further configured to display fixed pattern piece placement positions, where the fixed pattern piece placement positions represent positions that form a fixed pattern distribution with the pieces on the current chessboard;
[0022] The device further includes a detection module, configured to automatically perform fixed pattern detection when the current piece placement position is the fixed pattern piece placement position.
[0023] In a possible implementation, the display module is further configured to, when the current piece placement position is a position other than the fixed pattern piece placement position, display a second prompt message, where the second prompt message is used to prompt that the current piece placement position cannot form a fixed pattern distribution with the pieces on the chessboard.
[0024] In a possible implementation, the display module is further configured to, when the detection result indicates that the piece placement distribution of the selected chessboard area is a fixed pattern distribution, display the candidate labels corresponding to the fixed pattern distribution; when the candidate label is selected, associate the fixed pattern distribution with the selected candidate label; display the reference labels associated with the fixed pattern distribution, where the reference labels are the labels for which the number of the same selected candidate labels associated with the fixed pattern distribution is greater than or equal to a quantity threshold.
[0025] In a possible implementation, the display module is further configured to display two or more basic game positions, where the basic game positions are used to provide layout configurations for different Go game openings;
[0026] The display module is configured to, when any basic game state is selected, display a game interface with the piece placement distribution based on the piece placement operations on the selected basic game state.
[0027] In a possible implementation, the game interface further includes a return control. The display module is further configured to, in response to a trigger operation on the return control, display a backtrack game state and the corresponding fixed pattern detection result. The backtrack game state is determined based on the piece placement sequence of the game interface and the trigger operation on the return control.
[0028] In a possible implementation, the display module is further configured to display a parameter setting area in the game interface; when the detection result indicates that the piece placement distribution in the selected chessboard area is a fixed pattern distribution, in response to a setting operation on the detection range parameter in the parameter setting area, display the chess score information associated with the fixed pattern distribution. The chess score information associated with the fixed pattern distribution is determined based on the set detection range parameter and the Go chess scores, and the chess score information includes at least one of professional chess score information or total chess score information.
[0029] In a possible implementation, the device further includes a classification module. The classification module is configured to obtain the comment information of the fixed pattern distribution; perform semantic analysis on the comment information to obtain the type of the comment information.
[0030] The display module is further configured to classify and display the comment information in the game interface based on the type of the comment information.
[0031] According to one aspect of the embodiments of the present application, a terminal device is provided. The terminal device includes a processor and a memory. A computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned method for detecting Go fixed patterns.
[0032] According to one aspect of the embodiments of the present application, a computer-readable storage medium is provided. A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above-mentioned method for detecting Go fixed patterns.
[0033] According to one aspect of the embodiments of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned method for detecting Go fixed patterns.
[0034] The technical solutions provided by the embodiments of the present application can bring the following beneficial effects:
[0035] By analyzing the piece placement distribution in the selected board area in the game interface and detecting the piece placement distribution in the selected area during the game, the freedom of Go joseki detection can be improved, which better meets the user's needs. By performing joseki detection on the piece placement distribution in the selected board area, a joseki detection result including a first win rate and a second win rate is obtained. Among them, the first win rate can reflect the quality of the joseki corresponding to the piece placement distribution in the selected board area, and the second win rate can reflect the quality of a single move in the piece placement distribution. In the process of determining the quality of Go joseki, the quality of the joseki can be comprehensively reflected by the first win rate and the second win rate, which improves the pertinence and flexibility of Go joseki detection, thereby improving the accuracy of determining the quality of Go joseki. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0037] Figure 1 is a schematic structural diagram of a computer system provided by an embodiment of the present application;
[0038] Figure 2 is a flowchart of a method for detecting Go joseki provided by an embodiment of the present application;
[0039] Figure 3 is a schematic diagram of a game interface including a basic situation provided by an embodiment of the present application;
[0040] Figure 4 is a schematic diagram of a game interface including an adjustable area provided by an embodiment of the present application;
[0041] Figure 5 is a schematic diagram of a joseki tree corresponding to a Go board provided by an embodiment of the present application;
[0042] Figure 6 is a schematic diagram of a game interface including an initial situation provided by an embodiment of the present application;
[0043] Figure 7 is a schematic diagram of a process for calculating the current win rate provided by an embodiment of the present application;
[0044] Figure 8 is a schematic diagram of a network architecture of a neural network provided by an embodiment of the present application;
[0045] Figure 9 is a schematic diagram of a game interface including a joseki detection result provided by an embodiment of the present application;
[0046] Figure 10 It is a schematic diagram of a game process provided by an embodiment of the present application;
[0047] Figure 11 It is a schematic diagram of an interface for displaying candidate tags provided by an embodiment of the present application;
[0048] Figure 12 It is a schematic diagram of an interface for displaying comment information provided by an embodiment of the present application;
[0049] Figure 13 It is a schematic structural diagram of a detection device for Go openings provided by an embodiment of the present application;
[0050] Figure 14 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application;
[0051] Figure 15 It is a schematic structural diagram of a server provided by an embodiment of the present application. Detailed implementation manners
[0052] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0053] It should be noted that the terms "first", "second", etc. in the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0054] Before introducing the technical solutions of the present application, the abbreviations and key terms related to the embodiments of the present application will be explained first.
[0055] Go board: It can also be directly called a board. The Go board can be a 19×19 cross-grid, consisting of 19 vertical and 19 horizontal lines to form 361 intersection points, which are divided into corners (four corner areas), sides (four side areas), and the belly (central area). The Go board can also include cross-grids with other numbers of lines.
[0056] Go game: A game with Go as the competitive event, usually involving two or more Go players playing against each other, and the result of the game is determined by victory or defeat. For example, two players take turns to place stones (black first and white second), aiming to surround territory (occupy intersection points) and capture opponent's stones (surround the opponent's pieces).
[0057] Go game record: A tool for recording the process of a Go game, usually presented in the form of diagrams or text, which details the moves of each step, the layout of the Go board, as well as the strategies and changes during the game between both sides.
[0058] Online Go platform: Refers to an Internet platform that provides functions such as online Go games, teaching, information, and social interaction. These platforms usually cover the following contents:
[0059] a. Online games: Users can play real-time or non-real-time Go games with other players. Some platforms also provide human-computer Go games and AI analysis functions.
[0060] b. Teaching resources: Provide Go teaching videos, game record analysis, opening and tactical suggestions, etc., to help users improve their Go skills.
[0061] c. Tournament live broadcast and information: Broadcast domestic and international Go tournaments, release the latest Go news and developments. Some platforms also provide tournament registration and team formation services.
[0062] d. Social interaction: Users can communicate with other Go enthusiasts through the platform, share game records, and participate in Go community activities, enhancing interactivity and fun.
[0063] Go joseki: Common local moves in Go (not only correct moves), which are local routines summarized by players through long-term practice. Joseki has been verified through long-term practice and is considered a relatively stable and effective choice in the current situation. Learning and mastering basic joseki helps players quickly occupy favorable positions in the opening stage and lay a solid foundation for subsequent games.
[0064] Joseki tree: A collection of common moves in the Go corner, including multiple joseki nodes (also called nodes), and each joseki node represents a move. Starting from the root node, passing through each parent node until a certain child node, a node string will be formed. Any node string represents a sequence of moves, and this sequence of moves is the joseki variation diagram represented by the child node. Among them, the joseki variation diagram is a more frequently played way by users, not limited to the better way. The joseki variation diagram is used to represent a specific sequence of moves.
[0065] Winning rate: Refers to the possibility of one side winning in a Go game. The winning rate is usually evaluated by analyzing factors such as the current situation of the Go board, the positions of the stones, and the development of the situation, helping players and audiences understand the changes in advantages and disadvantages in the game.
[0066] Zheng zi: A basic tactic in Go, mainly using the fact that the opponent's stone has only one liberty and continuously using the method of twisting and calling to capture the stone. It requires each move to be a check on the opponent, and each move to be a correct check on the opponent, ultimately making the opponent twist and turn to escape and driving it to the first line to be captured.
[0067] Shape: A specific shape or structure formed by multiple stones in Go. Different shapes have different characteristics and functions, such as stabilizing the corner, developing towards the center, attacking the opponent, etc. During the game, players need to choose appropriate shapes according to the situation of the game and the opponent to layout and attack.
[0068] In an exemplary embodiment, the learning of Go josekis is generally through Go books, joseki tools, or Go AI. Among them, the josekis in joseki books and joseki tools (such as the Online Go Server (OGS)) are collected and sorted manually and evaluated manually. It is easily limited by the knowledge of the author, and the accuracy of the evaluation of josekis is relatively low, resulting in a low learning efficiency of Go josekis.
[0069] The winning rate shown by Go AI is the global winning rate, lacking the concept of joseki, and can only approximately determine the quality of Go josekis through the global winning rate. Among them, Go josekis are related to the situation of capturing stones in the diagonal (favorable for capturing stones, unfavorable for capturing stones), the configuration of surrounding stones, whether playing black or white, etc. When users use Go josekis, the number of josekis used is limited and it is difficult to cover all joseki-related situation cases. Moreover, Go AI generally gives responses with high computational complexity and high winning rates, lacking the wrong responses and deceptive moves often played by human players. Therefore, the collected Go josekis are missing, resulting in a low accuracy of the evaluation of Go josekis by Go AI and a low learning efficiency of learning Go josekis using Go AI.
[0070] In response to this, the embodiments of the present application provide a method for detecting Go josekis to improve the accuracy of Go joseki detection and the learning efficiency of Go josekis. This method can be applied to a computer system, for example, Figure 1 It is a schematic structural diagram of a computer system provided by an embodiment of the present application. The computer system includes: a terminal device 101 and a server 102. Among them, an application program (such as a Go application program) is installed and run in the terminal device 101, and the account of user 103 is logged in to the application program. That is to say, the terminal device 101 is the terminal device used by user 103. The method for detecting Go josekis provided by the embodiments of the present application can be executed by the terminal device 101 or jointly executed by the terminal device 101 and the server 102. The embodiments of the present application do not limit this.
[0071] Server 102 is used to provide background services for the application programs installed on the terminal device 101. In a possible implementation, Server 102 undertakes the main computing work, and the terminal device 101 undertakes the secondary computing work. Alternatively, Server 102 undertakes the secondary computing work, and the terminal device 101 undertakes the main computing work. Or, a distributed computing architecture is adopted between the terminal device 101 and the Server 102 for collaborative computing.
[0072] Optionally, the terminal device 101 can be any electronic device product that can perform human-computer interaction with the user through one or more methods such as a keyboard, a touchpad, a remote control, voice interaction, or a handwriting device. For example, the terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a PC (Personal Computer), a mobile phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (PocketPC), a smart in-vehicle unit, a smart TV, etc.
[0073] The terminal device 101 can generally refer to one of multiple terminal devices, or can generally refer to multiple of multiple terminal devices. The embodiments of the present application do not limit the number of terminals. The server 102 can be a single server, or a server cluster composed of multiple servers, or any one of a cloud computing platform and a virtualization center. The embodiments of the present application do not limit this.
[0074] In an embodiment of the present application, a Go application program can be installed in the terminal device 101, and the Go application program can play Go or watch other game videos. For example, during the process of watching a game video, for the game interface displayed in the game video that includes the distribution of played stones, a part of the chessboard area can be selected. The terminal device 101 can generate a fixed pattern detection request based on the selected part of the chessboard area and the played stone operations included in the chessboard area, and send the fixed pattern detection request to the server 102. After receiving the fixed pattern detection request, the server 102 parses and processes the fixed pattern detection request, performs fixed pattern detection based on the selected part of the chessboard area and the distribution of played stones in the fixed pattern detection request after parsing and processing, generates a fixed pattern detection result, and sends the fixed pattern detection result to the terminal device 101.
[0075] After receiving the fixed pattern detection result, the terminal device 101 can parse and process the fixed pattern detection result and display the fixed pattern detection result in the game interface. The fixed pattern detection result may include a first winning rate and a second winning rate. The first winning rate represents the quality of the fixed pattern distribution in the selected chessboard area, and the second winning rate represents the quality of the next move position on the chessboard. The first winning rate can also be referred to as the relative initial winning rate, and the second winning rate can also be referred to as the relative current winning rate. Through the first winning rate and the second winning rate, users can comprehensively understand the quality of the fixed pattern, improving the pertinence and flexibility of Go fixed pattern detection, and the obtained quality of the Go fixed pattern is more accurate.
[0076] Those skilled in the art should understand that the above terminal device 101 and server 102 are only for illustrative purposes. Other existing or future terminal devices or servers that are applicable to this application should also be included in the protection scope of this application and are hereby incorporated by reference.
[0077] The method for detecting Go fixed patterns provided by the embodiments of this application can be applied to the above Figure 1 shown computer system. For example, this method can be executed by the Figure 1 terminal device 101 therein, or can be executed by the interaction between the terminal device 101 and the server 102. Taking the terminal device 101 executing this method as an example, as Figure 2 shown, this method includes the following steps 201 to step 203.
[0078] In step 201, a game interface including the move distribution is displayed, and the move distribution represents the distribution of the pieces placed at each position on the chessboard.
[0079] In the exemplary embodiment of this application, the game interface can be an interface including a Go chessboard. Among them, the game interface may include but is not limited to the live broadcast interface of a Go competition, the chess score analysis interface, the game review interface, the photo counting interface, the chess score recording interface, and the AI Go detailed explanation interface, etc.
[0080] For example, on the live broadcast interface of a Go competition, the game process interface of the players and relevant information are displayed. The relevant information may include but is not limited to the names of both players, the game time used, the current number of moves, the live commentary, and the interactive barrage and other information.
[0081] The chess score analysis interface can be an interface for deeply analyzing the chess score. Users can browse the complete chess score of the game. In addition to displaying the Go chess score, the chess score analysis interface can also display the players' understanding of the chess score and the annotation of the important move steps of the chess score, etc.
[0082] The game review interface usually appears after the end of a game or a match. It is an interface for both players or spectators to review the game. Users can import their own or others' game records to reproduce the game process. In the game review interface, users can analyze and summarize the game process more efficiently by undoing previous moves, marking key moves, etc.
[0083] The photo counting interface can be based on taking a photo of the chessboard with a mobile phone or a camera and uploading it to the photo counting interface, which can automatically identify and mark all the chess pieces on the chessboard. The territorial scope of both sides, the number of captured pieces, and the final result of victory or defeat will be displayed on the interface.
[0084] The game record interface is for recording and saving one's own or others' games. By inputting or importing game record data through the game record interface, a personal game record library can be created. The game record interface can also display editing controls, with which the recorded game records can be edited, such as adding annotations, marking key moves, inserting pictures, etc., to better organize and summarize the game record information. Optionally, the game record interface can also support the search and filtering functions of game records, and users can quickly find the recorded game records according to conditions such as keywords, dates, or game types.
[0085] The AI Go detailed analysis interface is an interface for deeply analyzing Go games based on artificial intelligence technology. Through artificial intelligence technology, the following operations can be performed but are not limited to: analyzing the trend of the game, evaluating the strategies of both sides, judging key nodes, and intelligently recommending move positions.
[0086] It should be noted that the above game interfaces are exemplary descriptions, and the present application does not limit the types of game interfaces.
[0087] In an exemplary embodiment of the present application, the game interface may include the move distribution, where the move distribution represents the distribution of the chess pieces placed at various positions on the chessboard. That is, the players of both sides of the game (which can be real players or AI players) alternately place the chess pieces at a certain position (intersection) on the chessboard to form the move distribution.
[0088] Exemplarily, the process of forming the game situation with the move distribution may include: displaying two or more basic situations, and the basic situations are used to provide different layout configurations for the opening of Go games. When any basic situation is selected, a game interface with the move distribution is displayed based on the move operations on the selected basic situation.
[0089] Among them, the basic situation can be the opening layout of standard Go. For example, common standard Go opening layouts may include but are not limited to star position, small eye, three-three, eye outside, high eye, etc. The user can choose any basic situation as the opening. After the basic situation is determined, the subsequent drop operation formed based on the basic situation can be used to obtain a game interface including the drop distribution. Among them, the star position is the nine specific intersections marked with black dots on the chessboard, and these points are marked with black dots; the small eye is the intersection of the third line and the fourth line on the Go board; three-three refers to the move that occupies the intersection of the third line and the third line in the corner in Go; the eye outside is the intersection of the third line and the fifth line in Go; the high eye refers to the intersection of the fifth line and the fourth line on the Go board.
[0090] In the process of playing Go, Go patterns can be formed on the basis of the basic situation. Different basic situations may have different effects on the advantages and disadvantages of Go patterns and the winning rate. The moves that start from the basic situation are generally fixed moves, and fixed moves can form corresponding fixed change diagrams. In other words, the Go game situation on the board can be determined using the basic situation and the fixed change diagram.
[0091] Optionally, before displaying the basic situation, an initial interface may be displayed, the initial interface being an interface including a chessboard, wherein the initial interface may also display pattern information. For example, the pattern information may be "a total of ×× patterns".
[0092] Optionally, during the process of placing a piece, the position where the piece is placed can be checked for forbidden points. Forbidden points refer to certain specific intersections on the chessboard. If one party places a piece at these points, the piece will be in a state of no Qi, and cannot take away the other party's piece. According to the rules of Go, such intersections are not allowed to be placed. For example, it can be determined whether the position where the piece is placed forms a state of no Qi after the piece is placed. If the position where the piece is placed forms a state of no Qi after the piece is placed, the position where the piece is placed is determined to be a forbidden point, that is, the piece cannot be placed at the position where the piece is placed; if the position where the piece is placed forms a state of Qi after the piece is placed, it means that the piece can be placed at the position where the piece is placed, and the dropped piece is displayed at the position where the piece is placed.
[0093] Optionally, after detecting the chess player's chess piece placement operation, it is also possible to detect whether there are other chess pieces at the placement position. If there are other chess pieces at the placement position, the chess piece cannot be placed at the placement position; if there are no other chess pieces at the placement position, it means that the chess piece can be placed at the placement position, and the dropped chess piece is displayed at the placement position.
[0094] Figure 3 Schematic diagram of a game interface including a basic situation provided by an embodiment of the present application. Figure 3As shown, the game interface may include a basic situation display area 301 and a chessboard area 302. A plurality of basic situations may be displayed in the basic situation display area 301, and any basic situation may be used as the opening situation of Go. After a basic situation is selected, the selected basic situation may be displayed in the chessboard area 302. Among them, chess pieces 303 in the basic situation may be displayed in the chessboard area 302.
[0095] The embodiments of the present application provide multiple basic situations so that the two players can choose different opening methods according to their own preferences and strategic considerations, thereby increasing the diversity and fun of the game; and by forming a distribution of moves (fixed pattern distribution) on the basic situation, the pattern detection results of Go fixed patterns in different basic situations can be determined in the subsequent process, thereby determining the advantages and disadvantages of Go fixed patterns applied in different basic situations.
[0096] In step 202, in response to a chessboard area selection operation in the game interface, a selected chessboard area is displayed, where the selected chessboard area is an area including any corner of the chessboard.
[0097] In an exemplary embodiment of the present application, after the game interface is displayed, a part of the chessboard area can also be selected in the game interface. The process of selecting part of the chessboard area may include: in response to the chessboard area selection operation in the game interface, displaying an adjustable area, the adjustable area including fixed points located at the corners of the chessboard and active points located in the chessboard, the active points being used to adjust the size of the adjustable area; determining the selected chessboard area based on the determined positions of the active points and the positions of the fixed points in the adjustable area.
[0098] Exemplarily, a pattern search control may be displayed in the game interface, and after the pattern search control is triggered, a board area may be selected. For example, in the case where the game interface is a live broadcast interface of a Go game, a mirrored chessboard including the board area of the live broadcast interface and a pattern search control may be displayed, and after the pattern search control is triggered, the user is allowed to select a certain board area in the game interface of the mirrored chessboard.
[0099] The chessboard area of the game interface can display an adjustable area, and the shape of the adjustable area can be a rectangle, wherein one vertex of the rectangle is a fixed point, located at a corner of the chessboard, and the vertex corresponding to the diagonal of the fixed point is an active point, located in the chessboard (for example, near the position of Tianyuan). By adjusting the position of the active point, the size of the adjustable area can be adjusted. When the position of the active point is determined, a rectangle can be determined based on the determined position of the active point and the position of the fixed point, that is, the selected chessboard area.
[0100] Figure 4 Schematic diagram of a game interface including an adjustable area provided in an embodiment of the present application. Figure 4As shown in the figure, the board area of the game interface may include four adjustable areas 401. Any one of the adjustable areas 401 may include a fixed point 402 located at the corner of the board and a movable point 403 located at the center of the board. Taking the adjustable area in the upper right corner of the board area as an example, the user can change the size of the adjustable area 401 by adjusting the position of the movable point 403. After the position of the movable point 403 is determined, the selected board area 404 can be determined by using the determined movable point 403 and the fixed point 402. Optionally, the display mode of the selected board area 404 is different from that of the unselected board area. For example, the unselected board area can be shaded to distinguish the selected board area 404 from the unselected board area.
[0101] It should be noted that the process of determining the selected board area and the shape of the selected board area in this application are exemplary descriptions. The shape and process of the selected board area can also be set based on the actual situation, and this application does not limit this.
[0102] By determining the selected board area in the board area of the game interface in the embodiments of this application, the user can flexibly select a specific area on the board for operation according to their own needs, laying a foundation for determining the fixed pattern distribution of the selected board area in the subsequent process.
[0103] Optionally, after determining the selected board area, the display mode of the selected board area can also be processed. For example, when the selected board area is larger than the 13*13 board area, the actual selected area can be displayed; when the selected board area is less than or equal to the 13*13 board area, the processed selected board area can be displayed. For example, the selected board area is enlarged for display, enlarged to the grid between the 13th and 14th roads, indicating that the game process is based on the 19th road board rather than the 13th road board.
[0104] In step 203, perform fixed pattern detection on the piece placement distribution of the selected board area and display the fixed pattern detection result. The fixed pattern detection result includes a first winning rate and a second winning rate. The first winning rate characterizes the quality of the fixed pattern distribution of the selected board area, and the second winning rate characterizes the quality of the next piece placement position on the board.
[0105] In an exemplary embodiment of the present application, the process of performing fixed pattern detection on the piece placement distribution of a selected chessboard area may include: determining adjustment information based on the position of the selected chessboard area on the chessboard, where the adjustment information is determined based on the piece placement distribution of the selected chessboard area and a fixed pattern tree, and the fixed pattern tree is used to record the piece placement sequences of Go fixed patterns; performing adjustment on the piece placement distribution of the selected chessboard area using the adjustment information to obtain an adjusted piece placement distribution; and performing fixed pattern detection on the black piece shapes and white piece shapes of the adjusted piece placement distribution respectively with the fixed pattern tree.
[0106] Exemplarily, the fixed pattern tree may be a data structure based on a corner of the chessboard area. When the selected area is the same as the standard area corresponding to the fixed pattern tree, it means that the selected area does not need to be adjusted, and the adjustment information is empty or does not need to be adjusted; when the selected area is different from the standard area corresponding to the fixed pattern tree, the adjustment information is obtained according to the comparison between the position of the selected chessboard area and the standard area, where the adjustment information may include the rotation angle and the adjusted piece placement positions.
[0107] Exemplarily, the fixed pattern tree is formed by collecting Go fixed patterns in professional game records, AI game data, and classic fixed pattern books. The fixed pattern tree includes a root node, multiple parent nodes, and multiple child nodes. Each node may represent a position on the chessboard. The root node, parent nodes, and child nodes form multiple paths, and each path may represent a piece placement sequence. Among them, the fixed pattern tree may be a fixed pattern tree formed based on the piece shapes in the upper right corner part of the chessboard.
[0108] Figure 5 It is a schematic diagram of a fixed pattern tree corresponding to a Go chessboard provided by an embodiment of the present application. As Figure 5 (a) shows, taking a 19x19 Go chessboard as an example for illustration, it is composed of 19 equally spaced and vertically intersecting parallel lines in both horizontal and vertical directions, with a total of 361 intersection points. The horizontal axis of the Go chessboard uses letters as coordinates, the vertical axis uses numbers as coordinates, and the piece placement position is the intersection of the horizontal and vertical axes. The piece placement position of the piece can be determined through the coordinates composed of letters and numbers. Figure 5 (b) shows that the root node of the fixed pattern tree corresponding to the chessboard may be the starting node of the current game process. One of the paths is the path composed of the black P4 - white Q6 - black N3 nodes, that is, the piece placement sequence (fixed pattern change diagram) of both sides of the game. That is to say, when placing pieces using this piece placement sequence, the position distribution of each piece is the fixed pattern distribution.
[0109] Taking the standard area of the Go fixed pattern tree as the upper right corner of the chessboard as an example for illustration. When the selected area is the chessboard area other than the upper right corner of the chessboard, the selected chessboard area can be rotated to the area of the upper right corner respectively to process the pieces at each corner based on the fixed pattern tree corresponding to the upper right corner, and the adjustment information is obtained.
[0110] Adjust the played coordinates in the selected chessboard area using the adjustment information to obtain the adjusted played coordinates. Exemplarily, the coordinates of the played positions of each piece on the selected chessboard area can be transformed to rotate the selected chessboard area to the upper right corner respectively. For example, for the upper left corner, with the origin of the Go chessboard as the center, the coordinates of each piece on the Go chessboard are rotated 90 degrees clockwise. If the horizontal axis of the Go chessboard uses letters as coordinates and the vertical axis uses numbers as coordinates, taking the original coordinates of the piece as (x, y) as an example, after rotating the coordinates of the piece 90 degrees clockwise, the coordinates are transformed into (y, -x). Then, compare the adjusted coordinates with the pattern tree to obtain the pattern detection result.
[0111] In an exemplary embodiment of the present application, the process of obtaining the pattern detection result may include: matching the played distribution of the selected chessboard area with the pattern tree to obtain a matching result, where the pattern tree is used to record the played sequence of Go patterns; when the matching result indicates that the played distribution is a pattern distribution, display the pattern detection result corresponding to the played distribution. When the matching result indicates that the played distribution is a non-pattern distribution, display a first prompt message, where the first prompt message is used to prompt that the played distribution is a non-pattern distribution.
[0112] Exemplarily, extract the position information and color information of all pieces in the selected chessboard area to form a corresponding played distribution map. Match the played distribution (keeping the black and white pieces unchanged) of the currently selected chessboard area with the pattern tree, such as aligning each piece in the played distribution with the nodes in the pattern tree to determine whether there is a matching pattern node path in the pattern tree. During the matching process, if no matching pattern node path is found in the initial match, automatically swap the colors of the black and white pieces and perform the matching again. After completing the swap and match of the black and white pieces, obtain the matching result.
[0113] Among them, during the process of searching according to the chess shape, the coordinates of the pieces can be matched with the coordinates of the pieces corresponding to the nodes of the pattern tree. During the matching process, the played order of the pieces can be not considered. The matching result may include multiple pattern node paths, and the matching result can be displayed according to the usage times of the pattern node paths during the game process.
[0114] If the matching result indicates that there is a pattern node sequence in the pattern tree that matches the chess shape of the played distribution, it means that the played distribution of the selected chessboard area is a pattern distribution, and thus the pattern distribution is automatically further detected. If the matching result indicates that there is no pattern node sequence in the pattern tree that matches the chess shape of the played distribution, it means that the played distribution of the selected chessboard area is a non-pattern distribution, and a first prompt message can be displayed in the game interface to prompt the user that there is no pattern distribution in the selected chessboard area.
[0115] In the embodiment of the present application, the piece placement distribution in the selected chessboard area is matched with the joseki tree. Using the matching result, it is convenient and fast to determine whether the piece placement distribution is a joseki distribution. In the case where the piece placement distribution is a joseki distribution, further detection can be performed on the joseki distribution. In the case where the piece placement distribution is a non-joseki distribution, timely feedback can be provided using the first prompt information, which can improve the convenience and accuracy of users' learning of go josekis to a certain extent.
[0116] In an exemplary embodiment of the present application, before performing joseki detection, the pieces in the selected area can also be adjusted. In response to the adjustment operation of the pieces in the selected chessboard area, the adjusted piece placement distribution is displayed in the selected chessboard area. The adjustment operation includes at least one of an operation of adding pieces, an operation of deleting pieces, or an operation of moving pieces; joseki detection is performed on the adjusted piece placement distribution in the selected chessboard area, and the joseki detection result is displayed.
[0117] Exemplarily, after determining the selected chessboard area, the positions of the pieces in the selected chessboard area can be adjusted. For example, add one or more pieces at any empty position in the selected chessboard area, delete one or more pieces, and move the positions of one or more pieces. Among them, the pieces to be adjusted can be black pieces or white pieces. The process of determining the joseki detection result will be described in detail below and will not be elaborated here.
[0118] In the embodiment of the present application, by performing operations of adding, deleting, or moving pieces in the selected chessboard area, the flexibility and interactivity of the game are enhanced. Users can adjust the piece placement distribution on the chessboard at any time according to their own strategic needs or understanding of the chess game, explore different moves and tactics, thereby improving the learning efficiency of go josekis.
[0119] In an exemplary embodiment of the present application, the joseki detection result may include a first winning rate and a second winning rate. The process of determining the first winning rate may include: determining an initial winning rate based on the go rules and the piece color, where the initial winning rate represents the winning rate corresponding to the state of no pieces placed; determining the current winning rate based on the piece placement distribution in the selected chessboard area; and determining the difference between the current winning rate and the initial winning rate as the first winning rate.
[0120] Exemplarily, according to the specified go rules, such as giving 33 / 4 points or 6.5 komi, calculate the initial winning rate in the state of an empty chessboard, that is, the winning rate corresponding to the state of no pieces placed. Through a pre-trained go AI model, the winning rate distributions of black and white pieces are statistically analyzed. For example, the initial winning rate of black pieces due to the first-move advantage is 55%. Use the go AI model to evaluate the winning rate of the current situation, determine the current winning rate of black or white pieces, and then calculate the difference between the current winning rate and the initial winning rate to obtain the first winning rate. Among them, the first winning rate can also be called the relative initial winning rate.
[0121] Optionally, the first winning rate can be represented not only numerically but also in text. Taking X as an example of the first winning rate: X ≥ +40%, a large advantage; +20% ≤ X < +40%, an advantage; +5% ≤ X < +20%, a slight advantage; -5% < X < +5%, an even situation; -20% < X ≤ -5%, a slight disadvantage; -40% < X ≤ -20%, a disadvantage; X ≤ -40%, a collapse.
[0122] In one embodiment, the display mode of the first winning rate may include at least one of the piece color, the first winning rate represented in text form, or the first winning rate represented in numerical form. For example, the first winning rate displayed in the game interface may be: for the black side: advantage to slight disadvantage | first winning rate: +23.5% to -5.8%; for the black side: large advantage to slight advantage | first winning rate: +43.5% to +7.8%; for the black side: even situation | relative initial winning rate: +3.5% to -1.8%.
[0123] In the exemplary embodiment of the present application, the process of determining the second winning rate may include: determining the current winning rate and each reference position based on the piece placement distribution in the selected chessboard area, where each reference position is a position with the probability of the next piece placement; determining the winning rate corresponding to the next piece placement based on each reference position and the piece placement distribution in the selected chessboard area; and determining the difference between the winning rate corresponding to the next piece placement and the current winning rate as the second winning rate.
[0124] Exemplarily, based on the piece placement distribution in the current chessboard area, use the Go AI model to predict the positions of all the next piece placement points that conform to the Go rules and the prediction probabilities of these positions, and screen out the positions with prediction probability values higher than the probability threshold as reference positions. Through the Go AI model, in combination with each reference position and the piece placement distribution in the selected chessboard area, evaluate the winning rate for each reference position to obtain the winning rate corresponding to one piece placement. Calculate the difference between the winning rate corresponding to one piece placement and the current winning rate to obtain the second winning rate, where the second winning rate can also be referred to as the relative current winning rate. It should be noted that the display mode of the second winning rate is the same as or similar to that of the first winning rate, and will not be elaborated here.
[0125] In addition, the first winning rate and the second winning rate can be specific numerical values or numerical ranges. Taking the upper right corner area of the chessboard as the selected chessboard area as an example. The fixed pattern of one corner will be affected by other corners and other parts of the chessboard. It may not be possible to form a complete fixed pattern distribution only using the piece placement distribution in the upper right corner area. Therefore, in order to more accurately evaluate the winning rate of the fixed pattern, the chess configuration of the lower left corner, the upper left corner, and the lower right corner, as well as other parts of the chessboard, can be extended based on the piece placement distribution in the upper right corner chessboard area. By supplementing the piece placement data, a winning rate evaluation can be generated on a global basis.
[0126] During the process of filling in the move data, the Go AI will simulate multiple possible initial game states, each based on a different game board configuration. For example, the Go AI constructs multiple different initial game states that can reflect several factors affecting the opening patterns, such as diagonal capturing races, corner combinations, black opening patterns, and white opening patterns. Then, the Go AI will perform opening pattern detection on these initial game states and evaluate the winning probabilities of the opening patterns at the next move (the M-th move) and at the start of the opening pattern (the 0-th move). By comparing the current winning probabilities in the constructed initial game states with the winning probability at the 0-th move, multiple relative initial winning probabilities can be obtained, that is, the range of relative initial winning probabilities; by comparing the current winning probabilities in the constructed initial game states with the winning probability at the M-th move, multiple relative current winning probabilities can be obtained, that is, the range of relative current winning probabilities. Among them, the larger the relative initial winning probability, the better the opening pattern, and the larger the relative current winning probability, the better the position of the next move.
[0127] Figure 6 is a schematic diagram of a game interface including an initial game state provided by an embodiment of the present application. As Figure 6 shown, a small number of pieces (pieces 1 to 4) are placed at 3 corners except the upper right corner, and the upper right corner is left empty. 47.5% on the figure is the initial winning probability of this initial game state and also the winning probability at the 0-th step.
[0128] In an exemplary embodiment of the present application, the process of determining the current winning probability may include: extracting features from the piece placement distribution in the board area to obtain features; inputting the features into a neural network model to obtain the probability of the next move (Policy) and the current winning probability (Value), determining the optimal move position based on Monte Carlo Tree Search (MCTS), and determining the winning probability corresponding to the optimal move position as the current winning probability.
[0129] Figure 7 is a schematic flowchart of calculating the current winning probability provided by an embodiment of the present application. As Figure 7 shown, the current board state is converted into features (numerical features) that can be processed by the neural network. For example, a 19×19 matrix is used to represent the board, and each position is marked with one of 1, 0, -1, where 1 represents the piece of the current player (such as black pieces), -1 represents the pieces of the opponent (such as white pieces), and 0 represents an empty point. Each acquisition channel can obtain a 19*19 feature matrix. If the number of channels is 17, a feature of 17*19*19 dimensions can be obtained.
[0130] Optionally, advanced feature extraction can also be performed on the current board state to obtain advanced features. Among them, the advanced features include, but are not limited to, the qi distribution matrix, the eye position distribution matrix, and the ko fight distribution matrix. For example, calculate the number of empty points adjacent to each chess piece to generate the qi distribution matrix; mark potential eye positions (empty points completely surrounded by one's own chess pieces) to obtain the eye position distribution matrix; mark the current ko fight position to avoid repeated moves to obtain the ko fight distribution matrix.
[0131] Figure 8 is a schematic diagram of the network architecture of a neural network provided by an embodiment of the present application. Combining Figure 8 , the backbone network is used to extract features from the board state, and the backbone network can include Block1 to N. For any Block structure, the input can be the features of the previous layer. The features of the board state are extracted using the convolutional layer, and the extracted features are normalized based on the batch normalization layer, and non-linear processing is performed using the activation function (ReLU). Among them, the number of convolutional layers and the number of normalization layers can be set according to the actual situation. Finally, the policy network (Policy Head) and the value network (Value Head) are obtained. Among them, the Policy Head is used to predict the probability distribution of the next legal move, and the Value Head is used to evaluate the winning rate of the current situation, that is, the current winning rate. Alternatively, the input features are directly normalized to obtain the policy network (Policy Head) and the value network (Value Head).
[0132] For the Policy Head, a convolutional layer (Convolution), such as a 1×1 convolutional kernel, can be used to compress the number of channels. Then, batch normalization is performed on the features to obtain normalized features, and the normalized features are enhanced non-linearly using the activation function (ReLU). The features after enhanced non-linearity are passed through a fully connected layer to map the features into a 361-dimensional vector (corresponding to the board positions), and then the Softmax function is used to normalize them into a probability distribution to filter out illegal moves and obtain the probability distribution of the next legal move.
[0133] For the Value Head, a convolutional layer (Convolution), such as a 1×1 convolutional kernel, can be used to compress the number of channels. Then, batch normalization (Batch norm) is performed on the features to obtain normalized features, and the normalized features are enhanced with a ReLU activation function to enhance non-linearity. The features with enhanced non-linearity are mapped to a 256-dimensional vector through a fully connected layer (Full connect). The non-linearity of the features is enhanced using a ReLU activation function, and the features with enhanced non-linearity are passed through a fully connected layer (Full connect) and a Tanh activation function to obtain the current winning rate.
[0134] After determining the probability of the next move (Policy) and the current winning rate (Value) using the Policy Head and the Value Head, Monte Carlo Tree Search (MCTS) can also be used to determine the optimal move position. Among them, the process of determining the optimal move position can include the following steps:
[0135] (1) Node initialization.
[0136] Taking the current board state as the root node, initialize the node parameters, which include but are not limited to the number of visits (N), the cumulative value (Q), and the prior probability (P). Among them, the number of visits (N) records the number of times the node is visited and is initially 0; the cumulative value (Q) records the cumulative value of the simulation results starting from this node and is initially 0; the prior probability (P) is the probability value output by the Policy Head, indicating the priority of this node under the parent node.
[0137] (2) Selection.
[0138] Starting from the root node, search through the Upper Confidence Bound (UCB) formula, and each time select the child node with the highest score until a leaf node is reached.
[0139]
[0140] In the above formula (1), Q is the cumulative value of the node; N is the number of visits of the node; c is the exploration coefficient, used to adjust the balance between exploration and exploitation; P is the prior probability provided by the Policy Head; n is the number of visits of the current child node.
[0141] (3) Expansion.
[0142] Expand the children nodes of the leaf node. The children nodes are all the legal move positions for the next step of the current game state. That is, according to the probability distribution output by the Policy Head, select several high-probability positions (such as the top 5 positions with the highest probabilities for placing a piece). Create children nodes for each high-probability position and record their prior probabilities P.
[0143] (4) Simulation.
[0144] Input the board state of the leaf node into the Policy Head and the Value Head to obtain the simulation results, that is, the probability of placing a piece in the next step (Policy) and the current winning rate (Value).
[0145] (5) Backpropagation.
[0146] Backpropagate the simulation results to all nodes on the path in the fixed pattern tree, and update the cumulative value (Q) and the number of visits (N).
[0147] (6) Decision output.
[0148] Among the children nodes of the root node, select the node with the most visits N as the final position for placing a piece, and the winning rate (Q / N) of this node as the current winning rate.
[0149] The fixed pattern detection result of the embodiment of the present application may include a first winning rate and a second winning rate. The first winning rate can reflect the advantages and disadvantages of the fixed pattern corresponding to the piece placement distribution in the selected board area, and the second winning rate can reflect the advantages and disadvantages of a single piece placement in the piece placement distribution. This enables the advantages and disadvantages of the fixed pattern to be comprehensively reflected by the first winning rate and the second winning rate during the process of learning Go fixed patterns, improving the pertinence and flexibility of Go fixed pattern detection, and making the obtained advantages and disadvantages of the Go fixed pattern more accurate.
[0150] Take the winning rates corresponding to the black pieces (the black side) of the first winning rate and the second winning rate as an example for illustration. Figure 9 It is a schematic diagram of a game interface including a fixed pattern detection result provided by an embodiment of the present application. As Figure 9 shown, the first winning rate (relative to the initial winning rate) 901 and the second winning rate (relative to the current winning rate) 902 can be displayed on the game interface.
[0151] In an exemplary embodiment of the present application, during the process of placing a piece, the fixed pattern placement position can also be displayed. The fixed pattern placement position represents the position that forms a fixed pattern distribution with the pieces on the current board; when the current piece placement position is the fixed pattern placement position, the fixed pattern detection is automatically executed. When the current piece placement position is a position other than the fixed pattern placement position, a second prompt message is displayed, and the second prompt message is used to prompt that the current piece placement position cannot form a fixed pattern distribution with the pieces on the board.
[0152] Exemplarily, during the process of placing a chess piece, the position of the placed chess piece can be compared with the fixed pattern tree to display the position of the fixed pattern move. That is to say, after placing a chess piece at the position of the fixed pattern move, a fixed pattern layout can be formed with the existing chess pieces on the current chessboard. Refer to Figure 9 , the chessboard area of the game interface can also display the positions of the fixed pattern moves 903, that is, the positions of the chess pieces A to E. That is to say, only when placing a chess piece at the positions of the chess pieces A to E, it is possible to form a fixed pattern distribution with the current chess pieces. When it is detected that the current position of the placed chess piece is the position of the fixed pattern move, the fixed pattern detection is automatically executed, where the process of the fixed pattern detection has been described in detail in step 203 and will not be elaborated here. When the current position of the placed chess piece is at a position other than the position of the fixed pattern move, a second prompt message is displayed, and the second prompt message is used to prompt the user that there is no fixed pattern distribution between the current position of the placed chess piece and the existing placed chess pieces.
[0153] In the embodiment of the present application, by displaying the positions of the fixed pattern moves and providing the fixed pattern detection function, this function can be used as an important auxiliary means for learning Go. Users can more intuitively understand the basic rules and strategies of the fixed patterns in Go, reducing the learning threshold. Moreover, when a fixed pattern distribution cannot be formed, the second prompt message can be used to timely remind the user, which helps the user to timely correct possible wrong moves and improve the accuracy and fluency of the game.
[0154] Taking the double-gun fixed pattern in Go as an example, the first winning rate (relative to the initial winning rate) and the second winning rate (relative to the current winning rate) corresponding to the black chess pieces (the black side) are described. Figure 10 It is a schematic diagram of a game process provided by the embodiment of the present application.
[0155] Figure 10 (a) After the first move of the fixed pattern, the current winning rate of the white side is 52.6%. Therefore, the current winning rate of the black side is 47.4%. At this time, the relative initial winning rate after the first move is 47.4% - 47.5% = -0.1%; the relative current winning rate is 47.4% - 47.5% = -0.1%.
[0156] Figure 10 (b) After the second move of the fixed pattern, the current winning rate of the black side is 52.0%. At this time, the relative initial winning rate after the second move is 52.0% - 47.5% = 4.5%; the relative current winning rate is 48.0% - 52.6% = -4.6%.
[0157] Figure 10 (c) After the third move of the fixed pattern, the current winning rate of the white side is 53.3%. Therefore, the current winning rate of the black side is 46.7%. At this time, the relative initial winning rate after the third move is 46.7% - 47.5% = -0.8%; the relative current winning rate is 46.7% - 52.0% = -5.3%.
[0158] Figure 10 (d) After the 4th move in the fixed pattern, the current winning rate of Black is 54.9%. At this time, the relative initial winning rate after the 4th move is 54.9% - 47.5% = 7.4%; the relative current winning rate is 45.1% - 53.3% = -8.2%.
[0159] Figure 10 (e) After the 5th move in the fixed pattern, the current winning rate of White is 48.5%. Therefore, the current winning rate of Black is 51.5%. At this time, the relative initial winning rate after the 5th move is 51.5% - 47.5% = 4.0%; the relative current winning rate is 51.5% - 54.9% = -3.4%.
[0160] Figure 10 (f) After the 6th move in the fixed pattern, the current winning rate of Black is 55.6%. At this time, the relative initial winning rate after the 6th move is 55.6% - 47.5% = 8.1%; the relative current winning rate is 44.4% - 48.5% = -4.1%.
[0161] Table 1 is a statistical table of the current winning rate, relative initial winning rate, and relative current winning rate from the 0th move to the 6th move above.
[0162] Table 1
[0163]
[0164]
[0165] It can be seen from Table 1 that by the 6th move, the relative initial winning rate of the entire fixed pattern is: Black increases by 8.1%. It can be seen that this fixed pattern is slightly better for Black. From the "relative current winning rate" of each move, it can be seen that for the 4th move, that is, the move where White makes a small flying move into the corner, the relative current winning rate drops the most, by 8.2%. That is to say, there is a disadvantage in the position selection of the current move. For each move in the fixed pattern, the overall quality of the fixed pattern can be evaluated through the relative initial winning rate, and the quality of the position of each move can be evaluated through the relative current winning rate.
[0166] In an exemplary embodiment of the present application, labels corresponding to the fixed pattern distribution can also be displayed in the game interface. The process of displaying labels corresponding to the fixed pattern distribution may include: when the detection result indicates that the move distribution in the selected chessboard area is a fixed pattern distribution, displaying candidate labels corresponding to the fixed pattern distribution; when a candidate label is selected, associating the fixed pattern distribution with the selected candidate label; displaying reference labels associated with the fixed pattern distribution, where the reference labels are labels for which the number of the same selected candidate labels associated with the fixed pattern distribution is greater than or equal to a quantity threshold.
[0167] Exemplarily, when the move distribution in the selected chessboard area characterized by the fixed pattern detection result is a fixed pattern distribution, a label selection control can be displayed. After the label selection control is triggered, candidate labels in a preset label library can be displayed, where the candidate labels can be keywords or phrases describing the characteristics of the fixed pattern. The user can select one or more interested labels from the displayed candidate labels. After the candidate labels are selected, the selected candidate labels can be associated with the fixed pattern distribution. Then, each label associated with the current fixed pattern distribution is determined, and the label with the number of the same selected candidate label greater than or equal to the quantity threshold is determined as the reference label, and the reference label is displayed in the game interface to provide more reference information for the user. It should be noted that the quantity threshold can be set based on the actual situation, and the present application does not limit this.
[0168] For example, the labels associated with the current fixed pattern distribution are label 1, label 2, …, label k. Among them, the number of times the user selects label 1 and label 2 associated with the current fixed pattern distribution is greater than the quantity threshold, and label 1 and label 2 can be displayed in the game interface.
[0169] Figure 11 It is a schematic diagram of an interface for displaying candidate labels provided by an embodiment of the present application. As Figure 11 shown, multiple candidate labels 1101 can be displayed in the game interface. After any candidate label 1101 is selected, the selected candidate label 1101 can be associated with the fixed pattern distribution of the current game interface through the determination control 1102. The number of the same candidate label associated with the current fixed pattern distribution can also be displayed in the candidate label 1101. For example, the number of AI fixed pattern labels associated with the current fixed pattern distribution is 54. The top three labels with the largest number of labels associated with the current fixed pattern distribution label are determined as the reference labels, and the reference labels 1103 are displayed in the game interface.
[0170] In the embodiment of the present application, the user can select the corresponding candidate labels based on their own understanding to be associated with the current fixed pattern distribution, determine the displayed reference labels through the number of candidate labels associated with the fixed pattern distribution, and use the reference labels to briefly prompt the user about the relevant information of the fixed pattern distribution. And in the subsequent process, the fixed pattern distribution required by the user can also be quickly searched through the labels associated with the fixed pattern distribution, improving the convenience of searching for the fixed pattern distribution.
[0171] In an exemplary embodiment of the present application, a return control can also be displayed in the game interface. The process of returning to the situation in the game based on the return control includes: in response to the trigger operation of the return control, displaying the backtracked situation and the fixed pattern detection result corresponding to the backtracked situation, where the backtracked situation is determined based on the move sequence in the game interface and the trigger operation of the return control.
[0172] Exemplarily, the triggering operations of the return control may include, but are not limited to, single-click operations, double-click operations, and long-press operations on the return control. Among them, the return control can be used to return to any backtracking situation, and the backtracking situation is a situation that has been displayed during the game. Moreover, the go game interface may also display the result of the fixed pattern detection corresponding to the current backtracking situation.
[0173] In combination with Figure 9 , the go game interface may include a return control display area 904, and multiple return controls may be displayed in the return control display area 904, such as a root node return control and a previous step return control. Among them, the root node return control is used to return to the initial state of the game, that is, the root node state; the previous step return control allows the user to cancel the previous operation and make the chessboard return to the state before the previous step.
[0174] In the embodiment of the present application, any backtracking situation can be displayed through the return control, which is convenient for reviewing and analyzing the process of the go game. Moreover, the result of the fixed pattern detection is displayed in the backtracking situation, which helps the user better understand the strategy selection and fixed pattern application during the game.
[0175] In an exemplary embodiment of the present application, a display parameter setting area may also be displayed in the go game interface. When it is detected that the piece placement distribution in the selected chessboard area is a fixed pattern distribution, in response to the setting operation of the detection range parameter in the parameter setting area, the chess score information associated with the fixed pattern distribution is displayed. The chess score information associated with the fixed pattern distribution is determined based on the set detection range parameter and the go chess scores. The chess score information includes at least one of professional chess score information or total chess score information.
[0176] Exemplarily, the parameter setting area is used to set the detection range of the current piece placement distribution in the chess score database. When the piece placement distribution is a fixed pattern distribution, the chess score information of the fixed pattern distribution can be detected within the detection range set by the user in the chess score database. Among them, the chess score database may include professional chess scores and regular chess scores. After the detection of the chess score information is completed, the chess score information corresponding to the fixed pattern distribution can be displayed.
[0177] In combination with Figure 9 , the parameter setting area is to set the range of the chess scores to be detected. For example, if the set detection chess score range is from 1 dan to 5 dan, the number of professional chess scores and the number of associated chess scores (total chess scores) of the current fixed pattern distribution can be displayed in the chess scores corresponding to 1 dan to 5 dan. For example, when a piece is placed at position A, the number of professional chess scores associated with the corresponding fixed pattern distribution is 4562, and the number of associated total chess scores is 123456.
[0178] In the embodiment of the present application, the relevant chess score information is displayed according to the fixed pattern distribution. The user does not need to manually search for or input the chess score information, which improves the convenience and efficiency of searching for the chess score information associated with the fixed pattern distribution.
[0179] In an exemplary embodiment of the present application, comment information corresponding to the distribution of fixed patterns can also be displayed in the game interface. The process of displaying the comment information may include: obtaining the comment information of the fixed pattern distribution; performing semantic analysis on the comment information to obtain the type of the comment information; and classifying and displaying the comment information in the game interface based on the type of the comment information.
[0180] Exemplarily, during the game or when watching the game, users can make comments, obtain the comment information of each user on the fixed pattern distribution in the current game process, and preprocess the comment information. The preprocessing includes, but is not limited to, removing duplicate data, filtering irrelevant information, and converting data formats for the comment information. Then, a semantic analysis tool (such as a natural language processing model) is used to perform word segmentation and part-of-speech tagging on the comment information, determine the type of the comment information using part-of-speech tagging, classify the comment information, and the comment information can be classified and displayed in the game interface.
[0181] For example, the types of comment information may include strategy suggestions, typical mistakes, innovative variations, and win rate predictions. When detecting suggestion parts of speech such as "recommended corner protection", the type of the comment information can be determined as a strategy suggestion; when detecting mistake parts of speech such as "avoid leaving this position without playing a move", the type of the comment information can be determined as a typical mistake; when detecting move parts of speech such as "try the new variation of AI", the type of the comment information can be determined as an innovative variation; when detecting parts of speech for win rate predictions such as "the black side has an obvious advantage", the type of the comment information can be determined as a win rate prediction.
[0182] Optionally, the comment information display area may further include interaction controls, which can be used to filter the comment information by type, perform interaction operations such as keyword search, like, and report.
[0183] Figure 12 is a schematic diagram of an interface for displaying comment information provided by an embodiment of the present application. As Figure 12 shown, a comment information display area 1201 can be displayed in the game interface, and comments of each user on the fixed pattern distribution in the game process can be displayed in the comment information display area 1201. Among them, the comment information can be divided into different types based on its content, such as type 1 and type 2, and the comment information can be classified and displayed by different comment information types.
[0184] Through semantic analysis, the embodiments of the present application can automatically identify key information in comments, realize effective classification and display of comment information, help users quickly obtain valuable comment information, and improve the utilization rate of information. Classifying and displaying comment information can enable users to more easily find comment content they are interested in, reduce the time cost of information screening, and improve the display efficiency of information.
[0185] In this application, by analyzing the piece placement distribution in the selected chessboard area in the game interface and detecting the piece placement distribution in the selected area during the game, the freedom of Go opening detection can be improved, which better meets the user's needs. By performing opening detection on the piece placement distribution in the selected chessboard area, an opening detection result including a first winning rate and a second winning rate is obtained. Among them, the first winning rate can reflect the quality of the opening corresponding to the piece placement distribution in the selected chessboard area, and the second winning rate can reflect the quality of a single piece placement in the piece placement distribution. During the process of determining the quality of a Go opening, the quality of the opening can be comprehensively reflected by the first winning rate and the second winning rate, improving the pertinence and flexibility of Go opening detection, and thus improving the accuracy of determining the quality of a Go opening.
[0186] This application also provides a device for detecting Go openings. Figure 13 It is a schematic structural diagram of a device for detecting Go openings provided by an embodiment of this application, as Figure 13 shown. The device includes:
[0187] A display module 1301, configured to display a game interface including a piece placement distribution, where the piece placement distribution represents the distribution of pieces placed at each position on the chessboard;
[0188] The display module 1301 is further configured to, in response to a chessboard area selection operation on the game interface, display the selected chessboard area, where the selected chessboard area is an area including any corner of the chessboard;
[0189] The display module 1301 is further configured to perform opening detection on the piece placement distribution in the selected chessboard area and display the opening detection result, where the opening detection result includes a first winning rate and a second winning rate. The first winning rate represents the quality of the opening distribution in the selected chessboard area, and the second winning rate represents the quality of the next piece placement position on the chessboard.
[0190] In a possible implementation manner, the display module 1301 is configured to, in response to a chessboard area selection operation on the game interface, display an adjustable area. The adjustable area includes a fixed point located at a corner of the chessboard and a movable point located in the chessboard, and the movable point is used to adjust the size of the adjustable area; determine the selected chessboard area based on the position of the determined movable point and the position of the fixed point in the adjustable area.
[0191] In a possible implementation manner, the display module 1301 is further configured to, in response to an operation of adjusting the piece placement in the selected chessboard area, display the adjusted piece placement distribution in the selected chessboard area, where the adjustment operation includes at least one of an operation of adding a piece, an operation of deleting a piece, or an operation of moving a piece;
[0192] A display module 1301, configured to perform fixed pattern detection on the adjusted piece placement distribution of the selected chessboard area and display the fixed pattern detection result.
[0193] In a possible implementation, the apparatus further includes a determination module (not shown in the figure). The determination module is configured to determine an initial winning rate based on Go rules and piece colors. The initial winning rate represents the winning rate corresponding to the state where no pieces have been placed. The current winning rate is determined based on the piece placement distribution of the selected chessboard area. The difference between the current winning rate and the initial winning rate is determined as the first winning rate.
[0194] In a possible implementation, the apparatus further includes a determination module. The determination module is configured to determine the current winning rate and each reference position based on the piece placement distribution of the selected chessboard area. Each reference position is a position with the probability of the next piece placement. The winning rate corresponding to the next piece placement is determined based on each reference position and the piece placement distribution of the selected chessboard area. The difference between the winning rate corresponding to the next piece placement and the current winning rate is determined as the second winning rate.
[0195] In a possible implementation, the apparatus further includes a determination module. The determination module is configured to determine adjustment information based on the position of the selected chessboard area on the chessboard. The adjustment information is determined based on the piece placement distribution of the selected chessboard area and a fixed pattern tree. The fixed pattern tree is used to record the piece placement sequence of Go fixed patterns. The fixed pattern detection is respectively performed on the black piece shapes and white piece shapes of the adjusted piece placement distribution and the fixed pattern tree.
[0196] In a possible implementation, the display module 1301 is configured to match the piece placement distribution of the selected chessboard area with the fixed pattern tree to obtain a matching result. The fixed pattern tree is used to record the piece placement sequence of Go fixed patterns. When the matching result indicates that the piece placement distribution is a fixed pattern distribution, the fixed pattern detection result corresponding to the piece placement distribution is displayed.
[0197] In a possible implementation, the display module 1301 is further configured to display a first prompt message when the matching result indicates that the piece placement distribution is a non-fixed pattern distribution. The first prompt message is used to prompt that the piece placement distribution is a non-fixed pattern distribution.
[0198] In a possible implementation, the display module 1301 is further configured to display the fixed pattern piece placement position, which represents the position that forms a fixed pattern distribution with the pieces on the current chessboard. The apparatus further includes a detection module (not shown in the figure). The detection module is configured to automatically perform fixed pattern detection when the current piece placement position is the fixed pattern piece placement position.
[0199] In a possible implementation, the display module 1301 is further configured to display a second prompt message when the current piece placement position is a position other than the fixed pattern piece placement position. The second prompt message is used to prompt that the current piece placement position cannot form a fixed pattern distribution with the pieces on the chessboard.
[0200] In a possible implementation, the display module 1301 is further configured to, when the detection result indicates that the piece placement distribution in the selected chessboard area is a fixed pattern distribution, display candidate labels corresponding to the fixed pattern distribution; when a candidate label is selected, associate the fixed pattern distribution with the selected candidate label; and display reference labels associated with the fixed pattern distribution, where the reference labels are labels for which the number of the same selected candidate labels associated with the fixed pattern distribution is greater than or equal to a quantity threshold.
[0201] In a possible implementation, the display module 1301 is further configured to display two or more basic game states, where the basic game states are used to provide layout configurations for different Go game openings.
[0202] The display module 1301 is configured to, when any one of the basic game states is selected, display a game interface of the piece placement distribution based on the piece placement operation on the selected basic game state.
[0203] In a possible implementation, the game interface further includes a return control, and the display module 1301 is further configured to, in response to a trigger operation of the return control, display a backtrack game state and the fixed pattern detection result corresponding to the backtrack game state, where the backtrack game state is determined based on the piece placement sequence of the game interface and the trigger operation of the return control.
[0204] In a possible implementation, the display module 1301 is further configured to display a parameter setting area in the game interface; when the detection result indicates that the piece placement distribution in the selected chessboard area is a fixed pattern distribution, in response to a setting operation of the detection range parameter in the parameter setting area, display the chess score information associated with the fixed pattern distribution, where the chess score information associated with the fixed pattern distribution is determined based on the set detection range parameter and the Go chess scores, and the chess score information includes at least one of professional chess score information or total chess score information.
[0205] In a possible implementation, the device further includes a classification module (not shown in the figure), where the classification module is configured to obtain the comment information of the fixed pattern distribution; perform semantic analysis on the comment information to obtain the type of the comment information.
[0206] The display module 1301 is further configured to, based on the type of the comment information, classify and display the comment information in the game interface.
[0207] By analyzing the piece placement distribution in the selected board area in the game interface and detecting the piece placement distribution in the selected area during the game, the degree of freedom of Go joseki detection can be improved, which better meets the user's needs. By performing joseki detection on the piece placement distribution in the selected board area, a joseki detection result including a first winning rate and a second winning rate is obtained. Among them, the first winning rate can reflect the quality of the joseki corresponding to the piece placement distribution in the selected board area, and the second winning rate can reflect the quality of a single move in the piece placement distribution. In the process of determining the quality of Go joseki, the first winning rate and the second winning rate can comprehensively reflect the quality of the joseki, improving the pertinence and flexibility of Go joseki detection, and thus improving the accuracy of determining the quality of Go joseki.
[0208] It should be understood that when the above-mentioned provided device realizes its functions, only the above-mentioned division of each functional module is used for illustration. In actual applications, the above-mentioned functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above-mentioned embodiment and the method embodiment belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be elaborated here.
[0209] Figure 14 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application. The terminal device 2100 can be any electronic device product that can perform human-computer interaction with the user through one or more methods such as a keyboard, a touchpad, a remote control, voice interaction, or a handwriting device. For example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (Pocket PC), a tablet computer, a smart car machine, a smart TV, a smart watch, etc.
[0210] Generally, the terminal device 2100 includes: a processor 2101 and a memory 2102.
[0211] The processor 2101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 2101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 2101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2101 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2101 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0212] The memory 2102 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 2102 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2102 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 2101 to implement the method for detecting go joseki provided in the method embodiments of the present application.
[0213] In some embodiments, the terminal device 2100 may further optionally include: a peripheral device interface 2103 and at least one peripheral device. The processor 2101, the memory 2102, and the peripheral device interface 2103 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 2103 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 2104, a display screen 2105, a camera assembly 2106, an audio circuit 2107, and a power supply 2108.
[0214] The peripheral device interface 2103 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 2101 and the memory 2102. In some embodiments, the processor 2101, the memory 2102, and the peripheral device interface 2103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2101, the memory 2102, and the peripheral device interface 2103 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0215] The radio frequency circuit 2104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2104 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 2104 can communicate with other terminal devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, each generation of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 2104 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0216] The display screen 2105 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 2105 is a touch display screen, the display screen 2105 also has the ability to collect touch signals on or above the surface of the display screen 2105. The touch signals can be input to the processor 2101 as control signals for processing. At this time, the display screen 2105 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 2105, which is disposed on the front panel of the terminal device 2100; in other embodiments, there may be at least two display screens 2105, which are respectively disposed on different surfaces of the terminal device 2100 or are in a foldable design; in other embodiments, the display screen 2105 may be a flexible display screen, which is disposed on a curved surface or a folding surface of the terminal device 2100. Even further, the display screen 2105 can also be set to an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 2105 can be prepared using materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0217] The camera module 2106 is used to capture images or videos. Optionally, the camera module 2106 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the terminal device 2100, and the rear camera is disposed on the back of the terminal device 2100. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to implement functions such as background blurring by fusing the main camera and the depth-of-field camera, panoramic shooting by fusing the main camera and the wide-angle camera, and VR (Virtual Reality) shooting functions or other fused shooting functions. In some embodiments, the camera module 2106 may also include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. A dual-color-temperature flash refers to a combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0218] The audio circuit 2107 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 2101 for processing, or input to the radio frequency circuit 2104 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal device 2100. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signals from the processor 2101 or the radio frequency circuit 2104 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 2107 may also include a headphone jack.
[0219] The power supply 2108 is used to supply power to each component in the terminal device 2100. The power supply 2108 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 2108 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0220] In some embodiments, the terminal device 2100 further includes one or more sensors 2110. The one or more sensors 2110 include but are not limited to: an acceleration sensor 2111, a gyroscope sensor 2112, a pressure sensor 2113, an optical sensor 2114, and a proximity sensor 2115.
[0221] The acceleration sensor 2111 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal device 2100. For example, the acceleration sensor 2111 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 2101 can control the display screen 2105 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 2111. The acceleration sensor 2111 can also be used for the collection of game or user's motion data.
[0222] The gyroscope sensor 2112 can detect the body direction and rotation angle of the terminal device 2100. The gyroscope sensor 2112 can cooperate with the acceleration sensor 2111 to collect the 3D actions of the user on the terminal device 2100. Based on the data collected by the gyroscope sensor 2112, the processor 2101 can achieve the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.
[0223] The pressure sensor 2113 can be disposed on the side frame of the terminal device 2100 and / or the lower layer of the display screen 2105. When the pressure sensor 2113 is disposed on the side frame of the terminal device 2100, it can detect the holding signal of the user on the terminal device 2100, and the processor 2101 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor 2113. When the pressure sensor 2113 is disposed on the lower layer of the display screen 2105, the processor 2101 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 2105. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0224] The optical sensor 2114 is used to collect the ambient light intensity. In one embodiment, the processor 2101 can control the display brightness of the display screen 2105 according to the ambient light intensity collected by the optical sensor 2114. Specifically, when the ambient light intensity is high, the display brightness of the display screen 2105 is increased; when the ambient light intensity is low, the display brightness of the display screen 2105 is decreased. In another embodiment, the processor 2101 can also dynamically adjust the shooting parameters of the camera assembly 2106 according to the ambient light intensity collected by the optical sensor 2114.
[0225] The proximity sensor 2115, also known as the distance sensor, is usually disposed on the front panel of the terminal device 2100. The proximity sensor 2115 is used to collect the distance between the user and the front of the terminal device 2100. In one embodiment, when the proximity sensor 2115 detects that the distance between the user and the front of the terminal device 2100 is gradually decreasing, the processor 2101 controls the display screen 2105 to switch from the lit state to the off state; when the proximity sensor 2115 detects that the distance between the user and the front of the terminal device 2100 is gradually increasing, the processor 2101 controls the display screen 2105 to switch from the off state to the lit state.
[0226] Those skilled in the art can understand that Figure 14 the structure shown in does not limit the terminal device 2100, and it may include more or fewer components than shown in the figure, or combine some components, or adopt different component arrangements.
[0227] Figure 15FIG. 0 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 2200 may vary greatly due to different configurations or performances, and may include one or more processors 2201 and one or more memories 2202. Among them, at least one program code is stored in the one or more memories 2202, and the at least one program code is loaded and executed by the one or more processors 2201 to implement the Go opening detection method provided by each of the above method embodiments. Of course, the server 2200 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input / output. The server 2200 may also include other components for implementing the functions of the device, which will not be elaborated here.
[0228] In an exemplary embodiment, a computer-readable storage medium is also provided. At least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to enable a computer to implement any of the above Go opening detection methods.
[0229] Optionally, the above computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0230] In an exemplary embodiment, a computer program or a computer program product is also provided. At least one computer instruction is stored in the computer program or the computer program product, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement any of the above Go opening detection methods.
[0231] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the game interface, move distribution, opening detection results, first win rate, and second win rate involved in the present application are all obtained under full authorization.
[0232] It should be understood that "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0233] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included within the protection scope of the present application.
Claims
1. A method for detecting a Go pattern, characterized in that: The method comprises: Displaying a game interface including a chess piece drop distribution, wherein the chess piece drop distribution represents the distribution of chess pieces dropped at various positions on the chessboard; In response to a chessboard area selection operation in the game interface, a selected chessboard area is displayed, wherein the selected chessboard area is an area including any corner of the chessboard; A pattern detection is performed on the distribution of the chess piece placement in the selected chessboard area, and the pattern detection result is displayed. The pattern detection result includes a first winning rate and a second winning rate. The first winning rate represents the quality of the pattern distribution of the selected chessboard area, and the second winning rate represents the quality of the next chess piece placement position on the chessboard.
2. The method according to claim 1, characterized in that The step of displaying the selected chessboard area in response to the chessboard area selection operation in the game interface comprises: In response to a chessboard area selection operation in the game interface, an adjustable area is displayed, wherein the adjustable area includes a fixed point located at a corner of the chessboard and an active point located in the chessboard, and the active point is used to adjust the size of the adjustable area; The selected chessboard area is determined based on the determined positions of the active points and the positions of the fixed points in the adjustable area.
3. The method according to claim 1, characterized in that Before performing a pattern detection on the distribution of chess pieces in the selected chessboard area and displaying the pattern detection result, the method further includes: In response to an adjustment operation of the chess piece placement in the selected chessboard area, displaying an adjusted chess piece placement distribution in the selected chessboard area, wherein the adjustment operation includes at least one of an operation of adding a chess piece, an operation of deleting a chess piece, or an operation of moving a chess piece; The performing of a pattern detection on the distribution of the chess pieces in the selected chessboard area and displaying the pattern detection result includes: A pattern detection is performed on the adjusted chess piece distribution of the selected chessboard area, and the pattern detection result is displayed.
4. The method according to claim 1, characterized in that: Before displaying the pattern detection result, the method further includes: Determine an initial winning rate based on Go rules and the color of the chess pieces, wherein the initial winning rate represents the winning rate corresponding to the state where the chess pieces have not been placed; Determine the current winning rate based on the distribution of chess pieces in the selected chessboard area; The difference between the current winning rate and the initial winning rate is determined as the first winning rate.
5. The method according to claim 1, characterized in that Before displaying the pattern detection result, the method further includes: Determine the current winning rate and various reference positions based on the distribution of the chessboard moves in the selected chessboard area, wherein each reference position is a position with a probability of the next chess move; Determine the winning rate corresponding to the next move based on the reference positions and the distribution of moves in the selected chessboard area; The difference between the winning rate corresponding to the next move and the current winning rate is determined as the second winning rate.
6. The method according to claim 1, characterized in that The performing a fixed pattern detection on the distribution of chess pieces in the selected chessboard area includes: Determine adjustment information based on the position of the selected chessboard area on the chessboard, wherein the adjustment information is determined based on the distribution of the pieces placed in the selected chessboard area and a pattern tree, wherein the pattern tree is used to record the sequence of pieces placed in a Go pattern; Using the adjustment information, adjusting the distribution of chess pieces in the selected chessboard area to obtain an adjusted distribution of chess pieces; The black chess pieces and the white chess pieces of the adjusted chess piece distribution are respectively subjected to pattern detection with the pattern tree.
7. The method according to claim 1, characterized in that The performing of a pattern detection on the distribution of the chess pieces in the selected chessboard area and displaying the pattern detection result includes: Matching the distribution of the pieces in the selected chessboard area with the pattern tree to obtain a matching result, wherein the pattern tree is used to record the sequence of pieces in the Go pattern; When the matching result indicates that the move distribution is a fixed pattern distribution, a fixed pattern detection result corresponding to the move distribution is displayed.
8. The method according to claim 7, characterized in that The method further comprises: When the matching result indicates that the move distribution is a non-standard distribution, first prompt information is displayed, where the first prompt information is used to prompt that the move distribution is a non-standard distribution.
9. The method according to claim 1, characterized in that: After displaying the game interface including the distribution of the pieces, the following is further included: Displaying a fixed-pattern chess piece placement position, wherein the fixed-pattern chess piece placement position represents a position that forms a fixed-pattern distribution with chess pieces on the current chessboard; When the current drop position is the fixed drop position, the fixed pattern detection is automatically performed.
10. The method according to claim 9, characterized in that The method further comprises: When the current chess piece placement position is outside the fixed chess piece placement position, a second prompt information is displayed, wherein the second prompt information is used to prompt that the current chess piece placement position and the chess pieces on the chessboard cannot form a fixed distribution.
11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: When the detection result indicates that the chess piece distribution in the selected chessboard area is a fixed distribution, displaying candidate labels corresponding to the fixed distribution; When the candidate tag is selected, associating the stereotype distribution with the selected candidate tag; The reference tags associated with the stereotype distribution are displayed, where the reference tags are tags whose number of the same selected candidate tags associated with the stereotype distribution is greater than or equal to a number threshold.
12. The method according to any one of claims 1 to 10, characterized in that: Before displaying the game interface including the distribution of the pieces, the method further includes: Display two or more basic situations, wherein the basic situations are used to provide different layout configurations of Go openings; The game interface showing the distribution of the pieces includes: When any basic situation is selected, a game interface showing the distribution of moves is displayed based on the move operations on the selected basic situation.
13. The method according to any one of claims 1 to 10, characterized in that: The game interface further includes a return control, and the method further includes: In response to the triggering operation of the return control, a backtracking situation and a pattern detection result corresponding to the backtracking situation are displayed, wherein the backtracking situation is determined based on the move sequence of the game interface and the triggering operation of the return control.
14. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Displaying a parameter setting area in the game interface; In a case where the detection result indicates that the distribution of the pieces dropped in the selected chessboard area is a fixed distribution, in response to the setting operation of the detection range parameter in the parameter setting area, game record information associated with the fixed distribution is displayed, the game record information associated with the fixed distribution is determined based on the set detection range parameter and Go game records, and the game record information includes at least one of professional game record information or general game record information.
15. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Obtaining comment information of the stereotyped distribution; Performing semantic analysis on the comment information to obtain the type of the comment information; Based on the type of the comment information, the comment information is displayed in the game interface in a classified manner.
16. A Go pattern detection device, characterized in that: The device comprises: A display module, used to display a game interface including a chess piece drop distribution, wherein the chess piece drop distribution represents the distribution of chess pieces dropped at various positions on the chessboard; The display module is further used to display a selected chessboard area in response to a chessboard area selection operation in the chess game interface, wherein the selected chessboard area is an area including any corner of the chessboard; The display module is also used to perform a pattern detection on the distribution of the chess piece placement in the selected chessboard area and display the pattern detection result, wherein the pattern detection result includes a first winning rate and a second winning rate, wherein the first winning rate represents the quality of the pattern distribution of the selected chessboard area, and the second winning rate represents the quality of the next chess piece placement position on the chessboard.
17. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor, so that the computer device implements the Go pattern detection method as described in any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor so that the computer implements the Go pattern detection method according to any one of claims 1 to 15.
19. A computer program product, characterized in that The computer program product stores at least one computer instruction, and the at least one computer instruction is loaded and executed by a processor so that the computer implements the method for detecting Go patterns as described in any one of claims 1 to 15.