# Protocol files

BITTSy works on the basis of [protocol files](/bittsy/bittsy-basics/protocol-files.md). A protocol file is basically the instruction set for that particular experiment or experimental session. The protocol file instructs the program on what stimuli to play, when to play them, how many trials should occur, how they should be randomized, etc.&#x20;

A protocol file can be made up of multiple [**phases**](/bittsy/creating-protocols/phases-trials-and-steps.md#phases), or sub-sections; each phase can be made up of multiple individual trials. Generally, you would want to create different phases if you were changing stimulus sets (e.g., a training phase vs. a testing phase), or changing paradigm (e.g., a habituation phase followed by a preferential looking phase). Each phase can essentially work akin to an entirely separate experiment.&#x20;

The [**trials**](/bittsy/creating-protocols/phases-trials-and-steps.md#trials) within a phase can be entirely distinct, if each trial is set up as a single, specified, set of events, but typically trials share similarity within one another (e.g. 12 trials that each present one of a set of stimuli in random order, but have the same timing structure). BITTSy is entirely flexible with regards to this, however. A protocol file could list every event individually, and be specific for a single participant - but it is far more efficient to create protocol files that select from a set of items and repeat types of trials where the same trial structure is reused.

The flexibility that BITTSy provides does come with a bit of a cost - you need to specify a lot more detail than would be needed in a computer program that restricted you to fewer options. As a result, protocol files can get rather long, and are essentially similar in many ways to programming. However, once a template has been created for an experiment/paradigm it is very easy to modify it by swapping out the file names, reordering them in groups, changing the restrictions on action clauses, etc. We thus provide some [sample protocol files](/bittsy/support/resources.md#study-example-protocols), and would recommend creating new ones by making adjustments to existing protocol files rather than by starting from scratch each time.  Moreover, we have worked to make the protocol files, and the commands embedded within them, highly intuitive - even a novice student researcher should be able to read a protocol file and understand what is happening at each point in the experiment.

To create and edit protocol files, we recommend using [**Notepad ++**](https://notepad-plus-plus.org/). This application includes a side bar that numbers each line of the protocol, making it easier to go back and make changes based on any error messages that BITTSy may present.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ldevumd.gitbook.io/bittsy/bittsy-basics/protocol-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
