2. EML → Rendering

EML (Experiment Markup Language) is the static contract consumed by CogGym. It specifies exactly which instructions and trials exist, how they are sequenced, what the participant sees, what responses are collected, and what optional feedback follows a trial.

Scope of this page: this page begins with a complete EML package and ends with the rendered participant experience. It does not define how primitives or Python produce that package.

2.1. Rendering Pipeline

Static EML configuration, instruction, and trial files enter the CogGym renderer, which presents instruction and trial screens, shows optional feedback, and records responses.

The renderer depends only on the materialized EML package, regardless of how that package was authored.

  1. Select a sequence. The renderer reads config.json and selects an explicit seq_id from experimentFlow.
  2. Resolve each component. Instruction IDs are loaded from instruction.jsonl; trial IDs are loaded from trial.jsonl.
  3. Render the interaction. The renderer presents instructions or trial stimuli, creates the specified query controls, and validates required responses.
  4. Complete the trial. After submission, the renderer may present the trial's feedback behavior and then advances through the explicit sequence.
  5. Record lineage. Responses retain the concrete trial ID, query tag, and selected sequence ID.
Runtime boundary: no primitive model card, Python function, build manifest, or generation recipe is evaluated here. Those concepts belong exclusively to 3. Generating EML from Primitives.

2.2. The EML Package

Overview of the EML package and its experiment components.
LayerFilesRole
Runtime EMLconfig.json, trial.jsonl, instruction.jsonl, assets/Defines metadata, explicit experiment flow, instructions, stimuli, queries, and optional static feedback consumed by the renderer.
Documentation and provenanceREADME.md, optional build_provenance.jsonExplains the experiment and, for generated packages, records the compiler, source hashes, primitive cards, and generated IDs.
Data and reference outputsHuman data, ground truth, replication data, optional symbolic representationsStores collected or reference information associated with concrete EML trial IDs and query tags; these files are not renderer inputs.

The detailed runtime schemas are organized by responsibility:

2.3. Directory Structure

Each dataset is contained in one root directory. A study may have multiple experiments, each in its own exp1, exp2, or subsequent subdirectory. Even a single-experiment study uses an exp1 subdirectory. The study and each experiment include a narrative README.md.

[DatasetName]/
├── README.md
├── exp1/
│   ├── README.md
│   ├── config.json
│   ├── trial.jsonl
│   ├── instruction.jsonl
│   ├── human_data_ind.json
│   ├── human_data_mean.json
│   ├── build_provenance.json      # generated packages only
│   └── assets/                    # when non-text stimuli are used
│       ├── stimulus_image_01.png
│       ├── stimulus_video_01.mp4
│       └── ...
└── exp2/                          # optional additional experiment
    ├── README.md
    ├── config.json
    ├── trial.jsonl
    └── ...

2.4. Naming Convention

The root folder name follows [AuthorLastName][Year][FirstNonArticleWordOfTitle]:

For “A Minimal Theory of Mind for Social Agents” (Rabinowitz et al., 2018), the root directory is Rabinowitz2018Minimal/, containing at least exp1/.

2.5. File Inventory

Renderer inputs

Documentation and build records

Data and reference files

2.6. Field-level Schema Pages

Use the following pages for field-level definitions and examples:

PageDefines
Config SchemaExperiment metadata, layout, conditions, sequences, blocks, and explicit component IDs.
Trial SchemaTrial IDs, stimuli, query controls, static feedback, and optional delay.
Instruction SchemaInstruction screens, examples, demonstrations, and comprehension checks.
Human Data SchemaIndividual and aggregate response files, ground truth, and replication data.
AppendixExtended examples, media details, controls, and optional symbolic representation.