Select Class

These docs have moved here.
Collection: randomizers

Randomizer to allow selection of one (or arbitrary sequence) of defined frames. This is intended to be used either within a Random-parameter-set randomizer with different parameterSets picking out different values for whichFrames) or indirectly via the Exp-frame-select frame (which allows setting whichFrames using a custom generateProperties function). Note that you cannot add a generateProperties function directly to a randomizer!

To use, define a frame with "kind": "choice" and "sampler": "select", as shown below, in addition to the parameters described under 'properties'.

"frames": {
   "select-randomizer-test": {
       "sampler": "select",
       "kind": "choice",
       "whichFrames": 0,
       "commonFrameProperties": {
           "kind": "exp-lookit-text"
       "frameOptions": [
               "blocks": [
                       "emph": true,
                       "text": "Let's think about hippos!",
                       "title": "FRAME 1"
                       "text": "Some more about hippos..."
               "blocks": [
                       "emph": false,
                       "text": "Let's think about dolphins!",
                       "title": "FRAME 2"

Item Index

Data collected




Specific to this element. Defined in app/randomizers/select.js:75

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.



Specific to this element. Defined in app/randomizers/select.js:60

List of frames that can 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'.)



Specific to this element. Defined in app/randomizers/select.js:83

Index or indices (0-indexed) within frameOptions to actually use. This can be either a number (e.g., 0 or 1 to use the first or second option respectively) or an array providing an ordered list of indices to use (e.g., [0, 1] or [1, 0] to use the first then second or second then first options, respectively). All indices must be integers in [0, frameOptions.length).

If not provided or -1, the entire frameOptions list is used in order. (If empty list is provided, however, that is respected and no frames are inserted by this randomizer.)

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 have key 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.


Parameters captured and sent to the server