<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jchuang</id>
	<title>BCI2000 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jchuang"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php/Special:Contributions/Jchuang"/>
	<updated>2026-11-22T12:50:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12651</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12651"/>
		<updated>2026-10-08T22:18:02Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Running the task and resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: The &amp;lt;code&amp;gt;cifar&amp;lt;/code&amp;gt; folder contains BMP category images, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; contains feedback WAVs, and &amp;lt;code&amp;gt;guided&amp;lt;/code&amp;gt; contains videos/instructions. Match resource paths to the loaded parameters. Task-specific category IDs are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
For background on CIFAR, see the [https://www.cs.toronto.edu/~kriz/cifar.html CIFAR-10 and CIFAR-100 dataset page].&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12650</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12650"/>
		<updated>2026-10-08T22:14:03Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12649</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12649"/>
		<updated>2026-10-08T22:03:35Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Practice and Association Switching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12648</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12648"/>
		<updated>2026-10-08T22:03:24Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Practice and Association Switching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12647</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12647"/>
		<updated>2026-10-08T22:02:56Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Session Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12646</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12646"/>
		<updated>2026-10-08T22:02:46Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12645</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12645"/>
		<updated>2026-10-08T22:02:33Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Single-Trial Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12644</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12644"/>
		<updated>2026-10-08T22:01:13Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12643</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12643"/>
		<updated>2026-10-08T22:00:04Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Breaks, completion and controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
A round comprises trials under one association and is completed when the accuracy criterion is met. The listed settings specify two scheduled breaks and a cap of 450 main-task trials. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12642</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12642"/>
		<updated>2026-10-08T21:55:38Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|500px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12641</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12641"/>
		<updated>2026-10-08T21:52:58Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Versioning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12640</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12640"/>
		<updated>2026-10-08T21:51:31Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Session Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12639</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12639"/>
		<updated>2026-10-08T21:51:20Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Single-Trial Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12638</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12638"/>
		<updated>2026-10-08T21:50:49Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both; height: 24px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12637</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12637"/>
		<updated>2026-10-08T21:48:44Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|700px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12636</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12636"/>
		<updated>2026-10-08T21:48:33Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|600px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12635</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12635"/>
		<updated>2026-10-08T21:48:16Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|550px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12634</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12634"/>
		<updated>2026-10-08T21:47:56Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Single-Trial Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|600px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|600px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12633</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12633"/>
		<updated>2026-10-08T21:47:46Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Visual Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|600px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12632</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12632"/>
		<updated>2026-10-08T21:47:18Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Session Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|600px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12631</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12631"/>
		<updated>2026-10-08T21:46:57Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Session Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|720px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12630</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12630"/>
		<updated>2026-10-08T21:43:34Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Synopsis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things, and adapts those associations when the uncertain environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12629</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12629"/>
		<updated>2026-10-08T21:41:51Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things and adapts those associations when the environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided session flow. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task display, uniformly reduced. Figures 2 and 3 were captured from the standalone C++ task using the supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Display settings in the documented configuration: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Single-trial sequence and requested timings for the listed configuration; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
The fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Practice stage !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
With the listed settings, the accuracy threshold is 70% over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. Performance is evaluated after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. Association selection balances exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The listed settings specify two scheduled breaks and a 450-main-trial cap. The round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The values below describe a recorded task configuration, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Value: 15 trials. Number of trials in the rolling accuracy window, which restarts after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Value: 20 percentage points. Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Value: 2. Number of scheduled breaks in the documented configuration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Value: 0. Automatic refresh-rate detection is disabled. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The documented setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The supplied package places resources under tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. Selected states for identifying the main events and outcomes are listed below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang. Behavior, controls and state meanings follow the inspected C++ source (protocol 6.0); Figures 2 and 3 use its standalone renderer. Parameter values come from a recorded configuration declaring ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. These sources do not verify the currently installed hospital build.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12628</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12628"/>
		<updated>2026-10-08T21:36:15Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* Versioning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things and adapts those associations when the environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
Documentation scope: Behavior and screen examples follow the available protocol 6.0 reference. Parameter values come from a recorded protocol 6.2 configuration, not the defaults of every installed build.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided preparation in the reference task. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full reference task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task canvas, uniformly reduced. Figures 2-3 use the protocol 6.0 C++ task with the standalone renderer and supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Recorded display settings: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Requested timings in the recorded protocol 6.2 profile; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
In the reference task, the fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reference practice !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the reference task, the initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile uses a 70% accuracy threshold over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. The reference task evaluates after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. The reference task balances association exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile specifies two scheduled breaks and a 450-main-trial cap. Its round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Reference controls: Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Values are from the recorded protocol 6.2 profile, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 15 trials. Number of trials in the rolling accuracy window. The reference task restarts the window after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 20 percentage points. In the reference sampler, the Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 2. Number of scheduled breaks in the recorded 6.2 profile.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. Automatic refresh-rate detection is disabled in the recorded profile. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The reference setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The reference resource location is tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. The following fields identify the main events and outcomes; they are a selected reference, not the full schema.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: Jiancao Huang (JC Huang). Recorded declarations: ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. Reference source and visual examples use protocol 6.0.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12627</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12627"/>
		<updated>2026-10-08T21:35:07Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* The association, not the individual picture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things and adapts those associations when the environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
Documentation scope: Behavior and screen examples follow the available protocol 6.0 reference. Parameter values come from a recorded protocol 6.2 configuration, not the defaults of every installed build.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided preparation in the reference task. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full reference task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task canvas, uniformly reduced. Figures 2-3 use the protocol 6.0 C++ task with the standalone renderer and supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Recorded display settings: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Requested timings in the recorded protocol 6.2 profile; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
In the reference task, the fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reference practice !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the reference task, the initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile uses a 70% accuracy threshold over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. The reference task evaluates after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. The reference task balances association exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile specifies two scheduled breaks and a 450-main-trial cap. Its round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Reference controls: Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Values are from the recorded protocol 6.2 profile, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 15 trials. Number of trials in the rolling accuracy window. The reference task restarts the window after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 20 percentage points. In the reference sampler, the Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 2. Number of scheduled breaks in the recorded 6.2 profile.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. Automatic refresh-rate detection is disabled in the recorded profile. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The reference setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The reference resource location is tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. The following fields identify the main events and outcomes; they are a selected reference, not the full schema.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: JCH. Recorded declarations: ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. Reference source and visual examples use protocol 6.0.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12626</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12626"/>
		<updated>2026-10-08T21:34:11Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: /* The association, not the individual picture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things and adapts those associations when the environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
Documentation scope: Behavior and screen examples follow the available protocol 6.0 reference. Parameter values come from a recorded protocol 6.2 configuration, not the defaults of every installed build.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto; text-align: center;&amp;quot;! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided preparation in the reference task. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full reference task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task canvas, uniformly reduced. Figures 2-3 use the protocol 6.0 C++ task with the standalone renderer and supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Recorded display settings: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Requested timings in the recorded protocol 6.2 profile; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
In the reference task, the fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reference practice !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the reference task, the initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile uses a 70% accuracy threshold over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. The reference task evaluates after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. The reference task balances association exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile specifies two scheduled breaks and a 450-main-trial cap. Its round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Reference controls: Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Values are from the recorded protocol 6.2 profile, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 15 trials. Number of trials in the rolling accuracy window. The reference task restarts the window after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 20 percentage points. In the reference sampler, the Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 2. Number of scheduled breaks in the recorded 6.2 profile.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. Automatic refresh-rate detection is disabled in the recorded profile. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The reference setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The reference resource location is tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. The following fields identify the main events and outcomes; they are a selected reference, not the full schema.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: JCH. Recorded declarations: ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. Reference source and visual examples use protocol 6.0.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Reference_Stimulus_Details.png&amp;diff=12625</id>
		<title>File:HAT Reference Stimulus Details.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Reference_Stimulus_Details.png&amp;diff=12625"/>
		<updated>2026-10-08T21:32:25Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: Enlarged views of the dot cloud, category choices and held selection from one reference HAT trial. Prepared by JCH.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Enlarged views of the dot cloud, category choices and held selection from one reference HAT trial. Prepared by JCH.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Reference_Task_Display.png&amp;diff=12624</id>
		<title>File:HAT Reference Task Display.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Reference_Task_Display.png&amp;diff=12624"/>
		<updated>2026-10-08T21:31:38Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: Full reference display for the Human Association Task (HAT), captured using the protocol 6.0 standalone renderer. Prepared by JCH.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Full reference display for the Human Association Task (HAT), captured using the protocol 6.0 standalone renderer. Prepared by JCH.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Trial_Timeline.png&amp;diff=12623</id>
		<title>File:HAT Trial Timeline.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Trial_Timeline.png&amp;diff=12623"/>
		<updated>2026-10-08T21:30:54Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: Single-trial sequence and requested timings for the Human Association Task (HAT). Diagram by JCH.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Single-trial sequence and requested timings for the Human Association Task (HAT). Diagram by JCH.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Session_Flow.png&amp;diff=12622</id>
		<title>File:HAT Session Flow.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:HAT_Session_Flow.png&amp;diff=12622"/>
		<updated>2026-10-08T21:28:57Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: Guided session flow for the Human Association Task (HAT). Diagram by JCH.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Guided session flow for the Human Association Task (HAT). Diagram by JCH.&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12621</id>
		<title>Contributions:Human Association Task (HAT)</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Human_Association_Task_(HAT)&amp;diff=12621"/>
		<updated>2026-10-08T21:26:34Z</updated>

		<summary type="html">&lt;p&gt;Jchuang: Create HumanAssociationTask documentation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
HAT studies how the brain forms mental associations between things and adapts those associations when the environment changes. It combines uncertain sensory evidence, a brief memory delay and learning from feedback, allowing these processes to be studied during iEEG recording.&lt;br /&gt;
&lt;br /&gt;
Participants judge whether a moving dot cloud contains more red or blue dots. After a delay, they choose a car, dog or tree image using the current color-category association; feedback helps them discover when that association has changed.&lt;br /&gt;
&lt;br /&gt;
Documentation scope: Behavior and screen examples follow the available protocol 6.0 reference. Parameter values come from a recorded protocol 6.2 configuration, not the defaults of every installed build.&lt;br /&gt;
&lt;br /&gt;
=== The association, not the individual picture ===&lt;br /&gt;
&lt;br /&gt;
The initial association is red-car / blue-dog: more red dots means choose the car; more blue dots means choose the dog. Images and their positions vary across trials. The three possible associations are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Association !! Red !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Initial || Car || Dog&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Dog || Tree&lt;br /&gt;
|-&lt;br /&gt;
| Alternative || Tree || Car&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Session Flow ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Session_Flow.png|thumb|center|900px|alt=Guided session in order: Video 1 then basic association practice; Video 2 then switch practice with an announcement and then without one; Video 3 then the main task with scheduled breaks, followed by completion.|Figure 1. Guided preparation in the reference task. Basic practice can be repeated. In the main task, association changes are not announced.]]&lt;br /&gt;
&lt;br /&gt;
An on-screen association hint supports the start of unannounced practice and the main task, then fades. Participants continue using feedback to guide their choices.&lt;br /&gt;
&lt;br /&gt;
== Visual Representation ==&lt;br /&gt;
&lt;br /&gt;
Participants view a gray screen with stimuli near the center. At choice onset, one image from each category appears; the Up, Left and Right arrow keys select the corresponding screen position.&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Task_Display.png|thumb|center|900px|alt=Full reference task frame at choice onset. Tree is above, car is lower left and dog is lower right near screen center. A photodiode patch is at the left edge and the Shift pause label is at bottom right.|Figure 2. Full task canvas, uniformly reduced. Figures 2-3 use the protocol 6.0 C++ task with the standalone renderer and supplied 256 x 256-pixel images. The white edge patch is a timing marker.]]&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Reference_Stimulus_Details.png|thumb|center|900px|alt=Three equal central crops from the same trial: a red-majority dot cloud, three category choices, and an enlarged car image while the left response is held.|Figure 3. Enlarged views from one trial, using identical central crop bounds and magnification. Dots disappear before choices appear. Holding a response key enlarges that image; no elements have been repositioned.]]&lt;br /&gt;
&lt;br /&gt;
Recorded display settings: 452 dots; red RGB [199, 72, 50], blue RGB [77, 123, 161]. ImageSizePixels = 70 and SelectedImageScale = 1.5 give a 70-pixel base image and a 105-pixel selected image. Source-image resolution is separate from on-screen size.&lt;br /&gt;
&lt;br /&gt;
== Single-Trial Timeline ==&lt;br /&gt;
&lt;br /&gt;
[[File:HAT_Trial_Timeline.png|thumb|center|900px|alt=Trial order and requested timings: fixation 500 ms; moving dots 500 ms; delay 1600 ms; choice up to 5000 ms; confirmed choice 150 ms; intertrial interval 900 to 1100 ms. A 100 ms response hold occurs inside the choice window.|Figure 4. Requested timings in the recorded protocol 6.2 profile; boxes are not to time scale. The 100 ms key hold occurs within the choice window.]]&lt;br /&gt;
&lt;br /&gt;
In the reference task, the fixation marker remains during the delay. With the listed settings, a confirmed choice stays visible for 150 ms, followed by the intertrial interval (ITI). Correct and incorrect responses request distinct feedback sounds at ITI entry; a timeout skips confirmation and receives no feedback sound.&lt;br /&gt;
&lt;br /&gt;
== Practice and Association Switching ==&lt;br /&gt;
&lt;br /&gt;
Both switch exercises start with red-car / blue-dog.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reference practice !! Progression&lt;br /&gt;
|-&lt;br /&gt;
| After Video 1 || Red-car / blue-dog; finish after 7 correct responses in total.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: announced change || 5 correct in total, then red-tree / blue-car with a New association notice; finish after 6 consecutive correct.&lt;br /&gt;
|-&lt;br /&gt;
| After Video 2: unannounced change || 5 correct in total and initial hint fade complete, then red-tree / blue-car without a change notice; finish after 6 consecutive correct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the reference task, the initial hint begins fading during ITI after 2 consecutive correct responses in unannounced practice and the main task. Errors and timeouts reset streaks, but preserve total correct counts. Stage changes follow ITI. Practice does not count toward the main-task limit.&lt;br /&gt;
&lt;br /&gt;
=== Main-task criterion ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile uses a 70% accuracy threshold over a rolling window of 15 trials, requiring at least 11 correct responses; they need not be consecutive. The reference task evaluates after each completed trial once 15 trials are available within the current association. Timeouts count as incorrect. If the criterion is met and the session continues, the next trial uses a new association and the window starts again.&lt;br /&gt;
&lt;br /&gt;
Color coherence is the percentage of dots in the more common color. Values near 50% are harder to judge, so an error can reflect color uncertainty as well as an association change. The reference task balances association exposure rather than following a fixed cycle.&lt;br /&gt;
&lt;br /&gt;
=== Breaks, completion and controls ===&lt;br /&gt;
&lt;br /&gt;
The recorded profile specifies two scheduled breaks and a 450-main-trial cap. Its round target counts completed rounds after the initial association, not simply the number of switches. The task ends at the configured target or cap; staff may stop earlier.&lt;br /&gt;
&lt;br /&gt;
Reference controls: Space continues instruction and break pages; C repeats basic practice from its repeat page. Shift pauses the task. Release it, then press and release Shift again to resume. During dots, pausing waits until they disappear. In videos, Left / Right seeks by 5 seconds. Space or Enter acknowledges task completion.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Values are from the recorded protocol 6.2 profile, not universal defaults. In Operator, open Config to inspect or edit parameters, then use SetConfig to apply them. Accepted values depend on the installed build.&lt;br /&gt;
&lt;br /&gt;
=== GuidedMode ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1. Enables guided videos and practice before the main task.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionWindow ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 15 trials. Number of trials in the rolling accuracy window. The reference task restarts the window after an association change.&lt;br /&gt;
&lt;br /&gt;
=== SwitchCriterionPercent ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Accuracy threshold within SwitchCriterionWindow. At 70% over 15 trials, at least 11 responses must be correct; they need not be consecutive.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 51%. Lower bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100%. Upper bound of main-task dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== CoherenceSigma ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 20 percentage points. In the reference sampler, the Gaussian scale around 50% before folding; not the observed standard deviation of presented coherences.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMin ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 70%. Lower bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== GuidedPracticeCoherenceMax ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 85%. Upper bound of practice dominant-color percentage.&lt;br /&gt;
&lt;br /&gt;
=== StopRule ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. 0 selects a completed-round target; 1 selects trial count. The trial cap still applies.&lt;br /&gt;
&lt;br /&gt;
=== PostInitialMappingRounds ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 21. Completed-round target excluding the initial round; not a guaranteed switch count.&lt;br /&gt;
&lt;br /&gt;
=== TrialLimit ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 450. Maximum completed main-task trials; excludes practice.&lt;br /&gt;
&lt;br /&gt;
=== MidpointBreak ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 2. Number of scheduled breaks in the recorded 6.2 profile.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested pre-dot fixation duration.&lt;br /&gt;
&lt;br /&gt;
=== PreDotMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested pre-dot fixation duration. Equal bounds give a fixed duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Minimum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DotDurationMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 500 ms. Maximum requested moving-dot display duration.&lt;br /&gt;
&lt;br /&gt;
=== DelayMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Minimum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== DelayMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1600 ms. Maximum requested post-dot delay.&lt;br /&gt;
&lt;br /&gt;
=== ResponseDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 5000 ms. Maximum choice-response window, including the required key hold.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceHoldDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 100 ms. Required response-key hold within the choice window.&lt;br /&gt;
&lt;br /&gt;
=== ChoiceConfirmedDuration ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 150 ms. Confirmed-choice display duration after the required hold.&lt;br /&gt;
&lt;br /&gt;
=== ITIMinMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 900 ms. Minimum requested intertrial interval.&lt;br /&gt;
&lt;br /&gt;
=== ITIMaxMs ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 1100 ms. Maximum requested intertrial interval; the interval varies within the two bounds.&lt;br /&gt;
&lt;br /&gt;
=== DisplayRefreshRateHz ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 60 Hz. Configured display refresh rate, not a physical timing measurement.&lt;br /&gt;
&lt;br /&gt;
=== AutoDetectDisplayRefreshRate ===&lt;br /&gt;
&lt;br /&gt;
Recorded value: 0. Automatic refresh-rate detection is disabled in the recorded profile. Check requested durations against physical timing with the site photodiode.&lt;br /&gt;
&lt;br /&gt;
== BCI2000 Integration ==&lt;br /&gt;
&lt;br /&gt;
HumanAssociationTask.exe is the native C++ Application. It runs with the site&amp;amp;#x27;s Signal Source, Signal Processing and Operator modules. Guided playback requires the task&amp;amp;#x27;s AV adapter and packaged media.&lt;br /&gt;
&lt;br /&gt;
=== Running the task and resources ===&lt;br /&gt;
&lt;br /&gt;
Use the site launcher; load acquisition and task parameters, select SetConfig, then Start. The reference setup launches the Signal Source on the response-keyboard computer with &amp;lt;code&amp;gt;--LogKeyboard=1 --FileFormat=BCI2000&amp;lt;/code&amp;gt;, supplying &amp;lt;code&amp;gt;KeyDown&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;KeyUp&amp;lt;/code&amp;gt; and native recording. Do not also enable &amp;lt;code&amp;gt;KeyLogFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The reference resource location is tasks/HumanAssociationTask_BCI2000/resources: cifar contains BMP images, audio contains feedback WAVs, and guided contains videos/instructions. Match paths to the loaded parameters. Categories are 2 = car, 6 = dog and 58 = tree, with 500 images each.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
&lt;br /&gt;
The native BCI2000 .dat file stores acquired signals, loaded parameters and task states. The following fields identify the main events and outcomes; they are a selected reference, not the full schema.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! State or group !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATPhase&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATGuidedStage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATTrialKind&amp;lt;/code&amp;gt; || Current phase and guided stage; trial kind: 0 none, 1 practice, 2 main task.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrial&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPracticeTrial&amp;lt;/code&amp;gt; || Main-task counter (0 during practice) and separate practice counter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATMappingID&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATSwitchCount&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATPostSwitchCount&amp;lt;/code&amp;gt; || Current association; switch counts before and after trial evaluation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATDominantColor&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATRealizedCoherence&amp;lt;/code&amp;gt; || Color: 1 red, 2 blue; rounded realized dominant-color percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseCategory&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATResponseOutcome&amp;lt;/code&amp;gt; || Category: 2 car, 6 dog, 58 tree; 0 no accepted response. Outcome: 0 pending, 1 incorrect, 2 correct, 3 timeout.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATResponseOnset&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;HATReactionTimeMs&amp;lt;/code&amp;gt; || Confirmation/timeout pulse; RT in ms from choice-window start to that event, excluding internal pauses. Confirmed-response RT includes the key hold; it is not first-keypress latency.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATTrialStart&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;HATTrialCompleted&amp;lt;/code&amp;gt; || Trial-entry and post-ITI trial-evaluation pulses.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;HATFinished&amp;lt;/code&amp;gt; || Endpoint reached; final acknowledgement may still be pending.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Task states, including HATPhotodiode, are software markers. Check build-specific block alignment and use verified photodiode/audio recordings for physical timing. HATFinished may precede final acknowledgement and file closure. Keep all recording parts together.&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Author: JCH. Recorded declarations: ProtocolVersion = 6.2-bci-hospital1500-flex; TaskReleaseID = 0.4.0-preintegration-hospital1500-flex; DataSchemaVersion = 2. Reference source and visual examples use protocol 6.0.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
Source (authorized access): [https://www.bci2000.org/svn/trunk/src/private/Application/HumanAssociationTask HumanAssociationTask in BCI2000 SVN]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
See also: [https://www.bci2000.org/mediawiki/index.php/User_Reference:Operator_Module BCI2000 Operator Module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]]&lt;br /&gt;
[[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Jchuang</name></author>
	</entry>
</feed>