{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "Grid Memory version 0.8.34, 38a5862e",
  "type": "object",
  "description": "All game schemas",
  "properties": {
    "GameParameters": {
      "type": "object",
      "description": "Game parameters schema",
      "properties": {
        "number_of_dots": {
          "type": "integer",
          "default": 3,
          "description": "Number of dots to present."
        },
        "preparation_duration_ms": {
          "type": "number",
          "default": 500,
          "description": "How long the 'get ready' message before each trial is shown, milliseconds."
        },
        "blank_grid_duration_ms": {
          "type": "number",
          "default": 500,
          "description": "How long a blank grid is shown before the dots appear, milliseconds."
        },
        "interference_duration_ms": {
          "type": "number",
          "default": 8000,
          "description": "How long the grid of interference targets is shown, milliseconds."
        },
        "interference_transition_animation": {
          "type": "boolean",
          "default": true,
          "description": "Should the transitions between dot presentation, interference, and recall be animated slide transitions?"
        },
        "dot_present_duration_ms": {
          "type": "number",
          "default": 3000,
          "description": "How long the dots are shown, milliseconds."
        },
        "number_of_interference_targets": {
          "type": "integer",
          "default": 5,
          "description": "How many targets to show in the interference phase."
        },
        "number_of_trials": {
          "type": "integer",
          "default": 4,
          "description": "How many trials to run."
        },
        "show_trials_complete_scene": {
          "default": true,
          "type": "boolean",
          "description": "After the final trial, should a completion scene be shown? Otherwise, the game will immediately end."
        },
        "instruction_type": {
          "type": "string",
          "default": "long",
          "description": "Type of instructions to show, 'short' or 'long'."
        },
        "instructions": {
          "default": null,
          "type": [
            "object",
            "null"
          ],
          "description": "When non-null, an InstructionsOptions object that will completely override the built-in instructions."
        },
        "show_quit_button": {
          "type": "boolean",
          "default": false,
          "description": "Should the activity quit button be shown?"
        },
        "show_fps": {
          "type": "boolean",
          "default": false,
          "description": "Should the FPS be shown?"
        },
        "show_locale_picker": {
          "type": "boolean",
          "default": false,
          "description": "Should the icon that allows the participant to switch the locale be shown?"
        },
        "scoring": {
          "type": "boolean",
          "default": false,
          "description": "Should scoring data be generated? Default is false."
        },
        "seed": {
          "type": [
            "string",
            "null"
          ],
          "default": null,
          "description": "Optional seed for the seeded pseudo-random number generator. When null, the default Math.random() is used."
        }
      }
    },
    "TrialSchema": {
      "type": "object",
      "description": "Trial data schema",
      "properties": {
        "data_type": {
          "type": "string",
          "description": "Type of data."
        },
        "study_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The short human-readable text ID of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
        },
        "study_uuid": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Unique identifier of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
        },
        "document_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for this data document."
        },
        "session_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for all activities in this administration of the session. This identifier changes each time a new session starts."
        },
        "activity_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for all trials in this administration of the activity. This identifier changes each time the activity starts."
        },
        "activity_id": {
          "type": "string",
          "description": "Human-readable identifier of the activity."
        },
        "activity_publish_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Persistent unique identifier of the activity. This identifier never changes. It can be used to identify the activity across different studies and sessions."
        },
        "activity_version": {
          "type": "string",
          "description": "Version of the activity."
        },
        "device_timezone": {
          "type": "string",
          "description": "Timezone of the device. Calculated from Intl.DateTimeFormat().resolvedOptions().timeZone."
        },
        "device_timezone_offset_minutes": {
          "type": "integer",
          "description": "Difference in minutes between UTC and device timezone. Calculated from Date.getTimezoneOffset()."
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "description": "Locale of the trial. null if the activity does not support localization."
        },
        "activity_begin_iso8601_timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp at the beginning of the game activity."
        },
        "trial_begin_iso8601_timestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped."
        },
        "trial_end_iso8601_timestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "ISO 8601 timestamp at the end of the trial (when user presses 'Done' after placing the three objects). Null if trial was skipped."
        },
        "trial_index": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Index of the trial within this assessment, 0-based."
        },
        "response_time_duration_ms": {
          "type": [
            "number",
            "null"
          ],
          "description": "Milliseconds from the when the empty grid is shown in the recall phase until the user has placed all dots and taps the done button. Null if trial was skipped."
        },
        "presented_cells": {
          "type": [
            "array",
            "null"
          ],
          "description": "Randomly chosen locations of the dots presented to the user. Null if trial was skipped.",
          "items": {
            "type": "object",
            "properties": {
              "row": {
                "type": "integer",
                "description": "Row of the cell, 0-indexed."
              },
              "column": {
                "type": "integer",
                "description": "Column of the cell, 0-indexed."
              }
            }
          }
        },
        "selected_cells": {
          "type": [
            "array",
            "null"
          ],
          "description": "User selected locations of the dots. Null if trial was skipped.",
          "items": {
            "type": "object",
            "properties": {
              "row": {
                "type": "integer",
                "description": "Row of the cell, 0-indexed."
              },
              "column": {
                "type": "integer",
                "description": "Column of the cell, 0-indexed."
              }
            }
          }
        },
        "user_dot_actions": {
          "type": [
            "array",
            "null"
          ],
          "description": "Complete user dot actions: placement, removal, and done. Null if trial was skipped.",
          "items": {
            "type": "object",
            "properties": {
              "elapsed_duration_ms": {
                "type": "number",
                "description": "Duration, milliseconds, from when dot recall scene fully appeared until this user action."
              },
              "action_type": {
                "type": "string",
                "enum": [
                  "placed",
                  "removed",
                  "done"
                ],
                "description": "Was the action a dot placement, dot removal, or done button push?"
              },
              "cell": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Cell of user action; null if non-applicable (user action was done button push).",
                "properties": {
                  "row": {
                    "type": "integer",
                    "description": "Row of the cell, 0-indexed."
                  },
                  "column": {
                    "type": "integer",
                    "description": "Column of the cell, 0-indexed."
                  },
                  "tap_x": {
                    "type": "number",
                    "description": "X coordinate of user's tap on the cell, relative to the cell."
                  },
                  "tap_y": {
                    "type": "number",
                    "description": "Y coordinate of user's tap on the cell, relative to the cell."
                  }
                }
              }
            }
          }
        },
        "user_interference_actions": {
          "type": [
            "array",
            "null"
          ],
          "description": "User actions tapping the interference targets. Null if trial was skipped.",
          "items": {
            "type": "object",
            "properties": {
              "elapsed_duration_ms": {
                "type": "number",
                "description": "Duration, milliseconds, from when interference scene fully appeared until this user action."
              },
              "action_type": {
                "type": "string",
                "enum": [
                  "on-target",
                  "off-target"
                ],
                "description": "Was the action on an interference target or off?"
              },
              "cell": {
                "type": "object",
                "description": "Cell of user interference action.",
                "properties": {
                  "row": {
                    "type": "integer",
                    "description": "Row of the cell, 0-indexed."
                  },
                  "column": {
                    "type": "integer",
                    "description": "Column of the cell, 0-indexed."
                  },
                  "tap_x": {
                    "type": "number",
                    "description": "X coordinate of user's tap on the cell, relative to the cell."
                  },
                  "tap_y": {
                    "type": "number",
                    "description": "Y coordinate of user's tap on the cell, relative to the cell."
                  }
                }
              }
            }
          }
        },
        "number_of_correct_dots": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Number of dots that were correctly placed. Null if trial was skipped."
        },
        "quit_button_pressed": {
          "type": "boolean",
          "description": "Was the quit button pressed?"
        }
      }
    },
    "ScoringSchema": {
      "type": "object",
      "description": "Scoring data schema",
      "properties": {
        "data_type": {
          "type": "string",
          "description": "Type of data."
        },
        "study_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The short human-readable text ID of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
        },
        "study_uuid": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Unique identifier of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
        },
        "document_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for this data document."
        },
        "session_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for all activities in this administration of the session. This identifier changes each time a new session starts."
        },
        "activity_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for all trials in this administration of the activity. This identifier changes each time the activity starts."
        },
        "activity_id": {
          "type": "string",
          "description": "Human-readable identifier of the activity."
        },
        "activity_publish_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Persistent unique identifier of the activity. This identifier never changes. It can be used to identify the activity across different studies and sessions."
        },
        "activity_version": {
          "type": "string",
          "description": "Version of the activity."
        },
        "device_timezone": {
          "type": "string",
          "description": "Timezone of the device. Calculated from Intl.DateTimeFormat().resolvedOptions().timeZone."
        },
        "device_timezone_offset_minutes": {
          "type": "integer",
          "description": "Difference in minutes between UTC and device timezone. Calculated from Date.getTimezoneOffset()."
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "description": "Locale of the trial. null if the activity does not support localization."
        },
        "activity_begin_iso8601_timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp at the beginning of the game activity."
        },
        "first_trial_begin_iso8601_timestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "ISO 8601 timestamp at the beginning of the first trial. Null if no trials were completed."
        },
        "last_trial_end_iso8601_timestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "ISO 8601 timestamp at the end of the last trial. Null if no trials were completed."
        },
        "n_trials": {
          "type": "integer",
          "description": "Number of trials completed."
        },
        "n_trials_exact_targets": {
          "type": "integer",
          "description": "Number of trials in which the user selected the exact target cells without error."
        },
        "flag_trials_match_expected": {
          "type": "integer",
          "description": "Does the number of completed and expected trials match? 1 = true, 0 = false."
        },
        "flag_trials_lt_expected": {
          "type": "number",
          "description": "Is the number of completed trials fewer than expected? 1 = true, 0 = false."
        },
        "flag_trials_gt_expected": {
          "type": "number",
          "description": "Is the number of completed trials greater than expected? 1 = true, 0 = false."
        },
        "sum_exact_targets": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Sum of the number of exact targets across all trials. An exact target is a target that was selected in the correct location."
        },
        "percent_exact_targets": {
          "type": [
            "number",
            "null"
          ],
          "description": "Percent of exact targets out of all targets across all trials. An exact target is a target that was selected in the correct location."
        },
        "metric_error_distance_hausdorff_mean": {
          "type": [
            "number",
            "null"
          ],
          "description": "Mean of Hausdorff distance scores across all trials in the session"
        },
        "metric_error_distance_hausdorff_median": {
          "type": [
            "number",
            "null"
          ],
          "description": "Median of Hausdorff distance scores across all trials in the session"
        },
        "metric_error_distance_hausdorff_min": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum Hausdorff distance score across all trials in the session (best performance)"
        },
        "metric_error_distance_hausdorff_max": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum Hausdorff distance score across all trials in the session (worst performance)"
        },
        "metric_error_distance_hausdorff_sum": {
          "type": [
            "number",
            "null"
          ],
          "description": "Sum of Hausdorff distance scores across all trials in the session"
        },
        "metric_error_distance_hausdorff_std": {
          "type": [
            "number",
            "null"
          ],
          "description": "Standard deviation of Hausdorff distance scores across all trials in the session"
        }
      }
    }
  }
}