Morgan Grant edited this page Sep 18, 2017 · 1 revision

How to Run an Experiment Using a Server and Clients

1. First, place the Client.jar, Control.jar, and lib folders in a networked folder.

This folder must be accessible by the client machines and the server terminal. An example of such a folder is below (we use a Dropbox folder accessible to machines):

2. The lib folder contains all the openGL files needed for the clients and server to run. Having this folder, with the proper files in it, in the shared folder is vital. A screenshot of the contents of the lib folder is below, (however, please don't edit these). .

3. Once the two .jar files and the lib folder are in the networked folder, launch the server by double clicking the Control.jar.

This launches the Control window; the primary interface the experimenter will use to run the experiment.


4. Once the Control.jar is launched, launch the client windows on each networked machine that will be used by subjects. Do this by double clicking the Client.jar (or running a script to this effect).

- How do Clients Connect to the Control Program?

- Note that when you double click on Control.jar, a file named "ip_address.txt" is created in the same directory as the Control.jar file. (on Linux machines, this file is oft deposited into the Home directory). This text file contains the ip address of the computer running the Control.jar program (and nothing else).

- In order for the client program to properly connect to the control program, the Client.jar file opened must be in the same directory as the ip_address.txt file (and that file must contain the correct ip address of the computer running the control program).

- Should there be an error when Client programs on subject terminals try to connect to the control/server program, the error message "Could not connect to server" will appear.

- Common reasons why client programs don't connect to the control server program:

- The control program is not open.

- The ip_address.txt file in the same directory as the Client.jar file does not contain the correct ip address (again, this must be the ip address of the machine running the Control.jar control program).

- Sometimes the machine the control program is being run on will need to adjust its firewall settings in order for client programs to connect.

5. The client window first prompts subjects for their name. The name chosen here will be linked to that player's payoff table (which converts experiment points into dollars) produced at the end of the session - thus remind subjects to use a unique name they will remember.

As subjects enter their name and click "Okay", clients will connect to the server. The experimenter will see this in the Control window. For example below, five clients have connected to the server. The first subject to connect to the server (usually the first to click enter after typing in a username) is labeled Subject 1, they have chosen the name "client_3". The second subject to connect to the server has (quite creatively) chosen the username "client_1".

In order for some games to function correctly, a certain number of subjects should be connected to the ConG server (for example, simple two player Prisoner's Dilemma experiments require an even number of subjects). If subject numbers are important to an experiment, use the ConG Control window to ensure that the correct number of subjects are connected before starting the first period.


6. As subjects connect to the server, the experimenter may load the [wiki:Config]. This file defines the experiment session to be run.

To load the config file, click on the button titled 'Load Period Config', then select the correct configuration file and click Okay.

7. While subjects wait for the the first period (perhaps during instructions), they will see the following window

ConG Client Wait Window

8. To start the experiment, click the 'Start Period' button. The first period sometimes takes several seconds for client terminals to load initially. It should therefore be one of a few practice periods.

The location of the follow buttons/check-boxes are shown in the screenshot below:

- Once started, the "Start Period" button will become the "End Period" button. By pressing the "End Period" button, the period will immediately end.

- The "Pause Period" button will stop the period without ending it. Pausing a period freezes time, and subjects actions are not logged.

- With the "Autostart" checkbox checked, then new periods will automatically start after a 10 seconds. With the Autostart unchecked, when a period ends, a new one will not begin until the experimenter clicks to start it via the "Start Period" button in the control window.

9. As periods progress, you may monitor accumulating subjects points via the control window.

The number "14.57" in the control window screenshot below reflects that subject's accumulating points in that period (Subject 1, with username "client_1"). In the continuous time setting, this number will tick up continuously as the period progresses. In discrete time, this number will tick up in discrete jumps as subperiods progress. The second number, 21.09 in this screen shot, is the total points earned. It ticks up as periods come to an end.

10. 'Paying Subjects. ConG has several options in the control window that assist with paying subjects. Via the "Show Payout Table" in the control window, the experimenter can set a show-up fee, game-points conversion rate, and a threshold above which points are converted into cash.

11. When the experiment is over, you will have five output files. These files are payouts.csv (a log of subject points for each period), Ticks......csv (a time stamped log of experiment data, read more), server & client errors (a list of all error messages produced during the experiment, helpful in identifying issues during a session) and ip_address (the server ip address, used by client programs to connect to the ConG server.

ConG will place these output files next to the Control.jar file that ran the experiment, as seen below.

Linux Users(!): Note that experiments run on Linux machines may place output files in the Home directory.

That is all you need to run an experiment with multiple test subjects. For an example experiment, please see Public Goods, Prisoner's Dilemma, or Hawk Dove.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.