Tower of Hanoi

From PEBL WIKI
Jump to: navigation, search
A screenshot of PEBL's Tower of Hanoi task.

Contents

[edit] About

[edit] Notes

(Taken from the pebl-list)

The TOH is not as well developed as the Tower of London test, for which there are around 11 different run options. Currently, there is only a random problem generator.

Making a set of new problems is fairly simple. Each problem is defined by a nested list structure, containing five parts. An example of one problem is below:

[[2, 2, 3],  [2, 3, 2], 223, 232, 3]

This specifies [start-configuration, end-configuration, start-ID, end-ID, distance]

The start and end states are lists specifying which disks, from largest to smallest, are on which pegs. So, in the example above, [2,2,3] corresponds to:


    |         |                |
    |      ********            |
    |     **********         *****
======================================

You should be able to specify more or fewer disks.

You can see that the start and end IDs are just the numeric equivalent of the start and end states. These are really only used for output, although they can be used to look up the shortest path between two states.

The final element is the shortest distance. There is code in the script to compute this automatically for 3-disk problems, and if you don't want to bother figuring it out, you can set it to 0 and the script will ignore the code that checks for minimum distance. If you want to ensure people solve it perfectly (or within some tolerance), you can set that to a specific number.

So, to edit the script as-is to a previous stimulus set, write a new function like this:

define MakeMyProblems()
{
    probs <- [ [1,1,1],[2,2,2],111,222,0],
               [1,1,1],[2,2,2],111,222,0],
               [1,1,1],[2,2,2],111,222,0],
               [1,1,1],[2,2,2],111,222,0]]

  return probs  
}

where you replace the [1,1,1] and [2,2,2] with the start and end states, replace the start-end labels, and replace 0 with the distance.

You then need to replace the function where MakeProblems3() (on line 49) was called with a call to this function.

   stim <- MakeMyProblems()

[edit] Options

The following options can be set via the launcher:

  • showhand: (default 1) Whether hand should be shown
  • problemset: (default random3) Which problem set to use. currently random3 or bishop are possible. Random3 generate random 3-disk problems. Bishop uses problems described by Bishop DV1, Aamodt-Leeper G, Creswell C, McGurk R, Skuse DH (2001). Individual differences in cognitive planning on the Tower of Hanoi task: Neuropsychological maturity or measurement error? J Child Psychol Psychiatry. 2001 May;42(4):551-6.
  • numtrials (default 10) number of trials for random sets
  • usetimer (default 0) Whether timer should be used
  • timelimit (default 120) Time limit, in seconds, if time limit is used.
  • useturnlimit (default 0) whether you require the best path

[edit] Data Output

Data are saved in two files, one which provides a click-by-click log (toh-subnum.csv, located in the data\subnum\ directory of the TOH directory), and a summary file that contains one row per trial. The data in the toh-summary-XX.csv provide a summary of each trial (one line per trial), as follows:


 sub,trial,size,shortest,startlab,endlab,startconf,endconf,success,steps,time
 333,1,3,6,221,332,221,332,1,12,18539
 333,2,3,6,333,223,333,223,1,6,10132
 333,3,3,5,131,313,131,313,1,5,9280
 333,4,3,5,112,212,112,212,1,9,18442
 333,5,3,6,121,213,121,213,1,6,9712
 333,6,3,3,233,121,233,121,1,3,4761


Researchers interested in individual differences are typically interested in three things: 1. the mean time to complete the task (the final column), 2. the number of steps needed to complete the task (the steps column), and 3. the number of 'extra' steps needed (steps-shortest, where shortest is the fourth column), and 4. percent of trials in which the shortest path was found.

[edit] References

Kotovsky, K., Hayes, J. R., & Simon, H. A. (1985). Why are some problems hard? Evidence from Tower of Hanoi. Cognitive Psychology, 17(2), 248-294.

[edit] See Also

PEBL Test Battery

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox