1 00:00:03,301 --> 00:00:07,357 Game management is the process of administering a game in a general game playing setting. 2 00:00:08,546 --> 00:00:14,976 More properly it should be called match management as the issue is how to manage individual matches of games, not the games themselves 3 00:00:15,792 --> 00:00:19,426 however everyone seems to use the phrase "game management" so we're stuck with it. 4 00:00:20,545 --> 00:00:26,106 In this segment we're gonna start with an overview of the general game playing environment illustrating the central role of a game manager 5 00:00:26,745 --> 00:00:29,461 and we'll then discuss the general game playing protocol. 6 00:00:31,254 --> 00:00:34,298 Here's a diagram of a typical general game playing ecosystem. 7 00:00:34,687 --> 00:00:37,009 At the center of the ecosystem is the game manager. 8 00:00:38,097 --> 00:00:46,472 Game manager maintains a database of game descriptions, maintains some temporary state for matches while they're running, and maintains a database of match results. 9 00:00:47,530 --> 00:00:52,822 The game manager communicates with game players using the internet TCP/IP protocol. 10 00:00:53,660 --> 00:01:03,153 And it also provides user interface for users who want to schedule matches, and it provides graphics for spectators who want to watch matches while they're running. 11 00:01:04,794 --> 00:01:12,768 The process of running a match goes as follows: if I'm receiving a request to run a match the game manager first sends a "start" message to each player to initiate the match. 12 00:01:14,127 --> 00:01:21,280 Shortly thereafter, game play begins, and it send "play" messages to each player to obtain their moves, and simulates the results. 13 00:01:22,252 --> 00:01:27,987 This part of the process then repeats until the game is over and the manager then sends "stop" messages to each player. 14 00:01:30,018 --> 00:01:38,849 The "start" message contains the name of the match, the role the payer is to assume, for example white or black in chess 15 00:01:39,335 --> 00:01:43,442 a formal description of the associated game written in GDL 16 00:01:43,873 --> 00:01:46,841 and the start clock and play clock associated with the match. 17 00:01:47,948 --> 00:01:51,514 Start clock determines how much time remains before play begins. 18 00:01:52,927 --> 00:01:57,231 The play clock determines how much time each play has to play each move once play begins. 19 00:01:58,744 --> 00:02:08,507 Upon receiving a start message each play sets up its data structures and does whatever analysis is deemed desirable in the time available, and then replies to the game manager that it's ready to play. 20 00:02:09,990 --> 00:02:19,880 Having sent a "start" message the game manager [error in video] waits for the replies from the players and once it has received these replies or once the start clock is exhausted, it commences play. 21 00:02:20,521 --> 00:02:23,704 On each step, the game manager sends a "play" message to each player. 22 00:02:24,287 --> 00:02:35,444 The message includes information about the action of all players on the preceding step, and on the first step the argument is null because there are no preceding actions. 23 00:02:35,998 --> 00:02:39,619 On receiving a "play" message, players spend their time trying to decide their moves. 24 00:02:39,871 --> 00:02:43,706 They must reply within the amount of time specified by the match's play clock. 25 00:02:45,256 --> 00:02:54,089 The game manager waits for replies from the players, if a player does not respond before the play clock is exhausted the game manager selects an arbitrary legal move. 26 00:02:54,592 --> 00:03:04,551 In any case, one all the players reply or the play clock is exhausted the game manager takes the specified moves or the legal moves it has determined for the player and determines the next game state 27 00:03:05,610 --> 00:03:13,397 then evaluates the termination condition to see if the game is over, if the game is not over the game manager sends the moves of the players to all players and this process then repeats. 28 00:03:15,214 --> 00:03:23,386 Once a game is determined to be over, the game manager sends a "stop" message to each player with information about the last moves made by all the players. 29 00:03:24,277 --> 00:03:34,385 The stop message allows players to clean up any data structures for the match and the information provided about previous plays is supplied so that the player with learning components can profit from their experience 30 00:03:35,969 --> 00:03:43,767 Having stopped all the players the game manager then computes the rewards for each player, stores this information together with the play history in its database and ceases operation.