About LeverReversals

 Top Next

Purpose

Autoshaping using levers as the CS.

Software requirements

Requires Whisker v2.0 or greater.

Data storage

· Text-based output to disk.
· ODBC data storage to a database (supplied).

Author

Rudolf Cardinal (rudolf@pobox.com).

Copyright

Copyright © Cambridge University Technical Services Ltd

Version history

· v0.1 (10-13 Feb 2005). Written.
· v0.2 (21 Feb 2005). Dialogue box resized. Facility to begin trials on a centralizing nosepoke. Symmetric reward/punishment with multiple responses. Latency to last correct/incorrect response explicitly recorded. "X correct in last Y" reversal criterion fixed so it only counts back trials within the current reversal.
· v1.0 (8 March 2007). Easier compilation for users.
· v2.0 (12 Jan 2009). Server default changed from "loopback" to "localhost" (Windows Vista compatibility and more general standardization).


Required devices

 Top Previous Next

The program requires to claim devices in groups named box0, box1, box2… with device names as listed below in bold:

// Names of lines the program expects to be able to claim

NOSEPOKE // input

LEFTLEVER // input

RIGHTLEVER // input

HOUSELIGHT // output

TRAYLIGHT // output

PUMP // output

DIPPER // output

LEFTLEVERCONTROL // output

RIGHTLEVERCONTROL // output

LEFTLIGHT // output

RIGHTLIGHT // output

PELLET // output

// Aliases used while the program is in full flight, which it therefore expects not to be present on the server:

Please ensure that these devices are available and listed in the device definition file in use by the server.


Using the task

 Top Previous Next

When you run the task, the main screen looks as follows:

You must connect to a Whisker server, claim an operant chamber (box), and set up the parameters for your task. Once that's done, the traffic lights will turn amber. When you are ready, press Start to begin the task.

When the task finishes, it saves data to disk and pops up a new dialogue box for you to select a database to store the data to. (The data sources are configured under Control Panel → ODBC.) If you previously specified an ODBC data source in the parameters, that data source is used automatically and you will only see a dialogue box if something goes wrong and the program needs your input.


Parameters

 Top Previous

The basic task runs as follows:

· Overall structure: trials are separated by intertrial intervals (ITIs).
· In the ITI, the operant chamber is in darkness.
· If the rat is to be required to nosepoke to initiate the trial, then the houselight (and perhaps traylight) will come on in the "pre-trial" state, until the rat nosepokes. A time limit can be set on this stage.
· At the start of the trial itself, the houselight comes on (if it isn't on already) and two levers are extended. A light may also appear (and perhaps flash) above one or other of the levers.
· The rat has to select the correct lever. This is either determined spatially ("the left lever is always correct" or "the right lever is always correct") or with reference to the light ("the lever on the same side of the light is always correct" or "the lever on the opposite side as the light is always correct"). The rat must discover this.
· Once the rat has made a certain (user-specifiable) number of responses on the correct lever, it is rewarded (and the houselight will stay on for a while, and the traylight in the food alcove may also come on). Optionally, if it makes a response on the incorrect lever, or takes too long, it loses and the trial finishes.
· To make things harder, the rat can be reinforced probabilistically (i.e. the probability of reward given that it does the right thing, or of reward given that it does the wrong thing) can also be set manually.
· Overall trial number limits or session time limits can be set.
· There is an option to select the correct response location pseudorandomly (so that there's a guarantee of equal number of left/right trials (in the case of the "same or opposite side as the light" task), or so the irrelevant distractor light (for the "spatial plus distractor light" task) appears equally left/right. This is done by drawing left/right locations "without replacement" from a list of a user-specified size. If the user specifies a value ("multiplier") of 1, then the list starts off by containing the values {Left, Right}. One is picked at random, without replacement, for each trial - so in every two trials, there's be one Left trial and one Right trial. If the multiplier was 3, then in every 6 trials there'd be guaranteed to be 3 Left and 3 Right trials, and so on. The larger the multiplier, the closer this pseudorandom behaviour is to genuinely random selection (in which there's no way for the subject to predict what's coming next, but there's always the possibility of very long sequences of, for example, Left trials).
· This is a reversal task... so the experimenter can reverse subjects by hand (between sessions) by choosing whether the Left or Right response (in the case of the spatial task) or the Same or Opposite response (in the case of the light-tracking task) is correct at the start of each session. But there's also an option for within-session reversal, in which case the reversal can occur automatically when X trials within at most the last Y trials have been performed correctly by the subject.

The parameters dialogue box looks like this:

To pick an ODBC database in advance of finishing, click Pick and you will be offered the ODBC Data Source picker (below). Your choice will be recorded and will apply to this subject from now on (or until you specify a different source).

If you don't specify an ODBC data source now, or you delete the value in the "ODBC data source name" box, you'll be asked to choose when the task ends (and that choice will only apply to the session in progress).