Permute Class
These docs have moved here.Randomizer to allow random ordering of a list of frames. Intended to be useful for e.g. randomly permuting the order of particular stimuli used during a set of trials (although frames need not be of the same kind to permute).
To use, define a frame with "kind": "choice" and "sampler": "permute", as shown below, in addition to the parameters described under 'properties'.
"frames": {
"test-trials": {
"sampler": "permute",
"kind": "choice",
"commonFrameProperties": {
"showPreviousButton": false
},
"frameOptions": [
{
"blocks": [
{
"emph": true,
"text": "Let's think about hippos!",
"title": "hippos!"
},
{
"text": "Some more about hippos..."
}
],
"kind": "exp-lookit-text"
},
{
"blocks": [
{
"emph": false,
"text": "Let's think about dolphins!",
"title": "dolphins!"
}
],
"kind": "exp-lookit-text"
}
]
}
}
Item Index
Properties
Data collected
Properties
commonFrameProperties
Object
Object describing common parameters to use in EVERY frame created by this randomizer. Parameter names and values are as described in the documentation for the frameType used.
frameOptions
Object[]
List of frames to be created by this randomizer. Each frame is an object with any necessary frame-specific properties specified. The 'kind' of frame can be specified either here (per frame) or in commonFrameProperties. If a property is defined for a given frame both in this frame list and in commonFrameProperties, the value in the frame list will take precedence.
(E.g., you could include 'kind': 'normal-frame' in commmonFrameProperties, but for a single frame in frameOptions, include 'kind': 'special-frame'.)
orderedFrameOptions
Object[]
List of sets of frame properties of the same length as frameOptions. The order
of this list will be preserved; the properties in orderedFrameOptions[0] will be added to the
frame shown first, the properties in orderedFrameOptions[1] will be added to the
frame shown second, etc. Properties are applied in this order:
commonFrameProperties, frameOptions, orderedFrameOptions
so orderedFrameOptions properties will take priority over regular frameOptions.
This allows you to, for instance, do something different during the first or last
trial (e.g., a practice/training trial or a debriefing trial).
If parameterSets
is included as one of the properties in orderedFrameOptions[n],
the values will be added to any parameterSets property on the existing frame
(value-by-value, iterating through corresponding parameterSets)
rather than overwriting the whole property.
Data keys collected
These are the fields that will be captured by this frame and sent back to the Lookit server. Each of these fields will correspond to one row of the CSV frame data for a given response - the row will havekey
set to the data key name, and value
set to the value for this response.
Equivalently, this data will be available in the exp_data
field of the response JSON data.