Standard Operating Procedures: Preparing and running an experiment with the Rule Game Server

Updated 2022-10-24 for Game Server ver. 4.003

Preparing the experiment control files

The control files

As discussed in the Rule Game server data guide, a number of files need to be prepared in the server's game data directory in order to control the players' experience during your experiment. (The game data directory on sapir at UWM is /opt/tomcat/game-data. An administrator setting up an instance of Game Server at a host in another institution can choose a different location, and indicate it in the GAME_DATA variable in the master config file).

To summarize, this set of files needed to run an experiment should include, at a minimum:

Since GS 4.*, an alternative way to create experiment plans, known as dynamic experiment plans, has been made available. If you want to create an R:-type dynamic plan, you don't need an experiment plan directory, but you need a modifier file in the modifier directory.

Depending on the design of your experiment, you may also need to create or modify other files:

Using a GitHub repository

One should not try to edit the experiment control files directly in the server's game data directory. Instead, one should follow the procedures outlined in the Deployment SOP (in that document, you only need to look at the sections written on yellow background). In a nutshell:

This procedure ensures that at any point in the future we will have a reliable to see, by examining the repository's history, what set of control files was deployed to the server during any particular experiment.

Checking your math

One of the most complicated parts of the syntax of rule set files is the field which specifies the bucket(s) into which a rule allows game pieces to be put. (See the Bucket expression arithmetic Guide for details). To help you test your arithmetic, we have the Arithmetic test form, which you can use to test your expression, for various values of the built-in variables, before actually using it in a rule.

Validating your plan

Once you have prepared your trial list files, rule set files, and any other data you need, you should validate your experiment plan. Go to the Validate your plan link, and enter the name of your experiment plan. The validation tool will read the trial list files for your experiment, and various other files (rule sets etc) they refer to, and will check them for syntax errors, references to non-existing resources, etc. Please review the validator's report; if any deficiencies are reported, try to correct them, clear the server tables, and validate your plan again.

Testing your plan

One can do this with the GUI client or with the HTML play interface.

If you realize that your rules need to be corrected, and edit your trial list files or rule set files, you should clear the server tables before playing again (with another player ID). This will ensure that the server will remove the earlier version of the rule sets from its memory.

Keeping track of what was done

For any later analysis to be valid, it is important that complete information were kept about the experimental environment, which includes both the control files and the software version.

Configuring the instructions pages

We refer to the sequence of screens shown by the GUI client to a new player as the "instruction booklet". These screens contain information about the rules of game, to the extent we want the player to know them in advance.

The sequence of screens presented to players in GS 1.* thru 3.* (and still available in GS 4.*) is referred to as the "instruction booklet No. 0". As of December 2021, it is expected that Kevin will add to the GUI client the functionality to display different instruction booklets to different players; the choice of the booklet will be controlled by the trial set files.

If the experiment designer decided to create a new instruction booklet to be presented to some players, here are the steps:

  1. Check with Kevin how many booklets exist now. If, for examples, booklets Nos. 0 thru 3 are currently in existence, you may choose to designate your new booklet as No. 4.
  2. In the experiment plan you are designing, indicate that this instruction booklet is to be presented to players assigned to some trial lists. To do that, put the appropriate integer value (in this example, 4) in the column named init of the first data row (= the first parameter set) of these trial lists.
  3. Check in the trial list files to the GitHub repository, in order for them to be auto-deployed to the server (so that Kevin will be able to test your booklet).
  4. Create the pages of your booklet, as JPEG or PNG files, and send them to Kevin, asking him to add them to the GUI application, to be presented as the instruction booklet with the desired number (e.g. 4, in this example).
  5. Kevin will add these image files to the appropriate directory of the client, rebuild the client, deploy it to the server, and inform you of its availability.

Data processing

See the section on exporting data from the Game Srever's SQL tables, and the section on files saved by the Game Server in the Data Guide for guidance on what data are recorded during the experiment, and how they can be extracted from the server.

Appendix: Tips and tricks for rule set development

Editing existing rules is always somewhat problematic. The issue is, even if you have cleared the server tables, the particular player in whose "persona" you are playing already has its own compiled version of the rule set, and it is going to be used for the duration of that player's current series. This means that clearing the tables will affect the players created in the future, but not the players who are currently playing a series of episodes.

This is likely to inconvenience experiment designers who keep modifying the same rule set, testing it again and again. However, there are a number of techniques to go around it. They are described below.

Approach 1

Suppose you like doing your testing from a page such as http://sapir.psych.wisc.edu:7150/w2020-dev/launch/launch-rules-cgs.jsp . In this case, you can do the following:

Approach 2

If you like doing testing through the developers' launch page for the GUI client (or its version with the dev version of the GUI client) , or the HTML Play (or the corresponding URLs on whatever machine you're deploying to), then it's even simpler:
[Main page] [Rule Game Server data guide]