GuiltTask: Difference between revisions
| Line 69: | Line 69: | ||
You must upload the parameters below to the server as a parameter file. When the client connects to the server, it will automatically download the parameter file from the server and save it locally. You can indicate the download path in the Application tab, ParamterPath. Please do not modify the parameter file. Otherwise, the synchronization between two clients can't be guaranteed. | You must upload the parameters below to the server as a parameter file. When the client connects to the server, it will automatically download the parameter file from the server and save it locally. You can indicate the download path in the Application tab, ParamterPath. Please do not modify the parameter file. Otherwise, the synchronization between two clients can't be guaranteed. | ||
===Stimuli=== | |||
Shared parameter, stimulus information, including:<br> | Shared parameter, stimulus information, including:<br> | ||
1. ImagePath(the path of dots images). | 1. ImagePath(the path of dots images). | ||
Revision as of 16:08, 13 June 2024
Synopsis
In the interpersonal task, you will team up with another participant in a different room (referred to as “partner”). You do not know each other before, and you will not see each other after the task. During this task, the two of you will complete multiple rounds of “dot-estimation” together. Specifically, both you and the partner will see an array of white dots scattered on the screen. Your task is to estimate the total number of these dots. After the dots disappear, you will see a number on the screen. Now you need to guess whether the number of dots you just saw is greater or smaller than the number on the screen. If you think the number of dots is smaller than the number on the screen, then press the left arrow button to select “Smaller”; if you think the number of dots is larger than the number on the screen, then press the right arrow button to select “Greater”. You will need to make the choice within 3 seconds, otherwise your responses will be recorded as “incomplete” will be reminded to respond faster next round.
Timeline
-
Figure 1: Single Trial Timeline.
Visual Representation
-
Figure 2: Visual Representation
Versioning
Authors
Hongbo Yu <hongbo.yu@psych.ucsb.edu> and Shuo Wang <wangshuo45@gmail.com> conceived this paradigm.
Huiling Huang (huiling@neurotechcenter.org) implemented the paradigm into BCI2000.
Set up
Deploy the Server
You will need a Linux or macOS computer to run the server. Currently, the Windows OS is not supported. The following steps are for deploying the server on the local network. If you want to deploy the server on AWS, please refer to https://www.bci2000.org/mediawiki/index.php/BCI2000_Hyperscanning#Important_Notes_2.
First, please ensure all the computers are connected to the same local network. Then open the terminal(Mac OS or Linux) and run the command below to clone the server code from GitHub.
git clone https://github.com/MaxwellMarcus/hyperscanning-backend
Go the hyperscanning directory
cd hyperscanning
Compile the project by
make -B
-
Figure 3: Download and Compile the Server.
Run the server with
./application
-
Figure 4: Launch the Server.
The application will only run as long as the experiment and will have to be restarted.
Batch File
The batch file is located in ./batch/CommunicationTask.bat.
-
Figure 5: Batch File.
Unlike the normal bci2000 task, we define the shared states in the batch file(line 35) by beginning with"--SharedStates=". The form is:
--SharedStates=<state-1>,<state-1-size>&<state-2>,<state-2-size>&<state-3>,<state-3-size>...
IPAddress and Port indicate the server computer.
Run the experiment on the client computer
Go to the./batch, find the "CommunicationTask.bat", and double click it. After pushing "Set Config," the BCI2000 will try to connect the server. If it successfully connects to the server, the System Log will print "Connected to server." If only one client connects to the server, the "Start" button in the operator will turn gray until another client connects.
-
Figure 6: Launch the BCI2000.
Troubleshooting
After you quit the server from the terminal and restart it again, you might see this error message. That means the server is still running. You need to kill the "application" process.
-
Figure 7: Kill the Server.
Parameters
There are two kinds of parameters: shared and local. The shared parameter is the one you want to synchronize between two clients, like the stimulus sequence, the sequence of break trials you wish to take a break after this trial, etc. It should be saved on the server as a parameter file and passed to the clients through messages as a parameter. The local parameter is that you want to customize the parameter locally, like GUI. The local parameter is the regular BCI2000 parameter file saved under the local BCI2000 project folder.
You must upload the parameters below to the server as a parameter file. When the client connects to the server, it will automatically download the parameter file from the server and save it locally. You can indicate the download path in the Application tab, ParamterPath. Please do not modify the parameter file. Otherwise, the synchronization between two clients can't be guaranteed.
Stimuli
Shared parameter, stimulus information, including:
1. ImagePath(the path of dots images).
StimuliSequece=
The sequence of dots images.
TrialSequece
Sequence of trial type.,
1: both correct
2: victim incorrect
3: transgressor incorrect
4: both incorrect
FixationDurationMax, FixationDurationMin
Maximum and minimum Duration of Fixation(ITI).
DotsDuration
Duration of displaying the dots
ResponseDuration
The maximum time allows the subject to make a response.
OutcomeDuration
The duration to display the outcome.
Unlike the parameters described above, they are saved on the server rather than on local computers.
Local Parameters
InstructionImagesSeque
The sequence of instruction images path.
FontSize, FixationSize
Font/Fixation size.
FontColor, FixationColor
Color of the font/fixation.
PhotoDiodePatch
Display a photodiode patch on the stimulus window. Recording from a photodiode located on that patch will allow triggering on actual stimulus delivery (see User_Reference: P3TemporalFilter#OnsetExpression).
PhotoDiodePatchHeight, PhotoDiodePatchWidth
Photodiode patch height/width in relative coordinates (between 0 and 1).
PhotoDiodePatchLeft, PhotoDiodePatchTop
Photodiode patch left/top position in relative coordinates (between 0 and 1).
PhotoDiodePatchShape
Photodiode patch shape: 0 rectangle, 1 ellipse.
PhotoDiodePatchActiveColor
Photodiode patch color when active (RGB color in format 0xrrggbb).
PhotoDiodePatchInactiveColor
Photodiode patch color when inactive, (RGB color in format 0xrrggbb, use 0xff000000 for transparent).
States
Shared states are converted to BCI2000 states asynchronously through events using the HyperscanningApplicationBase class. We declared shared states in the batch file as "--SharedStates=state1_name,state1_size&state2_name,state2_size&...", which is appended to the end of the application module.
PhaseNumber
The index of phase in each trial. (8 bits)
[0] indicates the instruction at the beginning of the experiment. (When the slides instruction images are present on the screen)
[1] present the fixation on the screen.
[2] present the dots on the screen.
[3] The subject estimates the number of dots.
[4] Display the outcome.
[5]End: (Well done! You have finished all the trials.)
TrialNumber
Index of trials. (8 bits)
Response
1: greater. 2: smaller. (8 bits)
ClientNumber
The client’s ID, is assigned by the server. Either 0 or 1. (8 bits)
0: Transgressor. 1: Victim




