General Purpose Psychology Laboratory
Dr. Robert Goldstone
Psychology Department/Program in Cognitive Science
Indiana University
Introduction
This laboratory is designed to run many different kinds of experiments involving words, pictures, and sounds. The pictures and sounds that you want to use in an experiment are stored in one file that can be accessed using the freeware program "Resedit." A second file has a list of all of the trials that you want to expose to a subject. Each trial is made up of one or more displays, and each display describes what will appear, where it will appear, how long it will appear, what the correct response is to it.
Creating Picture and Sound Files
If you only want to show words and symbols to subjects, then you can skip this section. If you want to show pictures or sounds, you need to create the materials in a program and then combine all of the stimuli together in one "Resedit" file. "Resedit" stands for "Resource Editor" and a resource is just a structure that contains special information such as pictures or sounds. Pictures are stored in a Resedit resource called "PICT" and sounds are stored in a resource called "snd." Each picture or sound has an ID number attached to it. You will need to refer to this number when you want to show the picture or play the sound. Here are the steps you need to take to make a file of pictures:
The same procedure is used for sounds, except that the format of the sound should be "snd," and the sounds will be stored in a "snd" resource rather than a "PICT" resource.
Creating Files of Trials
The bulk of the work in creating an experiment is deciding what will happen on each trial. A simple text file is written by the experimenter and read by the laboratory software. This file contains a description of each trial. It has a very specific format, as shown here:
A number of notes of explanation should be given;
Here is a small file that you should now be able to understand. It runs an experiment testing whether people can judge whether or not something is a word better if it is preceded by a related word.
4
2 y related
word nurse center 0.5
word doctor center 0
2 y unrelated
word wombat center 0.5
word doctor center 0
2 n nonword
word nurse center 0.5
word tordoc center 0
2 n nonword
word wombat center 0.5
word tordoc center 0
More formally, the syntax for the file of trials looks is expressed below. In the following notion, bold words must appear exactly as shown, and options are placed between parentheses with each option surrounded by "<" and ">," and separated by commas such as (<left>, <right>, <up>, <down>):
number of trials
number-of-displays-in-Trial-1, correct-response-key, one-word-category
(<word word-or-phrase (<center>, <random>, <Position x-coordinate y-coordinate>) duration>,
<picture resource-number (<center>, <random>, <Position x-coordinate y-coordinate>) duration>,
<sound resource-number> ,
<blank duration>)
....for each display within Trial 1
number-of-displays-in-Trial-2, correct-response-key, one-word-category
....for each trial.
blank line at end
Setting Up the Experiment
When you select "Trial Details" under the "Set up" menu, you will see a window that looks like:
By changing the options in this window, you can customize various aspects of the exeriment.
Repetitions of each trial: You can present each trial more than one time. This is often done to get more reliable results from an experiment with few trials.
Give Feedback? If you give feedback, then after a subject has made a response, the computer will compare their response to the correct key press stipulated in the file. If the subject gave the correct response, a check appears; otherwise, an "X" appears.
Leave old display on when drawing new? If a trial has more than one displays in it, you can choose to not erase the screen after the first display has been presented. if so, then both displays will appear together.
Blank period between trials. With this option, you can specify in milliseconds (1/1000ths of a second) how much of a pause to give subjects between trials.
Order of displays within trial. If a trial has more than one display, you can either present the displays in the same order that they appear in the file, or you can randomly present the displays.
Trial order. Similarly, trials can be presented in the same order that they appear in the file, or can be presented randomly.
Ranges for random display positions. If the "random" option is specified in a file for the location of an item, then it will appear somewhere within a box around the center of the screen. The horizontal and vertical numbers specify the dimensions of this box. For example, if a horizontal value of 50 is selected, then the item will appear somewhere between the location 25 pixels left of center and 25 pixels right of center.
Prompt string. After all of the displays within a trial have been presented, you can choose to present a prompt string to subjects. The prompt string would typically describe to subjects what their possible response choices are.
Under the "Set up" menu, there is a second menu option entitled "Specify Files." Use this option to define the various files used in the experiment. For all of the files specified here, you can type in names at the keyboard, or use the "Open" button to search for the file that you want.
File of trials. This contains the text file with the trial descriptions. It should be a generic text file, and not, for example, a Microsoft Word file. You can, however, use Microsoft Word to create the file. Just be sure to use the "Save As" command when saving your file, and specify under the "save" options that the file should be a "text only" file.
Resource file of pictures and sounds. This should be a file made in Resedit that contains the picture and sounds that you want to tuse.
File for experimental results. When you finish an experiment, the computer will save your results to the file specified here. In addition, it will show the results on the screen.
Font Menus
There are two menus that control the font style and size of words during the experiment. Changing fonts will only effect word stimuli, not pictures or sounds.
Running the Experiment
To run the experiment, first give your subject the instructions for the experiment, or remind yourself what your task and possible key responses are. Then, simply select "run" under the "experiment" menu. You will be shown all of trials in the specified file of trials, with the number of repetitions specified in the "trial details" window. The repetitions will be completely randomized, such that it is possible to get the same trial twice in a row.
The computer will not allow any key presses that are not the correct key press for at least one of the trials. If you need to abort the experiment before it is finished, press the <Escape> key. During the experiment, the computer will keep track of your responses, measuring response times accurately to the millisecond.
The maximum number of trials described in your file of trials is 200, the maximum number of displays per trial is 10, and the maximum number of categories is 26.
After you are finished running the experiment, you will see your results appear in a window such as:
Results for all Category related items:
Responded with y on 1 trials with an average response time of 0.4976 seconds
Responded with n on 0 trials with an average response time of NaN seconds
Number of correct responses = 1, with an average response time of 0.4976
Number of incorrect responses = 0, with an average response time of NaN
Results for all Category unrelated items:
Responded with y on 1 trials with an average response time of 1.1365 seconds
Responded with n on 0 trials with an average response time of NaN seconds
Number of correct responses = 1, with an average response time of 1.1365
Number of incorrect responses = 0, with an average response time of NaN
Results for all Category nonword items:
Responded with y on 0 trials with an average response time of NaN seconds
Responded with n on 2 trials with an average response time of 1.0966 seconds
Number of correct responses = 2, with an average response time of 1.0966
Number of incorrect responses = 0, with an average response time of NaN
Press <RETURN> to Exit
These results break down your results according to the categories specified in the file of trials. For each category of trials, the computer will tell you how often each different key response was made, with the average response time given for the response. The computer will also break down the results more generally into the number of, and response time for, correct and incorrect responses. If there are no results for a particular type of trial, "Nan" will appear as the response time. In addition to showing your results on a window, the computer will save results in a file name specified by the file of experimental results. When you quit the laboratory, you will also have the option to save your results.