General Game Playing
Gameplayer
Sign In

Assignments Notes Lectures Readings Resources Arena Piazza

Gameplayer is a web page that allows human users to play games using rules and styling of their own. In the current version, there is no clock, i.e. you can take as long to play as you like. You can also back up, change moves, and continue play.

Gameplayer can be found here.

The Gameplayer page has three interaction panes - Game, State, and History. The page begins with the State pane, and you can switch between panes by clicking the links at the top of the page.

The Game pane allows you to enter game rules and a Javascript stylesheet. The must be written in Prefix GDL. You can navigate through the rules using the scroll bar on the text area. Note that you can change the rules if you like. The stylesheet must be written javascript. The code must define a javascript function that takes a state as argument and produces a DOM fragment as result, which is then spliced into the DOM tree by the game player as the game progresses. (If you do not specify a stylesheet, the system reverts to standard GDL display for states.) Once you have supplied a rulesheet and a stylesheet, you can then play a match of the revised game by pressing the Initialize button.

The State pane is the main pane to use while playing a match. The current state of the match is shown below the command bar, using the game's stylesheet. The match controller is shown at the bottom. The first row in the controller is a list of roles in the game. The second row is a list of selectors containing legal moves for the current step. The third row is a list of control buttons.

To play a step in the match, select actions for each of the players and press the Play button. Gameplayer will simulate the move, update the state, add your move to the history of the match, and update the legals moves for the various roles. You can then play again and again until the match is over, at which point the second row will show goal values for each of the players.

At the end of the match or at any point during the match, you can review history by pressing the First, Back, Next, and Last buttons. To resume play, press the Last button to get to the current state.

If you wish to redo a move, navigate to the desired step and press Redo. Gameplayer will reset the match to that step and you can continue from there.

The History pane shows a history of moves made during the match. Clicking on a row will take you to the State pane showing the corresponding step. Pressing the Export button on the History pane will create a window with an XML rendition of the match, which you can save and view later using Gameviewer.



Comments and complaints to genesereth@stanford.edu.