WO2022267276A1 - 一种人机对弈方法、装置、设备、存储介质及程序产品 - Google Patents

一种人机对弈方法、装置、设备、存储介质及程序产品 Download PDF

Info

Publication number
WO2022267276A1
WO2022267276A1 PCT/CN2021/125332 CN2021125332W WO2022267276A1 WO 2022267276 A1 WO2022267276 A1 WO 2022267276A1 CN 2021125332 W CN2021125332 W CN 2021125332W WO 2022267276 A1 WO2022267276 A1 WO 2022267276A1
Authority
WO
WIPO (PCT)
Prior art keywords
party
move
chess
historical
current
Prior art date
Application number
PCT/CN2021/125332
Other languages
English (en)
French (fr)
Inventor
蒲雪
李凯
卢乐炜
蔺颖
李文哲
Original Assignee
成都商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都商汤科技有限公司 filed Critical 成都商汤科技有限公司
Priority to KR1020247002817A priority Critical patent/KR20240023178A/ko
Publication of WO2022267276A1 publication Critical patent/WO2022267276A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/67Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor adaptively or by learning from player actions, e.g. skill level adjustment or by storing successful combat sequences for re-use
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F3/00Board games; Raffle games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F3/00Board games; Raffle games
    • A63F3/02Chess; Similar board games
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6027Methods for processing data by generating or executing the game program using adaptive systems learning from user actions, e.g. for skill level adjustment
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/61Score computation

Definitions

  • Embodiments of the present disclosure relate to the field of data processing, and relate to a method, device, equipment, storage medium, and program product for man-machine games.
  • AI artificial intelligence
  • the use of man-machine games is becoming more and more extensive.
  • some AI chess power models of different levels are usually preset, and users can manually set them before each game according to their own judgment and selection. This method depends on the user himself.
  • the subjective judgment ability of the game usually leads to the wrong level selection due to reasons such as difficulty in judging its own ability. It is difficult for the user to experience the feeling of meeting the opponent quickly during the game, which affects the user's interest in the game.
  • Embodiments of the present disclosure provide a method, device, equipment, storage medium, and program product for a human-computer game.
  • a method for man-machine game including:
  • the second move strategy corresponding to the second party is generated based on the current move position corresponding to the move event and the historical move record; the second move strategy Including a plurality of second candidate positions and a second party winning rate corresponding to each second candidate position;
  • the chess power quantization value is used to characterize the chess power level of the first party
  • a target position is determined in the plurality of second candidate positions; the winning ratio of the second party corresponding to the target position matches the chess quantization value.
  • the determining the chess strength value of the first party based on the historical record of moves and the current position of moves includes:
  • the determining the target drop position in the plurality of second candidate positions includes:
  • the preset first mapping table obtain the target ranking position corresponding to the chess score of the first party; the first mapping table includes the mapping relationship between the chess score and the ranking position;
  • the second candidate position corresponding to the target sorting position is determined as the target drop position.
  • the determining the target drop position in the plurality of second candidate positions includes:
  • a second candidate position located in the target winning percentage interval is determined as the target betting position.
  • the real-time chess score of the first party in the current round is determined, and based on the real-time chess score in the second move strategy, it is obtained that the first chess player is in the same position as the first chess player.
  • There is a target position where there is a mapping relationship between the real-time winning rate of the player, and the effect of "meeting opponents" can be achieved between the first player and the second player in the current game process.
  • the method in the response to the move event of the first party in the current round, based on the first current move corresponding to the move event and the historical move record, the second party corresponding to the first move is generated.
  • the method also includes: based on the historical move record, predicting the first move strategy corresponding to the first party; the first move strategy includes a plurality of first candidate positions and each of the The winning rate of the first party corresponding to the first candidate position;
  • the determining the chess strength value of the first party based on the historical record and the current position of the position includes: determining the current position based on the winning rate of the first party corresponding to each of the first positions to be selected.
  • the winning percentage of the first party corresponding to the position; the winning percentage of the first party corresponding to the current falling position is determined as the chess power quantization value.
  • the determining the target drop position in the plurality of second candidate positions includes:
  • the target betting position is determined in the plurality of second candidate positions; there is a mapping relationship between the winning rate of the second party of the target betting position and the winning rate of the first party.
  • the first party's move strategy in the current round is predicted after the second party's move, it is obtained that the first party's corresponding positions include a plurality of first candidate positions and each of the first candidate positions The first move strategy of the first party's winning rate corresponding to the position. Furthermore, in the current round, the chess strength value of the first party can be quickly determined after the first party makes a move, thereby increasing the speed of the second party's move in the current round. At the same time, because the first party's real-time winning rate in the current round is determined based on the current position of the first party in the current round, and based on the real-time winning rate, the real-time winning rate of the first party is obtained in the second move strategy. The target position can realize the effect of "meeting opponents" between the first party and the second party in the current game process.
  • the historical play record includes the play time; the method also includes:
  • the first party's average move time is used to characterize the first party's move speed after the second party's move;
  • the third move strategy includes multiple A third position to be selected; the third position to be selected is related to the chess power value of the first party in the historical round;
  • a fourth move strategy corresponding to the second party For each of the third candidate positions, based on the third candidate position and the historical record, a fourth move strategy corresponding to the second party is generated; the fourth move strategy includes a plurality of fourth moves The candidate position and the second-party winning rate corresponding to each of the fourth candidate positions;
  • the second move strategy is obtained from the fourth move strategy corresponding to each of the third candidate positions based on the current move position corresponding to the move event.
  • the average move time of the first party is determined, and when the average move time satisfies the preset condition, after the second party completes the move in the last round, use the first
  • the thinking time of one party not only predicts the third move strategy of the first party in the current round, but also generates multiple fourth move strategies of the second party based on the third move strategy.
  • the second move strategy corresponding to the first party's current move position can be directly determined from a plurality of fourth move strategies, which improves the second party's current round for the second move strategy.
  • the response speed of one party's move event in the current round improves the experience of real users.
  • the obtaining the average duration of the first party's moves based on the historical record of moves includes:
  • At least one first time interval is determined; the first time interval is the betting time of the second party The time interval between the betting time of the first party and the betting time of the adjacent first party's betting;
  • An average move duration for the first party is generated based on the at least one first time interval.
  • the method also includes:
  • Prompt information is generated based on the chess power quantization value of the first party in the historical round and the chess power quantization value of the first party in the current round; the prompt information is used to represent the first party in different rounds Changes in chess strength.
  • the prompt information for representing the change of the first party's chess power in different rounds is generated.
  • the real user can receive real-time feedback corresponding to the current move event.
  • the user can perceive the move corresponding to the current round is relatively better through the first prompt information;
  • the quantitative value is reduced, the user can perceive that the move corresponding to the current round is relatively poor through the second prompt information; thus, it can not only improve the timeliness of feedback to the user in the man-machine game method, but also enable the user to perceive
  • the real-time effect of each step improves the learning efficiency of real users.
  • a man-machine game device including:
  • the recording part is configured to record the position of the first party and the second party during the game, and obtain the historical record of the position;
  • the generating part is configured to generate a second move strategy corresponding to the second party based on the current move position corresponding to the move event and the historical move record in response to the move event of the first party in the current round;
  • the second placement strategy includes a plurality of second candidate positions and a second winning rate corresponding to each of the second candidate positions;
  • the determination part is configured to determine the chess power quantization value of the first party in the current round based on the historical move record and the current move position; the chess power quantization value is used to characterize the chess power of the first party Level;
  • the move part is configured to determine a target move position among the plurality of second candidate positions; the winning ratio of the second party corresponding to the target move position matches the chess power quantization value.
  • a human-computer game device including: a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above method when executing the computer program A step of.
  • a computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the above method.
  • a computer program product including computer readable codes, and when the computer readable codes are run in an electronic device, a processor in the electronic device executes the steps for implementing the above method.
  • the chess power value of the first party in the current round is obtained, and based on the chess power of the first party in the current round Quantified value, select the second candidate position whose winning rate of the second party matches the chess strength value as the target position of the second party, which can realize the dynamic Adjusting the virtual user's move strategy to dynamically match the virtual user's chess skill level with the real user's chess skill level can make the real user feel the feeling of "meeting the opponent" during the game, and enhance the user's interest in the game.
  • FIG. 1 is a schematic flow diagram of a man-machine game method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flow diagram of a man-machine game method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a man-machine game method provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a man-machine game method provided by an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a method for man-machine game provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic flow diagram of a human-computer game method provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic flow diagram of a human-computer game method provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of the composition and structure of a human-machine game device provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a hardware entity of a human-computer game device provided by an embodiment of the present disclosure.
  • Fig. 1 is a schematic flowchart of a method for man-machine game provided by an embodiment of the present disclosure. As shown in Fig. 1, the method includes:
  • the man-machine game method provided by the embodiments of the present disclosure can be used for various chess games, which can include at least one of Go, Chinese Chess, International Chess, Military Flag, Backgammon, Checkers, and Flying Chess. A sort of.
  • the first party is a real user party
  • the second party is a machine party, that is, a virtual user party.
  • at least one first party and at least one second party are included, and the numbers of the first party and the second party can be changed based on different types of chess.
  • first party and one second party can be included in a game, that is, one real user party and one virtual user party are allowed to participate in the game;
  • chess games such as military flag, checkers and flying chess
  • only one first party and one second party can be included, or one first party and a plurality of second parties can be included, and a plurality of second parties can also be included.
  • the first party and multiple second parties may also include multiple first parties and one second party. The embodiment of the present disclosure does not limit this.
  • the historical move records may include all move information of the first party and the second party.
  • Each bet information may include at least one of the following: bet user, bet time, bet location, etc.
  • the move information also includes the move type.
  • the corresponding move information can only include the player who made the move and the time of the move, and information such as the position of the move can be set is null. in. Go allows one party to choose not to make a move, and let the other party continue to make a move. This is "passing a hand (pass)".
  • the above-mentioned current round is a round that includes the first party making moves, and then the second party making moves.
  • a move event of the first party in the current round is generated, and at the same time, the move event can carry move information.
  • the second party needs to make a move.
  • at least the current position of the move should be considered to improve the first move.
  • the pertinence of the two parties' moves in the current round at the same time, in addition to considering the current position of the move, it is also necessary to consider the historical record of moves to improve the pertinence of the second party's moves in the overall game process.
  • the second party in the process of generating the second party's corresponding move strategy based on the current move position and historical move records corresponding to the move event, can be generated based on all move information in the historical move records and the current move position.
  • the move strategy corresponding to the first party; the move strategy corresponding to the second party can also be generated based on part of the move information in the historical move record and the current move position.
  • the second move strategy corresponding to the second party may include a plurality of second candidate positions and a winning rate of the second party corresponding to each of the second candidate positions.
  • the plurality of second candidate positions generated may include the position information of all available positions of the second party in the current round. For example, for a game of Go, all empty positions on the chessboard may be the positions of the second party. Therefore, the plurality of second candidate positions may be all the above-mentioned empty betting points; the generated plurality of second candidate positions may include the betting points whose winning rate of the second party exceeds the minimum winning rate threshold.
  • the chess power quantization value of the first party in the current round is determined based on the current position, the chess power quantization value can be used to represent the corresponding chess power of the first party in the current round Level. That is to say, in different rounds, step S103 can determine the chess power level of the first party in different rounds based on different historical records of moves and different current positions of moves.
  • the chess power level of the opposing player can be determined through the preset chess power evaluation model.
  • a plurality of move information arranged in time sequence can be input into the The chess strength evaluation model obtains the chess strength level of each player in the latest round in the multiple move information.
  • the obtained multiple move information includes A1, B1, A2, B2, . . . , AN, BN, AN+1.
  • the chess power value of the A side in the N+1 round and the chess power value of the B side in the N round can be obtained.
  • the second candidate position directly according to the first party's chess power value in the current round.
  • the second candidate position that has a mapping relationship between the winning percentage of the second party and the chess power value is used as the target position.
  • the betting event of the second party in the current round may be completed based on the target betting position.
  • the current round of the man-machine game process ends, and the next round of man-machine game process starts.
  • the historical record of the next round includes the positions of the first party and the second party in the current round.
  • the chess power value of the first party in the current round is obtained, and based on the chess power of the first party in the current round Quantified value, select the second candidate position whose winning rate of the second party matches the chess strength value as the target position of the second party, which can realize the dynamic Adjusting the virtual user's move strategy to dynamically match the virtual user's chess skill level with the real user's chess skill level can make the real user feel the feeling of "meeting the opponent" during the game, and enhance the user's interest in the game.
  • Fig. 2 is an optional flowchart of the human-computer game method provided by the embodiment of the present disclosure. Based on Fig. 1, S103 in Fig. 1 can be updated to S201 to S202, and S104 can be updated to step S203, combining The steps shown in Figure 2 are described.
  • step S2031 can be used to realize the above-mentioned determination of the target drop position among the plurality of second candidate positions:
  • the first mapping table is used to obtain the target ranking position corresponding to the first party's chess score; the first mapping table includes the mapping relationship between the chess score and the ranking position; determine the second candidate position corresponding to the target ranking position For the target drop position.
  • the first mapping table may include a plurality of chess skill scoring intervals and a sorting position corresponding to each chess skill scoring interval.
  • the first mapping table may include chess power scoring interval F1: [0, 20), chess power scoring interval F2: [20, 40), chess power scoring interval F3: [40, 60), chess power scoring interval F4: [60, 80), chess power score interval F5: [80, 100].
  • the sorting position corresponding to the chess power scoring interval F1 is the 5th
  • the sorting position corresponding to the chess power scoring interval F2 is the 4th
  • the sorting position corresponding to the chess power scoring interval F3 is the 3rd
  • the sorting position corresponding to the chess power scoring interval F4 is The ranking position corresponding to the second place and the chess power score interval F5 is the first place.
  • the obtained second placement strategy includes: the second party’s winning rate corresponding to the second candidate position A1 is 50%, the second party’s winning rate corresponding to the second candidate position A2 is 80%, and the second candidate position A3 corresponds to The winning rate of the second party in the second position A4 is 70%, the winning rate of the second party corresponding to the second candidate position A4 is 60%, the winning rate of the second party corresponding to the second candidate position A5 is 90%, and the winning rate of the second party corresponding to the second candidate position A6 is 90%.
  • the winning rate of the two sides is 95%, and there are 6 second candidate positions in total.
  • the corresponding sort position is 6
  • the second candidate position A2 corresponds to The sorting position corresponding to the second candidate position A3 is 3, the sorting position corresponding to the second candidate position A3 is 4, the corresponding sorting position of the second candidate position A4 is 5, the corresponding sorting position of the second candidate position A5 is 2, and the second candidate position A5
  • the sorting position corresponding to A6 is 1.
  • the corresponding target sorting position is the second, that is, the second candidate position A5 whose sorting position is 2 is taken as the target drop position.
  • step S2032 can be used to realize the above-mentioned determination of the target drop position among the plurality of second candidate positions:
  • the preset second mapping table obtain the target winning percentage interval corresponding to the chess power score of the first party; based on the target winning percentage interval, determine the second candidate position located in the target winning percentage interval as the selected position Describe the target drop position.
  • the second mapping table may include a plurality of chess power scoring intervals and a winning percentage interval corresponding to each chess power scoring interval.
  • the first mapping table may include the chess power score interval F1: [0, 20) corresponding to the winning percentage interval is also [0, 20), chess power scoring interval F2: [20, 40) corresponding winning percentage interval is also [20, 40) , Chess power scoring interval F3: [40, 60) corresponds to the winning percentage interval is also [40, 60), chess power scoring interval F4: [60, 80) corresponding winning percentage interval is also [40, 60), chess power scoring interval F5: [80 , 100] corresponds to the winning rate interval is also [40, 60).
  • the obtained second placement strategy includes: the second party’s winning rate corresponding to the second candidate position A1 is 50%, the second party’s winning rate corresponding to the second candidate position A2 is 80%, and the second candidate position A3 corresponds to The winning rate of the second party corresponding to the second candidate position A4 is 70%, the winning rate of the second party corresponding to the second candidate position A4 is 60%, the winning rate of the second party corresponding to the second candidate position A5 is 90%, and the winning rate of the second party corresponding to the second candidate position A6 is 90%.
  • the winning rate of the two sides is 95%, and there are 6 second candidate positions in total.
  • the chess score of the first party is 65, it can be determined that the corresponding target winning percentage interval is also [40, 60), and then the second candidate position A1 is used as the target position. .
  • the real-time chess score of the first party in the current round is determined, and based on the real-time chess score in the second move strategy, it is obtained that the first chess player is in the same position as the first chess player.
  • There is a target position where there is a mapping relationship between the real-time winning rate of the player, and the effect of "meeting opponents" can be achieved between the first player and the second player in the current game process.
  • FIG. 3 is an optional flowchart of the human-computer game method provided by the embodiment of the present disclosure. Based on FIG. 1, the method in FIG. 1 also includes S301, S103 can be updated to S302, and S104 can be updated to S303. It will be described in conjunction with the steps shown in FIG. 3 .
  • the first move strategy includes a plurality of first candidate positions and a first position corresponding to each first candidate position Party win rate.
  • the first party's move in the current round may be based on the historical move record. Predict the position of the round. That is, in response to the move event of the second party in the last round, based on the historical move record, predict the first move strategy corresponding to the first party.
  • the method for generating the first move strategy corresponding to the first party may be the same as in S102, based on the current move position and the historical move record, generating the second move corresponding to the second party.
  • the approach to the strategy is the same or different.
  • the winning percentage of the first party corresponding to each candidate position corresponding to the first party can be obtained.
  • the user's current betting position in the current round has been obtained. Search for a corresponding target candidate position in each candidate position obtained in S301 based on the current move position, and use the winning rate of the first party corresponding to the target candidate position as the chess strength value.
  • all positions to be selected and the corresponding winning percentages of the first party have not yet been output.
  • a candidate position, and the winning rate of the first party corresponding to each candidate position based on the current position of the current round of the drop event, search for a matching target candidate position among the obtained at least one candidate position, if a match can be found the target candidate position, stop the prediction process of S301, and use the winning rate of the first party corresponding to the obtained target candidate position as the above-mentioned chess power quantization value; if no matching target candidate position is found, then continue to execute the prediction process of S301, Until the target candidate position matching the current drop position is obtained.
  • the second party's winning rate corresponding to each candidate position after obtaining multiple candidate positions corresponding to the second party, and the second party's winning rate corresponding to each candidate position, it can be based on the above-mentioned chess quantization value, that is, the first party's winning rate corresponding to the current position. , determining the target drop position in which the winning rate of the second party and the winning rate of the first party have a mapping relationship among the plurality of second candidate positions.
  • At least one of the following implementation methods can be used to realize the above-mentioned target position where the second party's winning rate and the first party's winning rate have a mapping relationship in the plurality of second candidate positions:
  • the preset mapping function relationship can be determined by the basic first-party winning rate and offset parameters, wherein the basic first-party winning rate can be set by the user, and the default value is 50%. In the case of the value, it indicates that the difficulty of the first party is higher for the user, and when the basic first party win rate is less than the default value, it indicates that the difficulty of the first party is lower for the user; the offset parameter is used for the second party
  • the difference between one party's winning rate and the basic first party's winning rate is scaled to determine the converted first party's winning rate, where the mapping function relationship can be expressed as the following formula:
  • P after conversion represents the converted first-party winning percentage
  • P before conversion represents the first-party winning percentage corresponding to the current betting position
  • P basis represents the basic first-party winning percentage
  • k is an offset parameter.
  • the first party's move strategy in the current round is predicted after the second party's move, it is obtained that the first party's corresponding positions include a plurality of first candidate positions and each of the first candidate positions The first move strategy of the first party's winning rate corresponding to the position. Furthermore, in the current round, the chess strength value of the first party can be quickly determined after the first party makes a move, thereby increasing the speed of the second party's move in the current round. At the same time, because the first party's real-time winning rate in the current round is determined based on the current position of the first party in the current round, and based on the real-time winning rate, the real-time winning rate of the first party is obtained in the second move strategy. The target position can realize the effect of "meeting opponents" between the first party and the second party in the current game process.
  • Fig. 4 is an optional flowchart of the human-computer game method provided by the embodiment of the present disclosure. Based on any of the above embodiments, taking Fig. 1 as an example, S102 in Fig. 1 can be updated to S401 to S404 , which will be described in conjunction with the steps shown in FIG. 4 .
  • steps S4011 to S4012 can be used to obtain the average duration of the first party's moves based on the historical record of moves:
  • S4011 Determine at least one first time interval based on at least one move time of the first party and at least one move time of the second party in the historical move records; the first time interval is the second The time interval between the move time of the square's move and the move time of the adjacent first party's move.
  • the average move duration of the first party satisfies a preset condition, based on the historical move records, predict the third move strategy of the first party in the current round; the third move strategy A plurality of third candidate positions are included; the third candidate positions are related to chess power values of the first party in historical rounds.
  • the second party's average move time is used to characterize the second party's move speed after the first party's move; In the case where the average move time of the first party is greater than or equal to the average move time of the second party, it is determined that the average move time of the first party satisfies the preset condition; If the average move time is less than the average move time of the second party, it is determined that the average move time of the first party does not satisfy the preset condition.
  • the position of the first party in the current round before receiving the current position of the first party in the current round, the position of the first party in the current round can be predicted based on the historical record, and the position of the first party in the current round can be obtained.
  • the third play strategy of the round includes a plurality of third candidate positions and the winning rate of the first party corresponding to each of the third candidate positions, based on the chess strength of each historical round of the first party in the historical move records
  • Quantitative values may determine at least one third candidate position relative to the historical level of the first party. It should be noted that, in the third move strategy, all third candidate positions that can be placed may be included, or only a part of the third candidate positions related to the historical level of the first party may be included.
  • the fourth move strategy includes a plurality of The fourth candidate position and the winning rate of the second party corresponding to each fourth candidate position.
  • the corresponding value of the second party corresponding to each third candidate position is obtained.
  • Fourth betting strategy includes a plurality of fourth candidate positions and the winning ratio of the second party corresponding to each of the fourth candidate positions.
  • the average move time of the first party is determined, and when the average move time satisfies the preset condition, after the second party completes the move in the last round, use the first
  • the thinking time of one party not only predicts the third move strategy of the first party in the current round, but also generates multiple fourth move strategies of the second party based on the third move strategy.
  • the second move strategy corresponding to the first party's current move position can be directly determined from a plurality of fourth move strategies, which improves the second party's current round for the second move strategy.
  • the response speed of one party's move event in the current round improves the experience of real users.
  • FIG. 5 is an optional flowchart of the human-computer game method provided by the embodiment of the present disclosure. Based on any of the above-mentioned embodiments, taking FIG. 1 as an example, the method in FIG. 1 may also include S501 to S502 , which will be described in conjunction with the steps shown in FIG. 5 .
  • the historical round may only include the previous round, and the previous round is a historical round adjacent to the current round.
  • the chess power value of the first party in the previous round is first obtained, combined with The previously obtained chess power value of the first party in the current round can generate corresponding prompt information, and the prompt information is used to represent the change of the chess power of the first party in the current round relative to the previous round.
  • first prompt information may be generated, and the first prompt information may be used to indicate that the chess strength of the first party has improved.
  • the first prompt information may be prompt information such as "good chess", “good chess”, or "really good”, which represents the improvement of the real user's chess ability.
  • second prompt information may be generated, and the second prompt information may be used to indicate that the chess power of the first party has decreased.
  • the first prompt information may be prompt information such as "bad chess", “mistake” or "why play here", which represents the decline of the real user's chess ability.
  • the historical round may only include a plurality of historical rounds before the current round.
  • S501 first obtain the first party's chess power value in each historical round, and combine the previously obtained first party's chess value in the current round.
  • the chess power value of the round generates corresponding prompt information according to the number of rounds, and the prompt information is used to represent the change curve corresponding to the change of the chess power value of the first party with the number of rounds.
  • the prompt information for representing the change of the first party's chess power in different rounds is generated.
  • the real user can receive real-time feedback corresponding to the current move event.
  • the user can perceive the move corresponding to the current round is relatively better through the first prompt information;
  • the quantitative value is reduced, the user can perceive that the move corresponding to the current round is relatively poor through the second prompt information; thus, it can not only improve the timeliness of feedback to the user in the man-machine game method, but also enable the user to perceive
  • the real-time effect of each step improves the learning efficiency of real users.
  • AI chess power models of different levels are usually preset, and users can manually set them before each game according to their own judgment and selection. This method depends on the user himself. Subjective judgment ability, usually due to their own ability is difficult to judge, leading to wrong choices. Therefore, in the process of playing the game, either the setting is too simple, and the user has no sense of accomplishment in the game; or the setting is too difficult, which makes the user lose confidence; The solution usually requires the user to spend a long time playing multiple games in order to obtain a model that is more in line with the user's chess ability. It is difficult for users to experience the feeling of meeting opponents quickly, thereby affecting users' interest in playing games.
  • the embodiment of the present disclosure provides two human-computer game methods in the implementation process, for which reference may be made to the schematic flowcharts provided in FIG. 6 and FIG. 7 .
  • FIG. 6 is a schematic flow chart of an optional human-computer game method provided by an embodiment of the present disclosure, which will be described in conjunction with the steps shown in FIG. 6 .
  • the historical move record includes all move positions of the user and all move positions of the AI in the process of the human-computer game.
  • the chess power quantization value is used to represent the user's chess power level.
  • the multiple different betting positions to be selected are sorted in descending order of winning percentage.
  • a plurality of preset threshold conditions are obtained, and each threshold condition has a mapping relationship with the ranking of the winning rate. For example, there are three threshold conditions, wherein the first threshold condition has a mapping relationship with the first winning rate, the second threshold condition has a mapping relationship with the second winning rate, and the third threshold condition has a mapping relationship with the third winning rate.
  • determine the target threshold condition that the user's chess power quantization value satisfies among the plurality of threshold conditions and determine the candidate move position corresponding to the target winning rate that has a mapping relationship with the target threshold condition as the target move position.
  • steps S601 to S602 it is possible to dynamically identify the user's chess playing level during the game, and dynamically switch the AI chess playing strategy engine to a level that matches the user's chess playing level; and, by The above step S603 further refines the strategy in the chess-playing process, dynamically adjusts the winning strategy of the AI chess-playing engine during the game, and can switch the AI chess-playing strategy model to a level that matches the user's chess strength, further matching the user's game The playing situation in the process, so as to better match the user's chess playing level.
  • the AI strategy model is used to simulate the user's move, to judge the winning rate of the user's different move positions, and according to the user's actual move position, the AI side is selected to move at the position corresponding to the winning rate, so as to achieve During the game, the winning rate of the two sides is relatively consistent, so as to achieve the self-adaptation of AI to the user's chess power.
  • FIG. 7 is a schematic flow chart of an optional human-computer game method provided by an embodiment of the present disclosure, which will be described in conjunction with the steps shown in FIG. 7 .
  • the historical move record includes all move positions of the user and all move positions of the AI in the process of the human-computer game.
  • FIG. 8 is a schematic diagram of the composition and structure of a man-machine game device provided by an embodiment of the present disclosure. As shown in FIG. 8, the man-machine game device 800 includes:
  • the recording part 801 is configured to record the position of the first party and the second party during the game, and obtain the historical record of the position;
  • the generating part 802 is configured to generate a second move strategy corresponding to the second party based on the current move position corresponding to the move event and the historical move record in response to the move event of the first party in the current round ;
  • the second placement strategy includes a plurality of second candidate positions and the winning rate of the second party corresponding to each of the second candidate positions;
  • the determining part 803 is configured to determine the chess power quantization value of the first party in the current round based on the historical move record and the current move position; the chess power quantization value is used to represent the first party's Chess level;
  • the move part 804 is configured to determine a target move position in the plurality of second candidate positions; the winning rate of the second party corresponding to the target move position matches the chess power quantization value.
  • the determining part 803 is further configured to:
  • the drop part 804 is further configured as:
  • the preset first mapping table obtain the target ranking position corresponding to the chess score of the first party; the first mapping table includes the mapping relationship between the chess score and the ranking position;
  • the second candidate position corresponding to the target sorting position is determined as the target drop position.
  • the drop part 804 is further configured as:
  • a second candidate position located in the target winning percentage interval is determined as the target betting position.
  • the second party corresponding to the first move is generated.
  • the generating part 802 is also configured to: predict the first move strategy corresponding to the first party based on the historical move record; the first move strategy includes a plurality of first candidate positions The winning rate of the first party corresponding to each of the first candidate positions;
  • the determining part 803 is further configured to: determine the winning rate of the first party corresponding to the current position based on the winning rate of the first party corresponding to each of the first positions to be selected; One side's winning rate is determined as the chess power quantization value.
  • the drop part 804 is further configured as:
  • the target betting position is determined in the plurality of second candidate positions; there is a mapping relationship between the winning rate of the second party of the target betting position and the winning rate of the first party.
  • the generating part 802 is further configured to:
  • the first party's average move time is used to characterize the first party's move speed after the second party's move;
  • the third move strategy includes multiple A third position to be selected; the third position to be selected is related to the chess power value of the first party in the historical round;
  • a fourth move strategy corresponding to the second party For each of the third candidate positions, based on the third candidate position and the historical record, a fourth move strategy corresponding to the second party is generated; the fourth move strategy includes a plurality of fourth moves The candidate position and the second-party winning rate corresponding to each of the fourth candidate positions;
  • the second move strategy is obtained from the fourth move strategy corresponding to each of the third candidate positions based on the current move position corresponding to the move event.
  • the generating part 802 is further configured to:
  • At least one first time interval is determined; the first time interval is the betting time of the second party The time interval between the betting time of the first party and the betting time of the adjacent first party's betting;
  • An average move duration for the first party is generated based on the at least one first time interval.
  • the generating part 802 is further configured to:
  • Prompt information is generated based on the chess power quantization value of the first party in the historical round and the chess power quantization value of the first party in the current round; the prompt information is used to represent the first party in different rounds Changes in chess strength.
  • the above-mentioned man-machine game method is implemented in the form of software functions and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • the essence of the technical solutions of the embodiments of the present disclosure or the part that contributes to the related technologies can be embodied in the form of software products, the computer software products are stored in a storage medium, and include several instructions to make A piece of equipment executes all or part of the methods of the various embodiments of the present disclosure.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • embodiments of the present disclosure are not limited to any targeted combination of hardware and software.
  • FIG. 9 is a schematic diagram of a hardware entity of a human-computer game device provided by an embodiment of the present disclosure. As shown in FIG. A computer program that can run on the processor 901. When the processor 901 executes the program, the steps in the method of any of the foregoing embodiments are implemented.
  • the device 900 for collecting game coins on the game table may be the detection device described in any of the above-mentioned embodiments.
  • the memory 902 stores computer programs that can run on the processor, the memory 902 is configured to store instructions and applications executable by the processor 901, and can also cache the processor 901 and various parts of the man-machine game device 900 to be processed or have been processed.
  • the processed data for example, image data, audio data, voice communication data and video communication data
  • FLASH flash memory
  • RAM random access memory
  • the processor 901 executes the program, the steps of any one of the human-computer game methods mentioned above are realized.
  • the processor 901 generally controls the overall operation of the man-machine game device 900 .
  • An embodiment of the present disclosure provides a computer storage medium, where one or more programs are stored on the computer storage medium, and the one or more programs can be executed by one or more processors to implement the man-machine game method in any of the above embodiments A step of.
  • the embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the man-machine game method described in the above method embodiment, please refer to the above method Example.
  • the above-mentioned computer program product may be realized by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
  • the above-mentioned processor can be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic At least one of Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), Central Processing Unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor. It can be understood that the electronic device implementing the above processor function may also be other, which is not limited in this embodiment of the present disclosure.
  • the above-mentioned computer storage medium/memory can be read-only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Magnetic Random Access Memory (Ferromagnetic Random Access Memory, FRAM), Flash Memory (Flash Memory), Magnetic Surface Memory, CD-ROM, or CD-ROM (Compact Disc Read-Only Memory, CD-ROM) and other memories; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc. .
  • references throughout the specification to "one embodiment” or “an embodiment” or “embodiments of the present disclosure” or “previous embodiments” or “some embodiments” mean the target features related to the embodiments, A structure or characteristic is included in at least one embodiment of the present disclosure.
  • appearances of "in one embodiment” or “in an embodiment” or “embodiments of the disclosure” or “the foregoing embodiments” or “some embodiments” throughout the specification are not necessarily referring to the same embodiments .
  • the features, structures or characteristics of these objects may be combined in any suitable manner in one or more embodiments.
  • sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, rather than by the embodiments of the present disclosure.
  • the implementation process constitutes any limitation.
  • the serial numbers of the above-mentioned embodiments of the present disclosure are for description only, and do not represent the advantages and disadvantages of the embodiments.
  • the detection device executes any step in the embodiments of the present disclosure, and may be a processor of the detection device executes the step. Unless otherwise specified, the embodiments of the present disclosure do not limit the order in which the detection device performs the following steps. In addition, the methods for processing data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiments of the present disclosure can be executed independently by the detection device, that is, when the detection device executes any step in the above embodiments, it may not depend on the execution of other steps.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the mutual coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integration
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the above-mentioned integrated units of the present disclosure are implemented in the form of software function parts and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium, and include several instructions to make
  • a computer device which may be a personal computer, a detection device, or a network device, etc.
  • the aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.
  • the embodiment of the present disclosure discloses a method, device, device, and storage medium for man-machine game play, wherein the method includes: recording the move positions of the first party and the second party during the game play process, and obtaining historical move record; responding to The first party's move event in the current round generates the second move strategy corresponding to the second party based on the current move position corresponding to the move event and the historical move record; the second move strategy includes multiple A second candidate position and the second party's winning rate corresponding to each second candidate position; based on the historical record and the current position, determine the chess strength of the first party in the current round value; the chess power quantization value is used to characterize the chess power level of the first party; in the plurality of second positions to be selected, the target placement position is determined; the second party winning rate corresponding to the target placement position is related to the chess power Quantized values match.
  • the virtual user's move strategy can be dynamically adjusted, so that the virtual user's chess skill level can be dynamically matched with the real user's chess skill level, so that the real user can play the game

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本公开实施例公开了一种人机对弈方法、装置、设备及存储介质,其中,该方法包括:在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。

Description

一种人机对弈方法、装置、设备、存储介质及程序产品
相关申请的交叉引用
本公开基于申请号为202110713569.2、申请日为2021年06月25日、申请名称为“一种人机对弈方法、装置、设备及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开实施例涉及数据处理领域,涉及一种人机对弈方法、装置、设备、存储介质及程序产品。
背景技术
随着人工智能(Artificial Intelligence,AI)的发展,人机对弈的使用越来越广泛。但是,在目前的人机对弈相关产品中,通常是预设一些不同等级的AI棋力模型,由用户根据自己的人为判断和选择,在每局开始前手动进行设置,这种方式依赖于用户自身的主观判断能力,通常会由于自身能力难以判断等原因导致等级选择错误,在对弈过程中难以较快让用户体会到棋逢对手的感觉,从而影响用户的对弈兴趣。
发明内容
本公开实施例提供一种人机对弈方法、装置、设备、存储介质及程序产品。
第一方面,提供一种人机对弈方法,包括:
在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;
响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;
基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;
在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
在一些实施例中,所述基于所述历史落子记录和所述当前落子位置,确定所述第一方的棋力量化值,包括:
将所述历史落子记录和所述当前落子位置输入至预设的棋力评测模型,得到所述第一方的棋力评分;所述棋力评分用于表征所述第一方在对弈开始至所述当前回合的整体棋力水平;
基于所述第一方的棋力评分,确定所述第一方的棋力量化值。
在一些实施例中,所述在所述多个第二待选位置中确定目标落子位置,包括:
基于每一所述第二待选位置对应的第二方胜率,对所述多个第二待选位置进行排序,确定每一所述第二待选位置的排序位置;
根据预设的第一映射表,获取所述第一方的棋力评分对应的目标排序位置;所述第一映射表包括棋力评分与排序位置的映射关系;
将所述目标排序位置对应的第二待选位置确定为所述目标落子位置。
在一些实施例中,所述在所述多个第二待选位置中确定目标落子位置,包括:
根据预设的第二映射表,获取所述第一方的棋力评分对应的目标胜率区间;
基于所述目标胜率区间,将位于所述目标胜率区间中的第二待选位置确定为所述目标落子位置。
在本公开实施例中,由于基于第一方在当前回合的当前落子位置,确定第一方在当前 回合中的实时棋力评分,并基于该实时棋力评分在第二落子策略中得到与该第一方实时胜率存在映射关系的目标落子位置,可以在当前对弈过程的第一方与第二方之间实现“棋逢对手”的效果。
在一些实施例中,在所述响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的第一当前落子和所述历史落子记录,生成所述第二方对应的第二落子策略之前,所述方法还包括:基于所述历史落子记录,预测所述第一方对应的第一落子策略;所述第一落子策略包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率;
所述基于所述历史落子记录和所述当前落子位置,确定所述第一方的棋力量化值,包括:基于每一所述第一待选位置对应的第一方胜率,确定所述当前落子位置对应的第一方胜率;将所述当前落子位置对应的第一方胜率确定为所述棋力量化值。
在一些实施例中,所述在所述多个第二待选位置中确定目标落子位置,包括:
基于所述当前落子位置对应的第一方胜率,在所述多个第二待选位置中确定目标落子位置;所述目标落子位置的第二方胜率与所述第一方胜率存在映射关系。
在本公开实施例中,由于在第二方落子之后对第一方在当前回合的落子策略进行预测,得到第一方对应的包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率的第一落子策略。进而可以在当前回合中,第一方落子之后可以快速确定第一方的棋力量化值,进而提升了第二方在当前回合中的落子速度。同时,由于基于第一方在当前回合的当前落子位置,确定第一方在当前回合中的实时胜率,并基于该实时胜率在第二落子策略中得到与该第一方实时胜率存在映射关系的目标落子位置,可以在当前对弈过程的第一方与第二方之间实现“棋逢对手”的效果。
在一些实施例中,所述历史落子记录包括落子时间;所述方法还包括:
基于所述历史落子记录,获取所述第一方的平均落子时长;所述第一方的平均落子时长用于表征所述第一方在所述第二方落子后的落子速度;
在所述第一方的平均落子时长满足预设条件的情况下,基于所述历史落子记录,预测所述第一方在所述当前回合的第三落子策略;所述第三落子策略包括多个第三待选位置;所述第三待选位置与所述第一方在历史回合的棋力量化值相关;
针对每一所述第三待选位置,基于所述第三待选位置和所述历史落子记录,生成所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率;
响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置在每一所述第三待选位置对应的第四落子策略中获取所述第二落子策略。
通过上述公开实施例,由于基于历史落子记录,确定了第一方的平均落子时长,并在该平均落子时长满足预设条件的情况下,在第二方在上一回合完成落子之后,利用第一方思考的时间,不仅预测了第一方在当前回合的第三落子策略,还基于该第三落子策略生成多个第二方的多个第四落子策略。由此,在第一方完成当前回合的落子事件时,可以直接从多个第四落子策略中确定第一方的当前落子位置对应的第二落子策略,提升了第二方在当前回合针对第一方在当前回合的落子事件的响应速度,进而提升了真实用户的使用体验。
在一些实施例中,所述基于所述历史落子记录,获取所述第一方的平均落子时长,包括:
基于所述历史落子记录中所述第一方的至少一个落子时间和所述第二方的至少一个落子时间,确定至少一个第一时间间隔;所述第一时间间隔为所述第二方落子的落子时间,与相邻的所述第一方落子的落子时间之间的时间间隔;
基于所述至少一个第一时间间隔,生成所述第一方的平均落子时长。
在一些实施例中,所述方法还包括:
获取所述第一方在历史回合的棋力量化值;
基于所述第一方在所述历史回合的棋力量化值和所述第一方在所述当前回合的棋力量化值,生成提示信息;所述提示信息用于表征所述第一方在不同回合的棋力变化情况。
通过上述公开实施例,由于通过比对第一方在历史回合和当前回合中的棋力量化值,生成用于表征所述第一方在不同回合的棋力变化情况的提示信息。可以使真实用户在每一次落子之后,接收到当前落子事件对应的实时反馈,在棋力量化值增加的情况下,用户可以通过第一提示信息感知当前回合对应的落子是相对较优的;在棋力量化值降低的情况下,用户可以通过第二提示信息感知当前回合对应的落子是相对较差的;由此,不仅可以提升人机对弈方法中对于用户的反馈及时性,还可以使得用户可以感知每一步落子的实时效果,提升了真实用户的学习效率。
第二方面,提供一种人机对弈装置,包括:
记录部分,被配置为在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;
生成部分,被配置为响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;
确定部分,被配置为基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;
落子部分,被配置为在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
第三方面,提供一种人机对弈设备,包括:存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法中的步骤。
第四方面,提供一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中的步骤。
第五方面,提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法中的步骤。
在本公开实施例中,由于在人机对弈的过程中基于第一方在当前回合的当前落子位置,得到了第一方在当前回合的棋力量化值,并基于第一方在当前回合的棋力量化值,选择第二方胜率与该棋力量化值匹配的第二待选位置作为第二方的目标落子位置,可以实现在整个人机对弈过程中,基于不同回合中真实用户的发挥情况,动态调整虚拟用户的落子策略,让虚拟用户的棋力水平与真实用户的棋力水平进行动态匹配,可以使得真实用户在对弈过程中感受到“棋逢对手”的感觉,提升了用户对弈兴趣。
附图说明
图1为本公开实施例提供的一种人机对弈方法的流程示意图;
图2为本公开实施例提供的一种人机对弈方法的流程示意图;
图3为本公开实施例提供的一种人机对弈方法的流程示意图;
图4为本公开实施例提供的一种人机对弈方法的流程示意图;
图5为本公开实施例提供的一种人机对弈方法的流程示意图;
图6为本公开实施例提供的一种人机对弈方法的流程示意图;
图7为本公开实施例提供的一种人机对弈方法的流程示意图;
图8为本公开实施例提供的一种人机对弈装置的组成结构示意图;
图9为本公开实施例提供的一种人机对弈设备的硬件实体示意图。
具体实施方式
下面将通过实施例并结合附图地对本公开的技术方案进行详细说明。下面的实施例可 以相互结合。
需要说明的是:在本公开实例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述目标的顺序或先后次序。另外,本公开实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。
图1为本公开实施例提供的一种人机对弈方法的流程示意图,如图1所示,该方法包括:
S101、在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录。
在一些实施例中,本公开实施例提供的人机对弈方法可以用于各种棋类对局,该棋类可以包括围棋、中国象棋、国际象棋、军旗、五子棋、跳棋、飞行棋中的至少一种。
在一些实施例中,该第一方为真实用户方,该第二方为机器方,即虚拟用户方。在一局对弈过程中,包括至少一个第一方和至少一个第二方,第一方和第二方的数量可以基于棋类的不同而改变。例如,针对围棋、中国象棋、国际象棋、和五子棋等棋类,在一局对弈过程中仅可以包括一个第一方和一个第二方,即允许一个真实用户方和一个虚拟用户方参与对弈;而针对军旗、跳棋和飞行棋等棋类,在一局对弈过程中可以仅包括一个第一方和一个第二方,也可以包括一个第一方和多个第二方,还可以包括多个第一方和多个第二方,还可以包括多个第一方和一个第二方。本公开实施例对此不作限定。
在一些实施例中,历史落子记录可以包括该第一方和第二方之前的所有落子信息。每一落子信息可以包括以下至少之一:落子用户、落子时间、落子位置等。在棋类包括不同类别的棋子的情况下,即中国象棋、国际象棋和军旗中的一种时,该落子信息还包括落子类型。
需要说明的是,在所述人机对弈方法应用于围棋的情况下,由于存在“过一手”即“停一手”,对应的落子信息可以仅包括落子用户和落子时间,落子位置等信息可以设置为空值。其中。围棋允许一方选择不落子,让另一方继续落子,这就是“过一手(pass)”。
S102、响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率。
在一些实施例中,上述当前回合是包括第一方的进行落子,然后第二方进行落子的回合。在当前回合中,通过接收第一方的落子动作,生成第一方在当前回合的落子事件,同时,该落子事件可以携带落子信息。之后,按照对弈规则,需要第二方进行落子,为了针对当前回合的第一方的落子事件,因此在生成第二方对应的第二落子策略的过程中,至少考虑当前落子位置,以提升第二方落子在当前回合中的针对性;同时,在考虑当前落子位置之外,还需要考虑历史落子记录,以提升第二方落子的在全局对弈过程中的针对性。
在一些实施例中,在基于所述落子事件对应的当前落子位置和历史落子记录生成第二方对应的落子策略的过程中,可以基于历史落子记录中的全部落子信息和当前落子位置生成第二方对应的落子策略;还可以基于历史落子记录中的部分落子信息和当前落子位置生成第二方对应的落子策略。
在一些实施例中,该第二方对应的第二落子策略可以包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率。其中,生成的多个第二待选位置可以包括第二方在当前回合中所有可以落子的位置信息,例如,针对围棋对弈而言,棋盘中所有空的落子点均可以为第二方的落子点,因此,多个第二待选位置可以是上述所有空的落子点;生成的多个第二待选位置可以包括第二方胜率超过最小胜率阈值的落子点。
S103、基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平。
在一些实施例中,由于所述第一方在所述当前回合的棋力量化值是基于所述当前落子位置确定的,因此,该棋力量化值可以用于表征第一方在当前回合对应的棋力水平。也就 是说,在不同的回合,步骤S103可以基于不同的历史落子记录和不同的当前落子位置确定第一方在不同回合的棋力水平。
其中,可以通过预设的棋力评测模型确定对弈方的棋力水平,在使用该棋力评测模型确定第一方的棋力水平的过程中,可以根据实际需要,将按照时序排列的多个落子信息输入至该棋力评测模型,得到多个落子信息中每一个对弈方在最新回合的棋力水平。例如,以围棋为例,得到的多个落子信息包括A1、B1、A2、B2、…、AN、BN、AN+1。在将该多个落子信息输入至该棋力评测模型之后,可以得到A方在第N+1个回合的棋力量化值,和B方在第N个回合的棋力量化值。
S104、在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
在一些实施例中,可以基于预设的第二方胜率与第一方的棋力量化值的映射关系,直接根据第一方在当前回合中的棋力量化值在每一第二待选位置中确定第二方胜率与该棋力量化值存在映射关系的第二待选位置,并将其作为目标落子位置。在确定该目标落子位置之后,可以基于该目标落子位置完成当前回合的第二方的落子事件。此时,当前回合的人机对弈过程结束,进入下一回合的人机对弈过程。在下一回合的人机对弈过程中,下一回合的历史落子记录包括了当前回合的第一方和第二方的落子位置。
在本公开实施例中,由于在人机对弈的过程中基于第一方在当前回合的当前落子位置,得到了第一方在当前回合的棋力量化值,并基于第一方在当前回合的棋力量化值,选择第二方胜率与该棋力量化值匹配的第二待选位置作为第二方的目标落子位置,可以实现在整个人机对弈过程中,基于不同回合中真实用户的发挥情况,动态调整虚拟用户的落子策略,让虚拟用户的棋力水平与真实用户的棋力水平进行动态匹配,可以使得真实用户在对弈过程中感受到“棋逢对手”的感觉,提升了用户对弈兴趣。
参见图2,图2是本公开实施例提供的人机对弈方法的一个可选的流程示意图,基于图1,图1中的S103可以更新为S201至S202,S104可以更新为步骤S203,将结合图2示出的步骤进行说明。
S201、将所述历史落子记录和所述当前落子位置输入至预设的棋力评测模型,得到所述第一方的棋力评分;所述棋力评分用于表征所述第一方在对弈开始至所述当前回合的整体棋力水平。
S202、基于所述第一方的棋力评分,确定所述第一方的棋力量化值。
S203、在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
在一些实施例中,可以通过步骤S2031实现上述在所述多个第二待选位置中确定目标落子位置:
S2031、基于每一所述第二待选位置对应的第二方胜率,对所述多个第二待选位置进行排序,确定每一所述第二待选位置的排序位置;根据预设的第一映射表,获取所述第一方的棋力评分对应的目标排序位置;所述第一映射表包括棋力评分与排序位置的映射关系;将所述目标排序位置对应的第二待选位置确定为所述目标落子位置。
在一些实施例中,该第一映射表可以包括多个棋力评分区间和每一棋力评分区间对应的排序位置。例如,该第一映射表可以包括棋力评分区间F1:[0,20)、棋力评分区间F2:[20,40)、棋力评分区间F3:[40,60)、棋力评分区间F4:[60,80)、棋力评分区间F5:[80,100]。其中,棋力评分区间F1对应的排序位置为第5位、棋力评分区间F2对应的排序位置为第4位、棋力评分区间F3对应的排序位置为第3位、棋力评分区间F4对应的排序位置为第2位、棋力评分区间F5对应的排序位置为第1位。
其中,若得到的第二落子策略包括:第二待选位置A1对应的第二方胜率为50%、第二待选位置A2对应的第二方胜率为80%、第二待选位置A3对应的第二方胜率为70%、 第二待选位置A4对应的第二方胜率为60%、第二待选位置A5对应的第二方胜率为90%、第二待选位置A6对应的第二方胜率为95%,共6个第二待选位置。则需要先基于每一第二待选位置对应的第二方胜率对6个第二待选位置进行排序,得到第二待选位置A1,对应的排序位置为6、第二待选位置A2对应的排序位置为3、第二待选位置A3对应的排序位置为4、第二待选位置A4对应的排序位置为5、第二待选位置A5对应的排序位置为2、第二待选位置A6对应的排序位置为1,基于上述对于第一映射表的举例,在第一方的棋力评分为65的情况下,可以确定对应的棋力评分区间为F4,进而基于该第一映射表可以得到对应的目标排序位置为第2位,即将排序位置为2的第二待选位置A5作为该目标落子位置。
在一些实施例中,可以通过步骤S2032实现上述在所述多个第二待选位置中确定目标落子位置:
S2032、根据预设的第二映射表,获取所述第一方的棋力评分对应的目标胜率区间;基于所述目标胜率区间,将位于所述目标胜率区间中的第二待选位置确定为所述目标落子位置。
在一些实施例中,该第二映射表可以包括多个棋力评分区间和每一棋力评分区间对应的胜率区间。例如,该第一映射表可以包括棋力评分区间F1:[0,20)对应的胜率区间也是[0,20)、棋力评分区间F2:[20,40)对应的胜率区间也是[20,40)、棋力评分区间F3:[40,60)对应的胜率区间也是[40,60)、棋力评分区间F4:[60,80)对应的胜率区间也是[40,60)、棋力评分区间F5:[80,100]对应的胜率区间也是[40,60)。
其中,若得到的第二落子策略包括:第二待选位置A1对应的第二方胜率为50%、第二待选位置A2对应的第二方胜率为80%、第二待选位置A3对应的第二方胜率为70%、第二待选位置A4对应的第二方胜率为60%、第二待选位置A5对应的第二方胜率为90%、第二待选位置A6对应的第二方胜率为95%,共6个第二待选位置。基于上述对于第二映射表的举例,在第一方的棋力评分为65的情况下,可以确定对应的目标胜率区间也是[40,60),进而将第二待选位置A1作为该目标落子位置。
在本公开实施例中,由于基于第一方在当前回合的当前落子位置,确定第一方在当前回合中的实时棋力评分,并基于该实时棋力评分在第二落子策略中得到与该第一方实时胜率存在映射关系的目标落子位置,可以在当前对弈过程的第一方与第二方之间实现“棋逢对手”的效果。
参见图3,图3是本公开实施例提供的人机对弈方法的一个可选的流程示意图,基于图1,图1中的方法还包括S301,S103可以更新为S302,S104可以更新为S303,将结合图3示出的步骤进行说明。
S301、基于所述历史落子记录,预测所述第一方对应的第一落子策略;所述第一落子策略包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率。
在一些实施例中,在所述第一方在当前回合的落子事件之前,即在上一回合中所述第二方的落子事件之后,可以基于该历史落子记录对第一方在所述当前回合的落子位置进行预测。即响应于所述第二方在上一回合的落子事件,基于所述历史落子记录,预测第一方对应的第一落子策略。
需要说明的是,S303中基于历史落子记录,生成第一方对应的第一落子策略的方法可以与S102中基于当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略的方法相同或不同。
在一些实施例中,在S301预测完成之后,可以得到第一方对应的每一待选位置对应的第一方胜率。
S302、基于每一所述第一待选位置对应的第一方胜率,确定所述当前落子位置对应的第一方胜率;将所述当前落子位置对应的第一方胜率确定为所述棋力量化值。
在一些实施例中,响应于第一方在当前回合的落子事件,已经得到的用户在当前回合的当前落子位置。基于该当前落子位置在S301得到的每一待选位置中查找对应的目标待选位置,将该目标待选位置对应的第一方胜率作为该棋力量化值。
在一些实施例中,在S301的预测过程中,还未输出所有待选位置和对应的第一方胜率,此时,已经接收到第一方在当前回合的落子事件,获取S301已经得到的至少一个待选位置,和每一待选位置对应的第一方胜率,基于该当前回合的落子事件的当前落子位置在得到的至少一个待选位置中查找匹配的目标待选位置,若可以找到匹配的目标待选位置,停止S301的预测过程,将已经得到的目标待选位置对应的第一方胜率作为上述棋力量化值;若没有找到匹配的目标待选位置,则继续执行S301的预测过程,直至得到与该当前落子位置匹配的目标待选位置。
S303、基于所述当前落子位置对应的第一方胜率,在所述多个第二待选位置中确定目标落子位置;所述目标落子位置的第二方胜率与所述第一方胜率存在映射关系。
在一些实施例中,在得到第二方对应的多个待选位置,和每一待选位置对应的第二方胜率之后,可以基于上述棋力量化值,即当前落子位置对应的第一方胜率,在多个第二待选位置中确定第二方胜率与该第一方胜率存在映射关系的目标落子位置。
其中,可以通过以下实现方式中的至少之一实现上述在多个第二待选位置中确定第二方胜率与该第一方胜率存在映射关系的目标落子位置:
(1)在多个第二待选位置中确定第二方胜率与所述第一方胜率相同的第二待选位置,作为该目标落子位置;通过此实现方式可以实现在当前回合中,第二方的落子的发挥情况和第一方的落子的发挥情况完全相同,进而实现真正的“棋逢对手”的效果。
(2)在多个第二待选位置中确定第二方胜率与所述第一方胜率之间的距离最小的第二待选位置,作为该目标落子位置;通过此实现方式可以实现在当前回合中,第二方的落子的发挥情况和第一方的落子的发挥情况接近,进而在一定程度上实现“棋逢对手”的效果。
(3)获取预设的映射函数关系,基于所述映射函数,对所述第一方胜率进行转换,得到转换后的第一方胜率;在说多个第二待选位置中确定第二方胜率与所述第一方胜率相同或之间的距离最小的第二待选位置,作为该目标落子位置。
其中,该预设的映射函数关系可以由基础第一方胜率和偏移参数确定,其中,该基础第一方胜率可以由用户设置,默认值为50%,在该基础第一方胜率超过默认值的情况下,表征用户希望第一方的难度较高,在该基础第一方胜率小于默认值的情况下,表征用户希望第一方的难度较低;该偏移参数用于对该第一方胜率与该基础第一方胜率之间的差值进行缩放,进而确定转换后的第一方胜率,其中,该映射函数关系可以表示为下式:
P 转换后=P 基础+k(P 转换前-P 基础)
其中,P 转换后表示转换后的第一方胜率,P 转换前表示所述当前落子位置对应的第一方胜率,P 基础表示基础第一方胜率,k为偏移参数。通过此实现方式可以实现在当前回合中,实现第二方的落子的胜率可以在维持在“势均力敌”的基础上,基于当前落子位置对应的第一方胜率的高低在基础第一方胜率的周围波动。
在本公开实施例中,由于在第二方落子之后对第一方在当前回合的落子策略进行预测,得到第一方对应的包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率的第一落子策略。进而可以在当前回合中,第一方落子之后可以快速确定第一方的棋力量化值,进而提升了第二方在当前回合中的落子速度。同时,由于基于第一方在当前回合的当前落子位置,确定第一方在当前回合中的实时胜率,并基于该实时胜率在第二落子策略中得到与该第一方实时胜率存在映射关系的目标落子位置,可以在当前对弈过程的第一方与第二方之间实现“棋逢对手”的效果。
参见图4,图4是本公开实施例提供的人机对弈方法的一个可选的流程示意图,基于 上述任一实施例,以基于图1为例,图1中的S102可以更新为S401至S404,将结合图4示出的步骤进行说明。
S401、基于所述历史落子记录,获取所述第一方的平均落子时长;所述第一方的平均落子时长用于表征所述第一方在所述第二方落子后的落子速度。
在一些实施例中,可以通过步骤S4011至S4012实现上述基于所述历史落子记录,获取所述第一方的平均落子时长:
S4011、基于所述历史落子记录中所述第一方的至少一个落子时间和所述第二方的至少一个落子时间,确定至少一个第一时间间隔;所述第一时间间隔为所述第二方落子的落子时间,与相邻的所述第一方落子的落子时间之间的时间间隔。
S4012、基于所述至少一个第一时间间隔,生成所述第一方的平均落子时长。
S402、在所述第一方的平均落子时长满足预设条件的情况下,基于所述历史落子记录,预测所述第一方在所述当前回合的第三落子策略;所述第三落子策略包括多个第三待选位置;所述第三待选位置与所述第一方在历史回合的棋力量化值相关。
在一些实施例中,可以通过以下方式确定第一方的平均落子时间书是否满足预设条件:
(1)获取预设的落子时间阈值,在所述第一方的平均落子时间大于或等于所述落子时间阈值的情况下,确定所述第一方的平均落子时间满足所述预设条件;在所述第一方的平均落子时间小于所述落子时间阈值的情况下,确定所述第一方的平均落子时间不满足所述预设条件;
(2)基于所述历史落子记录,获取所述第二方的平均落子时长;所述第二方的平均落子时长用于表征所述第二方在所述第一方落子后的落子速度;在所述第一方的平均落子时间大于或等于所述第二方的平均落子时长的情况下,确定所述第一方的平均落子时间满足所述预设条件;在所述第一方的平均落子时间小于所述第二方的平均落子时长的情况下,确定所述第一方的平均落子时间不满足所述预设条件。
在一些实施例中,在接收到第一方在当前回合的当前落子位置之前,可以先基于历史落子记录,对该第一方在当前回合的落子位置进行预测,得到第一方在所述当前回合的第三落子策略。其中,该第三落子策略包括多个第三待选位置和每一所述第三待选位置对应的第一方胜率,基于所述第一方在历史落子记录中的每一历史回合的棋力量化值(包括第一方胜率),可以确定与第一方的历史水平相关的至少一个第三待选位置。需要说明的是,在第三落子策略中,可以包括所有可以落子的第三待选位置,也可以仅包括上述与第一方的历史水平相关的部分第三待选位置。
S403、针对每一所述第三待选位置,基于所述第三待选位置和所述历史落子记录,生成所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率。
在一些实施例中,针对第三落子策略中的每一个第三待选位置,基于与S102相同的落子策略生成方法,得到每一所述第三待选位置对应的所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率。
S404、响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置在每一所述第三待选位置对应的第四落子策略中获取所述第二落子策略。
通过上述公开实施例,由于基于历史落子记录,确定了第一方的平均落子时长,并在该平均落子时长满足预设条件的情况下,在第二方在上一回合完成落子之后,利用第一方思考的时间,不仅预测了第一方在当前回合的第三落子策略,还基于该第三落子策略生成多个第二方的多个第四落子策略。由此,在第一方完成当前回合的落子事件时,可以直接从多个第四落子策略中确定第一方的当前落子位置对应的第二落子策略,提升了第二方在当前回合针对第一方在当前回合的落子事件的响应速度,进而提升了真实用户的使用体验。
参见图5,图5是本公开实施例提供的人机对弈方法的一个可选的流程示意图,基于 上述任一实施例,以基于图1为例,图1中的方法还可以包括S501至S502,将结合图5示出的步骤进行说明。
S501、获取所述第一方在历史回合的棋力量化值。
S502、基于所述第一方在所述历史回合的棋力量化值和所述第一方在所述当前回合的棋力量化值,生成提示信息;所述提示信息用于表征所述第一方在不同回合的棋力变化情况。
在一些实施例中,该历史回合可以仅包括上一回合,上一回合为该当前回合相邻的历史回合,在S501中,先获取该第一方在该上一回合的棋力量化值,结合之前得到的第一方在当前回合的棋力量化值,可以生成对应的提示信息,该提示信息用于表征该第一方在当前回合相对于上一回合的棋力变化情况。
其中,在该第一方在当前回合的棋力量化值大于上一回合的棋力量化值的情况下,可以生成第一提示信息,该第一提示信息可以用于表征第一方的棋力提高了。例如,该第一提示信息可以为“好棋”、“下的不错”或“真厉害”等表征真实用户棋力提高的提示信息。在该第一方在当前回合的棋力量化值小于上一回合的棋力量化值的情况下,可以生成第二提示信息,该第二提示信息可以用于表征第一方的棋力降低了。例如,该第一提示信息可以为“恶棋”、“失误了”或“为什么下这里”等表征真实用户棋力降低的提示信息。
在一些实施例中,该历史回合可以仅包括当前回合之前的多个历史回合,在S501中,先获取该第一方在每一历史回合的棋力量化值,结合之前得到的第一方在当前回合的棋力量化值,按照回合数生成对应的提示信息,该提示信息用于表征该第一方的棋力量化值随着回合数的变化对应的变化曲线。
通过上述公开实施例,由于通过比对第一方在历史回合和当前回合中的棋力量化值,生成用于表征所述第一方在不同回合的棋力变化情况的提示信息。可以使真实用户在每一次落子之后,接收到当前落子事件对应的实时反馈,在棋力量化值增加的情况下,用户可以通过第一提示信息感知当前回合对应的落子是相对较优的;在棋力量化值降低的情况下,用户可以通过第二提示信息感知当前回合对应的落子是相对较差的;由此,不仅可以提升人机对弈方法中对于用户的反馈及时性,还可以使得用户可以感知每一步落子的实时效果,提升了真实用户的学习效率。
下面,将说明本申请实施例在一个实际的应用场景中的示例性应用。
随着人工智能的发展,人机对弈的使用越来越广泛。但是,在目前的人机对弈相关产品中,通常是预设一些不同等级的AI棋力模型,由用户根据自己的人为判断和选择,在每局开始前手动进行设置,这种方式依赖于用户自身的主观判断能力,通常会由于自身能力难以判断,导致选择错误。从而在对弈过程中,要么设置得过于简单,用户对弈没有成就感;要么设置得过于困难,让用户丧失信心;或者有些方案会根据对弈结束后的胜负,再调整棋力模型的等级,这种方案通常需要用户花费较长时间对弈多局,才能够得到比较符合用户棋力的模型。难以较快让用户体会到棋逢对手的感觉,从而影响用户的对弈兴趣。
基于上述问题,本公开实施例提供了两个实施过程中的人机对弈方法,可以参阅图6和图7提供的流程示意图。
在一些实施例中,通过使用棋力评测模型,在对弈过程中,根据用户当前局的已有落子,实时的判断用户的棋力,并根据用户当前的棋力,选择对应AI下棋落子策略,从而达到AI下棋策略引擎与用户的棋力相匹配的效果。请参阅图6,图6是本公开实施例提供的人机对弈方法的一个可选的流程示意图,将结合图6示出的步骤进行说明。
S601、在本局人机对弈过程中,记录每一回合中用户和AI的落子位置,得到历史落子记录。
其中,该历史落子记录包括本局人机对弈过程中用户的所有落子位置和AI的所有落子位置。
S602、在用户每一步落子后,基于用户的当前落子和历史落子记录,通过棋力评测模型确定用户的棋力量化值。
其中,该棋力量化值用于表征用户的棋力水平。
S603、基于用户的棋力量化值和下棋策略模型,确定用户的当前落子对应的AI的当前落子。
其中,可以通过S6031至S6032实现上述基于用户的棋力水平和下棋策略模型,确定用户的当前落子对应的AI的当前落子:
S6031、基于用户的当前落子和历史落子记录,通过AI下棋策略模型得到多个待选落子位置和不同待选落子位置对应的胜率。
S6032、根据用户的棋力量化值,在多个待选落子位置中确定目标落子位置;所述目标落子位置对应的胜率与所述用户的棋力量化值存在映射关系。
在一些实施例中,按照胜率从高到低的顺序,对多个不同待选落子位置进行排序。同时,获取预设的多个阈值条件,每一阈值条件与胜率排序存在映射关系。例如,存在3个阈值条件,其中第一阈值条件与第一胜率存在映射关系,第二阈值条件与第二胜率存在映射关系,第三阈值条件与第三胜率存在映射关系。之后,在多个阈值条件中确定用户的棋力量化值满足的目标阈值条件,将与目标阈值条件存在映射关系的目标胜率对应的待选落子位置确定为该目标落子位置。
基于上述实施例,通过步骤S601至步骤S602,可以在对弈的过程中动态的识别用户下棋水平,并动态的将AI下棋策略引擎切换到了与用户下棋水平相匹配的等级;并且,通过上述步骤S603进一步细化了下棋过程中的策略,动态的调整了AI下棋引擎对战时的胜率策略,可以切换AI下棋策略模型到与用户棋力相匹配的等级上,进一步匹配用户在对弈过程中的发挥情况,从而更好的匹配用户的下棋水平。
在一些实施例中,在对弈过程中,用AI策略模型模拟用户落子,判断用户不同落子位置的胜率,并根据用户实际的落子位置,选择AI方落子是对应胜率的落子位置进行落子,达到在对弈过程中,双方胜率比较一致的情况,从而达到AI对用户棋力的自适应。请参阅图7,图7是本公开实施例提供的人机对弈方法的一个可选的流程示意图,将结合图7示出的步骤进行说明。
S701、在本局人机对弈过程中,记录每一回合中用户和AI的落子位置,得到历史落子记录。
其中,该历史落子记录包括本局人机对弈过程中用户的所有落子位置和AI的所有落子位置。
S702、在用户落子之前,基于历史落子记录,通过AI下棋策略模型计算用户方的不同落子位置的胜率。
S703、在用户落子后,得到用户方当前落子位置对应的胜率。
S704、基于用户的当前落子位置和历史落子记录,通过AI下棋策略模型得到多个待选落子位置和不同待选落子位置对应的胜率。
S705、基于所述用户方当前落子位置对应的胜率,在多个待选落子位置中确定目标落子位置;所述目标落子位置对应的胜率与用户方当前落子位置对应的胜率存在映射关系。
图8为本公开实施例提供的一种人机对弈装置的组成结构示意图,如图8所示,人机对弈装置800包括:
记录部分801,被配置为在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;
生成部分802,被配置为响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;
确定部分803,被配置为基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;
落子部分804,被配置为在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
在一些实施例中,所述确定部分803,还被配置为:
将所述历史落子记录和所述当前落子位置输入至预设的棋力评测模型,得到所述第一方的棋力评分;所述棋力评分用于表征所述第一方在对弈开始至所述当前回合的整体棋力水平;
基于所述第一方的棋力评分,确定所述第一方的棋力量化值。
在一些实施例中,所述落子部分804,还被配置为:
基于每一所述第二待选位置对应的第二方胜率,对所述多个第二待选位置进行排序,确定每一所述第二待选位置的排序位置;
根据预设的第一映射表,获取所述第一方的棋力评分对应的目标排序位置;所述第一映射表包括棋力评分与排序位置的映射关系;
将所述目标排序位置对应的第二待选位置确定为所述目标落子位置。
在一些实施例中,所述落子部分804,还被配置为:
根据预设的第二映射表,获取所述第一方的棋力评分对应的目标胜率区间;
基于所述目标胜率区间,将位于所述目标胜率区间中的第二待选位置确定为所述目标落子位置。
在一些实施例中,在所述响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的第一当前落子和所述历史落子记录,生成所述第二方对应的第二落子策略之前,所述生成部分802,还被配置为:基于所述历史落子记录,预测所述第一方对应的第一落子策略;所述第一落子策略包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率;
所述确定部分803,还被配置为:基于每一所述第一待选位置对应的第一方胜率,确定所述当前落子位置对应的第一方胜率;将所述当前落子位置对应的第一方胜率确定为所述棋力量化值。
在一些实施例中,所述落子部分804,还被配置为:
基于所述当前落子位置对应的第一方胜率,在所述多个第二待选位置中确定目标落子位置;所述目标落子位置的第二方胜率与所述第一方胜率存在映射关系。
在一些实施例中,所述生成部分802,还被配置为:
基于所述历史落子记录,获取所述第一方的平均落子时长;所述第一方的平均落子时长用于表征所述第一方在所述第二方落子后的落子速度;
在所述第一方的平均落子时长满足预设条件的情况下,基于所述历史落子记录,预测所述第一方在所述当前回合的第三落子策略;所述第三落子策略包括多个第三待选位置;所述第三待选位置与所述第一方在历史回合的棋力量化值相关;
针对每一所述第三待选位置,基于所述第三待选位置和所述历史落子记录,生成所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率;
响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置在每一所述第三待选位置对应的第四落子策略中获取所述第二落子策略。
在一些实施例中,所述生成部分802,还被配置为:
基于所述历史落子记录中所述第一方的至少一个落子时间和所述第二方的至少一个落子时间,确定至少一个第一时间间隔;所述第一时间间隔为所述第二方落子的落子时间,与相邻的所述第一方落子的落子时间之间的时间间隔;
基于所述至少一个第一时间间隔,生成所述第一方的平均落子时长。
在一些实施例中,所述生成部分802,还被配置为:
获取所述第一方在历史回合的棋力量化值;
基于所述第一方在所述历史回合的棋力量化值和所述第一方在所述当前回合的棋力量化值,生成提示信息;所述提示信息用于表征所述第一方在不同回合的棋力变化情况。
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。
需要说明的是,本公开实施例中,如果以软件功能部分的形式实现上述的人机对弈方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台设备执行本公开各个实施例方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何目标的硬件和软件结合。
图9为本公开实施例提供的一种人机对弈设备的硬件实体示意图,如图9所示,该人机对弈设备900的硬件实体包括:处理器901和存储器902,其中,存储器902存储有可在处理器901上运行的计算机程序,处理器901执行程序时实现上述任一实施例的方法中的步骤。在一些实施方式中,游戏桌上收赔游戏币的设备900可以是上述任一实施例中所说明的检测设备。
存储器902存储有可在处理器上运行的计算机程序,存储器902配置为存储由处理器901可执行的指令和应用,还可以缓存待处理器901以及人机对弈设备900中各部分待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。
处理器901执行程序时实现上述任一项的人机对弈方法的步骤。处理器901通常控制人机对弈设备900的总体操作。
本公开实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,以实现如上任一实施例的人机对弈方法的步骤。
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的人机对弈方法的步骤,可参见上述方法实施例。
其中,上述计算机程序产品可以通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品体现为计算机存储介质,在另一个可选实施例中,计算机程序产品体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。
上述处理器可以为目标用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。可以理解地,实现上述处理器功能的电子器件还可以为其它,本公开实施例不作限定。
上述计算机存储介质/存储器可以是只读存储器(Read Only Memory,ROM)、可编程 只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性随机存取存储器(Ferromagnetic Random Access Memory,FRAM)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(Compact Disc Read-Only Memory,CD-ROM)等存储器;也可以是包括上述存储器之一或任意组合的各种终端,如移动电话、计算机、平板设备、个人数字助理等。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“本公开实施例”或“前述实施例”或“一些实施例”意味着与实施例有关的目标特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”或“本公开实施例”或“前述实施例”或“一些实施例”未必一定指相同的实施例。此外,这些目标的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。
在未做特殊说明的情况下,检测设备执行本公开实施例中的任一步骤,可以是检测设备的处理器执行该步骤。除非特殊说明,本公开实施例并不限定检测设备执行下述步骤的先后顺序。另外,不同实施例中对数据进行处理所采用的方式可以是相同的方法或不同的方法。还需说明的是,本公开实施例中的任一步骤是检测设备可以独立执行的,即检测设备执行上述实施例中的任一步骤时,可以不依赖于其它步骤的执行。
在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本公开所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本公开所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本公开上述集成的单元如果以软件功能部分的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该 计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、检测设备、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
在本公开实施例中,不同实施例中相同步骤和相同内容的说明,可以互相参照。在本公开实施例中,术语“并”不对步骤的先后顺序造成影响。
以上所述,仅为本公开的实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。
工业实用性
本公开实施例公开了一种人机对弈方法、装置、设备及存储介质,其中,该方法包括:在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。可以实现在整个人机对弈过程中,基于不同回合中真实用户的发挥情况,动态调整虚拟用户的落子策略,让虚拟用户的棋力水平与真实用户的棋力水平进行动态匹配,可以使得真实用户在对弈过程中感受到“棋逢对手”的感觉,提升了用户对弈兴趣。

Claims (21)

  1. 一种人机对弈方法,所述方法包括:
    在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;
    响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;
    基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;
    在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
  2. 根据权利要求1所述的方法,其中,所述基于所述历史落子记录和所述当前落子位置,确定所述第一方的棋力量化值,包括:
    将所述历史落子记录和所述当前落子位置输入至预设的棋力评测模型,得到所述第一方的棋力评分;所述棋力评分用于表征所述第一方在对弈开始至所述当前回合的整体棋力水平;
    基于所述第一方的棋力评分,确定所述第一方的棋力量化值。
  3. 根据权利要求2所述的方法,其中,所述在所述多个第二待选位置中确定目标落子位置,包括:
    基于每一所述第二待选位置对应的第二方胜率,对所述多个第二待选位置进行排序,确定每一所述第二待选位置的排序位置;
    根据预设的第一映射表,获取所述第一方的棋力评分对应的目标排序位置;所述第一映射表包括棋力评分与排序位置的映射关系;
    将所述目标排序位置对应的第二待选位置确定为所述目标落子位置。
  4. 根据权利要求2所述的方法,其中,所述在所述多个第二待选位置中确定目标落子位置,包括:
    根据预设的第二映射表,获取所述第一方的棋力评分对应的目标胜率区间;
    基于所述目标胜率区间,将位于所述目标胜率区间中的第二待选位置确定为所述目标落子位置。
  5. 根据权利要求1所述的方法,其中,在所述响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的第一当前落子和所述历史落子记录,生成所述第二方对应的第二落子策略之前,所述方法还包括:基于所述历史落子记录,预测所述第一方对应的第一落子策略;所述第一落子策略包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率;
    所述基于所述历史落子记录和所述当前落子位置,确定所述第一方的棋力量化值,包括:基于每一所述第一待选位置对应的第一方胜率,确定所述当前落子位置对应的第一方胜率;将所述当前落子位置对应的第一方胜率确定为所述棋力量化值。
  6. 根据权利要求5所述的方法,其中,所述在所述多个第二待选位置中确定目标落子位置,包括:
    基于所述当前落子位置对应的第一方胜率,在所述多个第二待选位置中确定目标落子位置;所述目标落子位置的第二方胜率与所述第一方胜率存在映射关系。
  7. 根据权利要求1至6所述的方法,其中,所述历史落子记录包括落子时间;所述方法还包括:
    基于所述历史落子记录,获取所述第一方的平均落子时长;所述第一方的平均落子时长用于表征所述第一方在所述第二方落子后的落子速度;
    在所述第一方的平均落子时长满足预设条件的情况下,基于所述历史落子记录,预测 所述第一方在所述当前回合的第三落子策略;所述第三落子策略包括多个第三待选位置;所述第三待选位置与所述第一方在历史回合的棋力量化值相关;
    针对每一所述第三待选位置,基于所述第三待选位置和所述历史落子记录,生成所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率;
    响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置在每一所述第三待选位置对应的第四落子策略中获取所述第二落子策略。
  8. 根据权利要求7所述的方法,其中,所述基于所述历史落子记录,获取所述第一方的平均落子时长,包括:
    基于所述历史落子记录中所述第一方的至少一个落子时间和所述第二方的至少一个落子时间,确定至少一个第一时间间隔;所述第一时间间隔为所述第二方落子的落子时间,与相邻的所述第一方落子的落子时间之间的时间间隔;
    基于所述至少一个第一时间间隔,生成所述第一方的平均落子时长。
  9. 根据权利要求1至8所述的方法,其中,所述方法还包括:
    获取所述第一方在历史回合的棋力量化值;
    基于所述第一方在所述历史回合的棋力量化值和所述第一方在所述当前回合的棋力量化值,生成提示信息;所述提示信息用于表征所述第一方在不同回合的棋力变化情况。
  10. 一种人机对弈装置,包括:
    记录部分,被配置为在对弈过程中,记录第一方和第二方的落子位置,得到历史落子记录;
    生成部分,被配置为响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置和所述历史落子记录,生成所述第二方对应的第二落子策略;所述第二落子策略包括多个第二待选位置和每一所述第二待选位置对应的第二方胜率;
    确定部分,被配置为基于所述历史落子记录和所述当前落子位置,确定所述第一方在所述当前回合的棋力量化值;所述棋力量化值用于表征所述第一方的棋力水平;
    落子部分,被配置为在所述多个第二待选位置中确定目标落子位置;所述目标落子位置对应的第二方胜率与所述棋力量化值匹配。
  11. 根据权利要求10所述的装置,其中,所述确定部分,还被配置为:
    将所述历史落子记录和所述当前落子位置输入至预设的棋力评测模型,得到所述第一方的棋力评分;所述棋力评分用于表征所述第一方在对弈开始至所述当前回合的整体棋力水平;
    基于所述第一方的棋力评分,确定所述第一方的棋力量化值。
  12. 根据权利要求11所述的装置,其中,所述落子部分,还被配置为:
    基于每一所述第二待选位置对应的第二方胜率,对所述多个第二待选位置进行排序,确定每一所述第二待选位置的排序位置;
    根据预设的第一映射表,获取所述第一方的棋力评分对应的目标排序位置;所述第一映射表包括棋力评分与排序位置的映射关系;
    将所述目标排序位置对应的第二待选位置确定为所述目标落子位置。
  13. 根据权利要求12所述的装置,其中,所述落子部分,还被配置为:
    根据预设的第二映射表,获取所述第一方的棋力评分对应的目标胜率区间;
    基于所述目标胜率区间,将位于所述目标胜率区间中的第二待选位置确定为所述目标落子位置。
  14. 根据权利要求10所述的装置,其中,在所述响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的第一当前落子和所述历史落子记录,生成所述第二方对应的第二落子策略之前,所述生成部分,还被配置为:
    基于所述历史落子记录,预测所述第一方对应的第一落子策略;所述第一落子策略包括多个第一待选位置和每一所述第一待选位置对应的第一方胜率;
    所述确定部分,还被配置为:基于每一所述第一待选位置对应的第一方胜率,确定所述当前落子位置对应的第一方胜率;将所述当前落子位置对应的第一方胜率确定为所述棋力量化值。
  15. 根据权利要求14所述的装置,其中,所述落子部分,还被配置为:
    基于所述当前落子位置对应的第一方胜率,在所述多个第二待选位置中确定目标落子位置;所述目标落子位置的第二方胜率与所述第一方胜率存在映射关系。
  16. 根据权利要求10至15任一项所述的装置,其中,所述历史落子记录包括落子时间,所述生成部分,还被配置为:
    基于所述历史落子记录,获取所述第一方的平均落子时长;所述第一方的平均落子时长用于表征所述第一方在所述第二方落子后的落子速度;
    在所述第一方的平均落子时长满足预设条件的情况下,基于所述历史落子记录,预测所述第一方在所述当前回合的第三落子策略;所述第三落子策略包括多个第三待选位置;所述第三待选位置与所述第一方在历史回合的棋力量化值相关;
    针对每一所述第三待选位置,基于所述第三待选位置和所述历史落子记录,生成所述第二方对应的第四落子策略;所述第四落子策略包括多个第四待选位置和每一所述第四待选位置对应的第二方胜率;
    响应于所述第一方在当前回合的落子事件,基于所述落子事件对应的当前落子位置在每一所述第三待选位置对应的第四落子策略中获取所述第二落子策略。
  17. 根据权利要求16所述的装置,其中,所述生成部分,还被配置为:
    基于所述历史落子记录中所述第一方的至少一个落子时间和所述第二方的至少一个落子时间,确定至少一个第一时间间隔;所述第一时间间隔为所述第二方落子的落子时间,与相邻的所述第一方落子的落子时间之间的时间间隔;
    基于所述至少一个第一时间间隔,生成所述第一方的平均落子时长。
  18. 根据权利要求10至17任一项所述的装置,其中,所述生成部分,还被配置为:
    获取所述第一方在历史回合的棋力量化值;
    基于所述第一方在所述历史回合的棋力量化值和所述第一方在所述当前回合的棋力量化值,生成提示信息;所述提示信息用于表征所述第一方在不同回合的棋力变化情况。
  19. 一种人机对弈设备,包括:存储器和处理器,
    所述存储器存储有可在所述处理器上运行的计算机程序,
    所述处理器执行所述计算机程序时实现权利要求1至9任一项所述方法中的步骤。
  20. 一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至9任一项所述方法中的步骤。
  21. 一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9任一项所述方法中的步骤。
PCT/CN2021/125332 2021-06-25 2021-10-21 一种人机对弈方法、装置、设备、存储介质及程序产品 WO2022267276A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020247002817A KR20240023178A (ko) 2021-06-25 2021-10-21 인간-컴퓨터 대국 방법, 장치, 기기, 저장매체 및 프로그램 제품

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110713569.2 2021-06-25
CN202110713569.2A CN113509713A (zh) 2021-06-25 2021-06-25 一种人机对弈方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022267276A1 true WO2022267276A1 (zh) 2022-12-29

Family

ID=78065900

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125332 WO2022267276A1 (zh) 2021-06-25 2021-10-21 一种人机对弈方法、装置、设备、存储介质及程序产品

Country Status (3)

Country Link
KR (1) KR20240023178A (zh)
CN (1) CN113509713A (zh)
WO (1) WO2022267276A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113509713A (zh) * 2021-06-25 2021-10-19 成都商汤科技有限公司 一种人机对弈方法、装置、设备及存储介质
CN114462606A (zh) * 2022-01-29 2022-05-10 北京市商汤科技开发有限公司 人机对弈方法及装置、设备、存储介质
CN114546116A (zh) * 2022-02-21 2022-05-27 北京市商汤科技开发有限公司 人机对弈方法及装置、电子设备和存储介质
CN115025488B (zh) * 2022-08-08 2022-11-18 科大讯飞(苏州)科技有限公司 对弈方法、对弈装置、显示装置及存储装置
CN115025486B (zh) * 2022-08-08 2023-02-24 科大讯飞(苏州)科技有限公司 对弈方法、对弈装置、显示装置及存储装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7549931B1 (en) * 2006-09-28 2009-06-23 Faulk William L Modified chess set and method of playing a modified game of chess
CN106422295A (zh) * 2016-09-27 2017-02-22 珠海格力智能装备有限公司 对弈难度等级的处理方法及装置、机器人
CN107866069A (zh) * 2016-09-27 2018-04-03 珠海格力智能装备有限公司 对弈难度等级的处理方法及装置
CN211383747U (zh) * 2019-09-30 2020-09-01 邓美泽 人机对弈井字棋
CN111659124A (zh) * 2020-05-27 2020-09-15 太原理工大学 一种用于对弈的智能鉴别系统
CN113509713A (zh) * 2021-06-25 2021-10-19 成都商汤科技有限公司 一种人机对弈方法、装置、设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339582B (zh) * 2016-08-19 2019-02-01 深圳市云安晟科技有限公司 一种基于机器博弈技术的棋牌类游戏自动化残局生成方法
CN107622092B (zh) * 2017-08-24 2019-11-12 河海大学 中国象棋基于多重优化、迭代加深剪枝的搜索方法
CN107729983B (zh) * 2017-09-21 2021-06-25 北京深度奇点科技有限公司 一种利用机器视觉实现人机对弈的方法、装置及电子设备
KR102007371B1 (ko) * 2019-01-24 2019-08-05 넷마블 주식회사 게임 플레이 전략 추천 방법 및 장치

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7549931B1 (en) * 2006-09-28 2009-06-23 Faulk William L Modified chess set and method of playing a modified game of chess
CN106422295A (zh) * 2016-09-27 2017-02-22 珠海格力智能装备有限公司 对弈难度等级的处理方法及装置、机器人
CN107866069A (zh) * 2016-09-27 2018-04-03 珠海格力智能装备有限公司 对弈难度等级的处理方法及装置
CN211383747U (zh) * 2019-09-30 2020-09-01 邓美泽 人机对弈井字棋
CN111659124A (zh) * 2020-05-27 2020-09-15 太原理工大学 一种用于对弈的智能鉴别系统
CN113509713A (zh) * 2021-06-25 2021-10-19 成都商汤科技有限公司 一种人机对弈方法、装置、设备及存储介质

Also Published As

Publication number Publication date
KR20240023178A (ko) 2024-02-20
CN113509713A (zh) 2021-10-19

Similar Documents

Publication Publication Date Title
WO2022267276A1 (zh) 一种人机对弈方法、装置、设备、存储介质及程序产品
US20080045335A1 (en) Replacing a Departing Player in a Game with a Waiting Player
CN105963961A (zh) 网络游戏系统、游戏方法及非暂时性电脑可读取介质
CN107335220B (zh) 一种消极用户的识别方法、装置及服务器
JP2024527325A (ja) 棋力調整方法、装置、デバイス、記憶媒体及びプログラム
CN107684720A (zh) 游戏技能生成方法及装置
US11998851B2 (en) Automated coaching for online gaming
CN112685921B (zh) 一种高效精确搜索的麻将智能决策方法、系统及设备
US20110256910A1 (en) System and method for dynamically valuating players during a fantasy draft
CN110263937B (zh) 一种数据处理方法、设备及存储介质
US20110256909A1 (en) System and method for automated fantasy drafting
CN108874377B (zh) 一种数据处理方法、装置和存储介质
CN111068334A (zh) 离线检测作弊方法、装置、设备和存储介质
US9352234B2 (en) Player rankings based on long term opponent activity
US20110256926A1 (en) System and method for valuating a player in a fantasy draft based on user-defined league rules
US8565906B1 (en) Audio processing in a social environment
US8951107B2 (en) System and method for non-sequential automated fantasy drafting
JP2019177084A (ja) サーバシステムおよびゲームシステム
JP7093568B2 (ja) 情報処理装置
WO2024204244A1 (ja) コンピュータシステムおよびゲーム制御方法
CN113791975B (zh) 一种游戏测试方法、装置、计算机设备及存储介质
US20240123341A1 (en) Method, apparatus, electronic device and storage medium for combat control
CN117205548A (zh) 一种打分算法评价方法及相关装置
KR100746051B1 (ko) 대전형 게임내의 훈수 시스템
JP2019037739A (ja) ゲームシステム、及びそれに用いるコンピュータプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946758

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20247002817

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 1020247002817

Country of ref document: KR

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/05/2024)