Instruction for Creating Discrete Games with Tree Editor

  1. Basic Elements of Tree Editor

  2. Creating a New Tree
    1. Determining Sequence of Events
    2. Editing Chance Probabilities
    3. Editing Choice Names
    4. Editing Player Label
    5. Editing Labels in General
    6. Editing Information Sets
    7. Deleting Information Sets
    8. Editing Terminal Nodes (Payoffs)
    9. Payoff Information Sets
    10. Aligning payoffs
    11. Labeling payoffs
    12. Stages
    13. Transitional matrices
    14. Rearranging Positions of Nodes
    15. Viewing Node Numbers
    16. Testing a Game

     

  3. Saving a File
  4. Running an Experiment
    1. Determining Session Parameters
    2. Experimenter/Instructor Viewing the Game
    3. Viewing Experimental Results

  5. Instructions to Players given by the Instructor
    1. Players Connecting to the Experiment
    2. Opening a Game by Players
    3. Waiting for other Players to login
    4. Choosing Moves by Players

     

 
  1. Basic Elements of Tree Editor

You can set up the experiment by clicking on . The tree editor will appear like the one on the picture below.

The editor for designing games in extensive form games appears on the screen. The  and  icons are the main building blocks.

 

 

     

The File menu allows the instructor to create new files, open existing files, save files, run games, open a new tree editor by selecting Clone Window and to exit from the tree editor.

The View has only the refresh command.

The Payoff icon represents a terminal node and allows the instructor to determine the players' payoffs for each possible outcome.

The Nature icon allows the instructor to determine probability distributions over exogenous events. 

The Player icon allows the instructor to determine who is involved (i.e. the set of players).
Return to the Table of Contents
  1. Creating a New Tree
To create a new tree

From the File menu, choose New

  1. Determining Sequence of Events
To start editing the tree: 
  • click the mouse button on a nature icon or a players' icon at the bottom of the applet and drag the mouse to a target node to create a branch. 
In the Figure below the nature icon was dragged to Player 1 icon because the selected game starts with a random move.
The branch was created that connects two points, a chance node (i.e. Nature) and a decision node (i.e. Player 1). 

appears as a default name for a stage above the first node. Click on the title and write a new name if you want to change it.

appears at the bottom of any node and represents the transition matrix between different stages. One only one stage is defined the weights represent the likelihood of the same stage being repeated or ended.

 

To add another branch following the root: 
  • click on the root of the tree (i.e. Nature's icon in the left Figure), and drag the mouse to a target node at the bottom of the editor (i.e. Player 1's icon in the left Figure). 
To add any branch: 
  • click on a node in the tree and drag the mouse to a target node at the bottom of the editor.
In the Figure below by clicking on the Player 1 icon and dragging the mouse to the Payoff icon we created the next branch in the path of play that would be determined by Player 1.
To continue adding branches: 
  • click on a node in the tree and drag the mouse to a target node at the bottom of the editor in the same way  (See Figure below).

Return to the Table of Contents  
To delete a branch: 
  • click the mouse on a predecessor node (i.e. Player 1), and drag it to a successor that you want to delete (i.e. Player 2)
Note that both, Player 1’s and Player 2’s icons have to be highlighted in blue. 
A branch that connects the predecessor and the successor decision node is erased as well as the successor decision node (in our example Player 2 decision node).  

Note that the payoffs are updated simultaneously on all the terminal nodes when a player is deleted from the tree diagram.

Return to the Table of Contents  

  1. Editing Chance Probabilities
 A chance node has a default label "Nature" (the name can be changed by the instructor), and the branches that follow the chance node would be determined by some random mechanism, according to the weights or probabilities that a moderator writes into the empty rectangles (by default each branch is empty).

To edit chance probabilities on branches:  

  • click on a rectangle that is located in the middle of a branch (in our example the left rectangle). Once the rectangle is selected it is highlighted in blue.

 
 
 
  • Write the appropriate weight in the selected rectangle or at the top where Weight and event name appears. The title appears only if event rectangle is selected. 
In our example the left event was given the weight 1, and the right event was given  weight 3 (1/4 probability for the left alternative, and 3/4 probability for the right alternative). Note that the weights will appear on the subject's screen in this case.

Every event can also have a name.  

  • Write the appropriate label (Note that naming alternatives is optional.). The space between the number and the following character represents a label.
  • If a comma separates the weights and the label, the weights are not seen while playing.

 

 

 
  • Weights can also be represented  with probabilities. Moderator has to be careful that the sum of probabilities is at the end one.

Return to the Table of Contents  

  1. Editing Choice Names
Each alternative at a node that is controlled by a player should have a choice label. To edit choice labels on branches: 
  • click on a rectangle that is located in the middle of a branch (in our example the rectangle on the left branch of Player 2) or select labels the inventory of the existing names that a program keeps. The box appears only if you selected a choice rectangle and at least one choice was labeled. 
  • Write the appropriate choice name in the rectangle or pick an existing name.

 
 Return to the Table of Contents  
  1. Editing Player Label
Each non terminal node has by default a player label that is in the set {Nature, Player 1, Player 2,…, Player 16}. There are two ways to edit a Player label, or a Nature label: 
  • Clicking on  a player's icon at the bottom of the tree editor  (i.e. Player 1 was selected in Figure on the left below). 
  • Clicking on a player's icon in the tree  (i.e. Player 1 was selected in Figure on the right below).
  •  At the top right corner  option appears that allows moderator to customize the name for a specific stage. If Customize is not selected (i.e. ) then the name that was specified at the bottom of the editor appears in the tree) 

 

 
 
  •   One option for labeling players is to  write the appropriate label by clicking directly on a player node in the tree:

In our example Player 1’s label was replaced with and  option was selected. Note that the label for Player 1 was neither changed in the other nor at the bottom of the tree editor.

  • If is not ticked then the player's label at  the bottom of the editor replaces the customized name. However the customized name is saved.

 

  • The other option is to write the appropriate player's labels at the bottom of the tree editor with . In this case  the labels in all the nodes in the tree  for that specific player role change without visiting each specific node. See the picture below: 

Return to the Table of Contents  
  1. Editing Labels in General
  • Html commands can be used to edit any label in the tree editor. For example:
  • to go to a new line
  • <i> italic
  • <b> bold
  • <font size=number>

 

Return to the Table of Contents  

     

  1. Editing Information Sets
  •  To edit information sets click on a any player node  and a plus sign appears above a node.
  • Click on the plus sign of a player ( in our example the buyer) and drag it to the target player) to toggle an incomplete information set connection.

  • By connecting the nodes in this set of player i (i.e. the buyer) is depicted by a dotted line in the same color as player i (i.e. the buyer).
  •  

 
 
 
The nodes can be connected between the stages as well. In this case players do not know which stage they are in when they are making a decision. In the example below Player 1 cannot distinguish between second (S2) and Third (S3) stage. 
 
 
 
The set of choice names following the two nodes must be the same if the two nodes are controlled by the same player in the same information state. If choice names do not match, they are highlighted red to warn the instructor that the game is not meaningful, and the program will not allow the instructor to play the game. 

Return to the Table of Contents  
  1. Deleting Information Sets
To delete the set of nodes that cannot be distinguished by a player 
  • click on a player and the plus sigh will appear at the top of player i (in our example the buyer) and drag it to the target player i (the buyer) just below the plus sign. The dotted line will disappear

Return to the Table of Contents  
  1. Editing Terminal Nodes (Payoffs)
Each terminal node has a label that specifies for each player i a payoff , when this node is the outcome of the game. By default all the payoffs are set to zero.  

To change the payoffs  

  • click on the appropriate terminal node and write the payoff for each player.

There are several options how the payoffs can be labeled:

 

  •  as integer numbers :    
  • decimals:                       
  • negative values:            
  • labels after the number:

  • coding payoffs with comma that separates the code from the payoff that a  player sees:

 

 
 Return to the Table of Contents
  1. Payoff information sets
  •    To edit payoff information sets click on a terminal node  and a plus sign appears above a terminal node and drag mouse to a terminal node to toggle an information set connection.

Return to the Table of Contents
  1. Aligning payoffs
By clicking on the background of the editor appears at the top right corner of the editor. Tick align payoffs and the terminal (payoff) nodes will all be aligned on the same line.
Terminal nodes with align payoffs not selected:  

Terminal nodes with align payoffs selected:

Return to the Table of Contents

  1. Labeling payoffs
By clicking on the background of the editor appears at the top right corner of the editor. Tick label payoffs and the players roles will be added to the payoffs in the terminal nodes.
Terminal nodes when label payoffs is not selected:

Terminal nodes when label payoffs is selected: 

Return to the Table of Contents

  1. Stages
  • After building a tree like in the picture below click on the player icon at the bottom of the editor and drag the mouse to another player at the bottom of the tree to start creating the next stage.  

 

  • A new stage (S2 in the picture below) can be created by starting a new tree in the same way as the first tree was created. Note that the number of stages is not limited. Just continue building new trees and you will get automatically a new stage created.      

Return to the Table of Contents  

 
  • Another example of adding stages

Return to the Table of Contents  

Each stage that is created has a default name:  .  To edit a stage name click on   and change the stage name. The change of the stage game is not required.
  • If only one stage is created then only a stage name can be edited and transitional matrix can be defined  (see transitional matrix for the discussion on Markov/ stage games). 

 

  • If more then one stage is created then ID is added to the stage name. The default is: 

  • Both of these labels can be renamed by directly typing a new name in the rectangle or in the rectangle after Stage name. ID name appears in the transitional matrices at the end of the terminal nodes.

 

Return to the Table of Contents  

  1. Transitional matrices

A stage game is a default option. To check it click on the  stage name rectangle that is by default named  and  should not be selected  just like in the picture below.

 

Return to the Table of Contents  

        -  Transitional matrix with only one stage defined in a stage game

The transitional matrix at the bottom of the terminal node has the following form: . Click on the matrix and write the appropriate weights for repeating  and for ending the game. The weights can be integer, decimal numbers. Below is the list of possible ways that the weights can be written and their explanation:
  • means that the game will end after a terminal node is reached.
  • . The game will be repeated with probability 2/3 and it will end with probability 1/3. 
  • . The game will be repeated with probability 0.4 and it will end with probability 0.6. 
  • . The number before the comma is the weight, the description (blank) after comma is the information that a player sees during the game. In this case a player will see . Similarly if the text is shown after the comma then a player sees just text and not the weights .

 

  • . If space separates the weights and the text then a subjects sees the weights and the text.

 

Return to the Table of Contents
  • If is not selected then only one transitional matrix appears at the bottom of each terminal node.
  • . All the stages are listed and it is up to moderator to write the weights. If the weight is omitted for a given stage that stage receives 0 weight by default. In this example:   stage S1 will be visited with probability 1/3, stage S2 with probability 1/3 and stage S3 with probability 1/3. Stage S4 and end will never be visited. 
  • All the editing features for the transitional matrices corresponds to the explanation for one stage game in a stage game.
Return to the Table of Contents  

 To design a Markov game click on the  stage name rectangle that is by default named  and  should be selected  just like in the picture below where the stage name was changed to "Competitive pricing". 

 

        -    Transitional matrix in a Markov game with only one stage defined

  • When game is defined then transitional matrix appears below each of the terminal nodes. Conditional on the terminal node reached moderator specifies probabilities (weights) that the game is repeated or it ends. See explanation for one stage game for editing features for the transitional matrices.

Return to the Table of Contents

            -    Transitional matrix in a Markov game with only one more than stage defined

  • When game is defined then transitional matrix appears below each of the terminal nodes for the stages that have a Markov type game. Markov game has to be specified for each stage separately. Conditional on the terminal node reached moderator specifies probabilities (weights) that the game is  or it ends. See explanation for one stage game for editing features for the transitional matrices. Below is an example where the last stage (s4) is a stage game and the stages S1 to S3 are specified as Markov games.

 

Return to the Table of Contents

  1. Rearranging Positions of Nodes
To reposition a node  
  • click the mouse on the node that you want to reposition and drag it after the node that you want the node to be placed.

Return to the Table of Contents  
  1. Viewing Node Numbers
Each node is given a number, which allows the instructor to distinguish between nodes when the experiment is conducted, and the data analyzed.  

To view Node numbers, click on the background of the tree editor and at the top of the editor index nodes appears as one of the options. Select   for viewing node numbers.

 

 

  • was selected for viewing the node numbers. 

  • Note that the game can be saved with the node numbers so that players see node numbers while playing the game like in the figure below.

Return to the Table of Contents  
  1. Testing a Game
The test option select Test window

The instructor will be able to observe:  

  1. How players will see the game
  2. Detect possible errors (for example: disconnected tree , proper labeling of move labels)

 

In the Figure below the test game shows that after Nature chose the right node, the seller chose "Offer for Sale".  To select a move, click directly on the rectangle on the tree or at the bottom of the window where a player is prompted to make a choice.

 

 
 
The buyer who has two nodes with the same information state does not know which move was chosen. For example, when he chooses "Yes", it is highlighted on both branches. 

 

 
 
The buyer selected "Yes" in the example below and the results of the game show that the seller earned 2000 in this game, and the buyer ended with 1000.

 

Return to the Table of Contents
 
 
  1. Saving a File
  1. From the File menu, choose Save or Save As if you are the first time saving the game.
  2. In the File name box, type a name of the file. The program saves the tree in the current drive and directory by default with "efg" after the period. 
  3. If you want to save the tree to a different drive or directory, do one of the following: 
    • Select a drive and a directory 
    • Type a file name in a "File name" box 
Choose the Save button.

      4. To save the existing file, select Save.

 

 

 

Return to the Table of Contents  
 
  1. Running an Experiment
To run the experiment follow the procedure described below:
  • Click on File menu and select Open
  • Choose the saved file representing the game you want to run
  • Click on File menu, and select Run Server option.
(i.e. the window with Game Server Properties appears on the screen like the one presented below.)

Return to the Table of Contents  

  1. Determining Session Parameters
Session Identification:  

Provides a box for typing a name for a game if the name was not already specified while designing the game. 

Rounds should be used when you want subjects to play with the same player and with the same role: 

  • For a fixed ending of a game: type the total number of rounds that a game should be repeated in a box named "Fixed" 
  • For a random ending of a game type the probability (i.e. any number in the interval [0,1]) to continue the game to the next round in a box named "Random".
Games should be used if different role/same opponent is selected or same role/different opponents: 
  • For a fixed number of games: type the total number of games that will be played in a box named "Fixed".
  • For a random ending of games: type the probability (i.e. any number in the interval [0,1]) to continue with a new game (i.e. change the assigned roles) 
Start matching players when: 

There are two options for matching players:

  • if is selected then the matching of players will start only after moderator clicks on "Match players now and this will appear only after the Start of the server on a game name window (i.e. in our case a game was named: test game).

 

  • if the option  is selected then the matching automatically starts after the number of people specified connected to the game. In the case 2 subjects have to login before the roles are assigned.

Log File:  

By default efgLog-title of the game.html file appears in the box with the option to append it to the existing file. To change the default name click on Browse.The output file can be read by standard spreadsheet programs (i.e.Excel) 

  • Click   button to start the experiment

 

 

 

 

 

 

The window with the instructor’s computer address appears on the screen like the one below on the page.  
  • Provide this address to players in order for them to connect to the experiment. Note that there are two ways for players to connect to the running game. See the instructions on Players connecting to the experiment.
If the instructor runs several experiments (i.e. games) from the same computer at the same time, the number at the end of the address changes (see the Figures below). 

Return to the Table of Contents  

  1. Experimenter/Instructor Viewing the Game
The instructor can follow the game on the window that opens at the time he starts the game. The windows shows the status of the players. In the left side of the window ( ) the number before slash shows number of connections and the number after the slash shows if a player is connected to the game. 

(it is the name of the game) shows results of the game and the matching of subjects. If a moderator specifies that the matching of the players will be done manually then is the page where the button have to be pressed in order for players to receive roles and start playing the game (see the second Figure below). 

 

  • When you try to close the server window you will be shown  the information about number of running games, active sessions and number of connections.

 

  • To store the game statistics, click on OK. If you select Cancel only data will be stored.

Return to the Table of Contents  

 

  1. Viewing Experimental Results
The output file "EfgLog-game name.html" can be imported into standard spreadsheet program (Excel) and looks like the example below:

Return to the Table of Contents

  1. Instructions to Players given by the Instructor

 

  1. Players Connecting to the Experiment
The following instructions should be given to players:
    Players have two options to connect to the game: 

    1. Open Internet Explorer and write the address:  http://RAMILLER-LT.GSIA.cmu.edu:3235 (the one that is written in the server. Note that players have to write the whole address with "http://"  

          2. Go to http://www.cmu.edu/comlabgames/tree address and click on: The login window like the one below opens. The players write in the location cell the address: RAMILLER-LT.GSIA.cmu.edu:3235. Note that the address in this case does not have "http://".

Return to the Table of Contents  

 

  1. Opening a Game by Players
After connecting to the address given by the instructor, a player login information appears on the screen: 

  • Write a name or ID number in the User name box 
  • Write your institution or affiliation in the Organization box
  • After writing all the necessary information described above click on Start Session to open it. 
Return to the Table of Contents  

 

  1. Waiting for other Players to login
After a player launches the game, the game appears on a player’s screen with the message: "1 of  n players present. Waiting for more" or if the matching by moderator was selected. When a minimum number of players required by the game structure connects to the game (in our example the minimum number of players are two, a seller and a buyer), or in the second option when a moderator decides to match the players,  the players matched for that session can start selecting the moves. 

Return to the Table of Contents  

 

  1. Choosing Moves by Players
When the minimum number of players has been connected to the game, a randomly assigned player’s role appears at the bottom (i.e. in our example , so that a participant knows the role he was assigned to.
The choices appear next to the assigned player’s name or number at the bottom of the window when the player has to make the next move.  

Players make their choices by  

  • clicking on one of the choices presented in the tree or at the bottom of the window, and that choice is highlighted in blue (i.e. In the game tree of Figure below, it is Seller who chooses a first move after Nature. He can choose between "Offer for Sale", and "Stop" by clicking with the mouse on the appropriate choice. If he chooses "Offer for Sale" then it will be a "buyer" who makes the next move. If he chooses "Stop", then the buyer does not make a choice, and the message appears at the bottom showing the payoffs for the players. For that round, and the game.) 

 
  makes the next move and the message appears next to the assigned role (i.e. the choices in our example are "No" and "Yes").
 A player selects a choice by
clicking on one of the available choices, and that choice is highlighted in blue. 

 
When the game ends, the terminal node that is reached is highlighted in blue and the outcome corresponding to that terminal node is shown at the bottom of the window for the players paired for that game. 

 
When the game is over, players will be informed with the message presented in the Figure.

Return to the Table of Contents