-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrms+control.html
632 lines (557 loc) · 23.2 KB
/
brms+control.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
<!DOCTYPE html>
<html>
<head>
<script src="jspsych-6.3.0/jspsych.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-html-keyboard-response.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-image-keyboard-response.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-image-button-response.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-html-button-response.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-resize.js"></script>
<script src="jspsych-6.3.0/plugins/jspsych-fullscreen.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-animation.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-call-function.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-survey-text.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-survey-multi-choice.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-survey-likert.js"></script>
<script src="jspsych-6.3.0/plugins/jspsych-virtual-chinrest.js"></script>
<script src="jspsych-6.3.0/plugins/jspsych-preload.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/svg.js/2.6.3/svg.min.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-brms.js"></script>
<script src="jspsych-6.3.0/plugins/jspsych-control-brms.js"></script>
<script src="jspsych-6.1.0/plugins/jspsych-brms-test.js"></script>
<script src= "jspsych-6.1.0/jquery.min.js"></script>
<script src= "jspsych-6.1.0/jquery-ui.min.js"></script>
<script src= "jspsych-6.1.0/svg.min.js"></script>
<link href="jspsych-6.1.0/css/bootstrap.min.css" rel="stylesheet" type="text/css"></link>
<link href="jspsych-6.1.0/css/jquery-ui.css" rel="stylesheet" type="text/css"></link>
<link href="jspsych-6.1.0/css/styles.css" rel="stylesheet" type="text/css"></link>
<!--
<script src="jspsych-6.1.0/lib/jquery-min.js" type="text/javascript"></script>
-->
<script src="jspsych-6.1.0/lib/underscore-min.js" type="text/javascript"></script>
<script src="jspsych-6.1.0/lib/backbone-min.js" type="text/javascript"></script>
<script src="jspsych-6.1.0/lib/TweenMax.min.js"></script>
<script src="jspsych-6.1.0/lib/CustomEase.js"></script>
<script src="js/utils.js" type="text/javascript"></script>
<link href="jspsych-6.1.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
</head>
<body></body>
<script>
document.body.style.backgroundColor = "ghostwhite";
// BRMS parameters
var total_num_faces = 21, // number of last face (in this case there are only 11 faces - 1,3,5,7..., 21)
train_repetitions = 10, // number of repeats of the practice procedure (at this point 4 stimuli)
ITI = 1000,
time_limit = 60 * (60 * 1000),
stimAlphas = 0.4,
controlAlphas = [0.2,0.3,0.4,0.5] // Control alpha
unitSize = 4,
breakEvery = 21,
repetitions = 4, // number of repetitions of each face. ORIGINAL WAS 4. *yuval
control_repetitions = 1,
train_alpha = 0.6,
trialLength = 0, // 0 is no limit
fade_in_time = 1,
fade_in_time_control = 3,
fade_out_time = 20,
fade_out_length = 10,
training_allowed_repeat = 1,
experiment_performance_thresh = .80,
experiment_performance_trials = 10,
train_performance_thresh = .85, ///////remember to return to 0.85
experiment_RT_trials = 8, // only after this number of trials look at RT thresholds
experiment_RT_trial_threshold = 5, // number of allowed 'too fast' trials. More then this will bring a warning
experiment_RT_threshold = 300, // less ms then this will be marked 'too fast'
sProblemCrit = 8,
bProblemCrit = 2;
// automatically load stimuli from the main timeline,
// and manually add any other stimuli files that can't be loaded automatically
var preload = {
type: 'preload',
auto_preload: true
//images: ['image1.png','image2.png']
};
//#region add zoom events to data
var zoom_event = [];
window.onresize = function(){
console.log(window.devicePixelRatio);
zoom_event.push({timestamp: performance.now(), zoom_ratio: window.devicePixelRatio});
}
//#endregion add zoom events to data
var screenmode = {
type: 'fullscreen',
message: '<h3>This experiment must be run in full-screen.</h3><br>',
fullscreen_mode: true,
delay_after: 200, // add little delay to make sure screen size is updated correctly
}
var take_id = {
type: 'survey-text',
questions: [{
prompt: "Please enter your MTurk Worker ID",
name: "ID",
columns: 18,
rows: 1,
value: ''
}]
}
var deg_resize = {
type: 'virtual-chinrest',
blindspot_reps: 1,
resize_units: "deg",
pixels_per_unit: 60,
on_start: function () {
var id = jsPsych.data.get().last(1).values()[0].responses // get worker ID from previous trial
id = id.substring(7, id.length-2) // extract only ID from string
jsPsych.data.addProperties({id: id})
}
//viewing_distance_report: 'none'
};
var postCalibText = [
{
stimulus: ["<p style='font-size: 28px;' align='justify'>We finished the calibration stage! We will now continue to the main task of this experiment.</p>\
<p style='font-size: 28px;' align='justify'><b>We remind you to make an effort to move as little as possible until the end of the task.</b></p>\
<p style='font-size: 28px;'><b>Please read the following instructions carefully.</b></p>\
<p style='font-size: 24px;'><i>Press the space bar to continue</i></p>"],
choices: [' ']
}
];
var introduction_procedure = {
timeline: [
{
type: 'html-keyboard-response',
timeline: postCalibText,
timing_post_trial: 400
}
]
}
//#region BRMS PART
//#region BRMS practice
var bRMS_instruction_text = [
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>In this task you will be presented with rapidly \
changing patterns of rectangles. Through these rectangles faces will appear. Your task will be to indicate the location of \
the faces, or any part of them, as soon as they appear.</p>\
<p style='font-size: 24px;' align='center'><i>Press the space bar to continue.</i></p></div>"
],
choices: [' ']
},
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>If a face appeared in the right half \
of the screen, press the right key. If a face appeared in the left half \
of the screen, press the left key.</p>\
<p style='font-size: 24px;' align='center'><i>Press the space bar to continue.</i></p></div>"
],
choices: [' ']
} ,
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>Please perform this task as accurately \
and quickly as you can.</p>\
<p style='font-size: 24px;' align='center'><i>Press the space bar to continue.</i></p></div>"],
choices: [' ']
},
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>During the task, please focus your gaze at\
the plus sign in the middle.</p> \
<p style='font-size: 28px;'><b>Even though the faces appear to the left and right of the plus sign, it is important that you look at the plus \
sign at all times.</b></p>\
<p style='font-size: 24px;' align='center'></i>Press the space bar to continue.</i></p></div>"],
choices: [' ']
},
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>We will start with a short practice.</p>\
<p style='font-size: 24px;' align='center'></i>Press the space bar to continue.</i></p></div>"],
choices: [' ']
},
{
stimulus: ["<div class='center'>\
<img src='keys.jpg'></img>\
<p style='font-size: 28px;'>Place your fingers on the 'D' and 'K' keys as shown in the picture.</p> \
<p style='font-size: 28px;'>If a face appears on the right side press the right key (K).</p>\
<p style='font-size: 28px;'>If a face appears on the left side press the left key (D).</p>\
<p>Press either one of these keys to start the practice.</p></div>"],
choices: ['d','k']
}
];
var practice_stimuli = [];
for (i = 0; i < train_repetitions; i++) { //make train stim timeline
practice_stimuli.push({stimuli: "faces/training/p_" + i + ".jpg"})
}
var control_stimuli = [];
for (i = 1; i <= 11; i++) { //make control stim timeline - 11 faces
control_stimuli.push("faces/control/c_" + i + ".jpg")
}
var bRMS_instructions = {
type: 'html-keyboard-response',
timeline: bRMS_instruction_text,
timing_post_trial: 200
};
var bRMS_practice_procedure = {
timeline: [
{
type: "bRMS",
stimulus: jsPsych.timelineVariable('stimuli'),
timing_response: trialLength,
fade_out_time: fade_out_time,
fade_in_time: fade_in_time,
fade_out_length: fade_out_length,
stimulus_alpha: train_alpha,
timing_post_trial: 100,
visUnit: function() {
return unitSize
},
within_ITI: ITI - 100,
colorOpts: ['#FF0000', '#00FF00', '#0000FF',
'#FFFF00', '#FF00FF', '#00FFFF'
],
on_start: function(){
document.querySelector('head').insertAdjacentHTML('beforeend', '<style id="cursor-toggle"> html { cursor: none; } </style>')
},
on_finish: function(){
document.querySelector('#cursor-toggle').remove()
},
data: {
//stimulus: jsPsych.timelineVariable('practice_stimuli'),
training: true,
timing_response: trialLength,
fade_out_time: fade_out_time,
fade_in_time: fade_in_time,
fade_out_length: fade_out_length,
stimulus_alpha: train_alpha
}
}
],
timeline_variables: practice_stimuli,
randomize_order: true
}
var performanceMSG_practice = {
type: 'html-keyboard-response',
stimulus: ["<div class='center'>\
<p style='font-size: 28px;'>You pressed the wrong key too many times during the practice block.</p>\
<p style='font-size: 24px;'>Press either the 'D' or 'K' keys to repeat it.</p></div>"],
choices: ['d','k'],
on_start: function(trial) {
if (jsPsych.data.get().last(1).select('trial_type').values != 'bRMS') {
trial.stimulus = '';
trial.choices = jsPsych.NO_KEYS;
trial.trial_duration = 0;
}
}
},
stop_practice_loop = {
type: 'html-keyboard-response',
conditional_function: function() {
if (jsPsych.data.get().last(1).select('train_repeats').values[0] > training_allowed_repeat) {
if (jsPsych.data.get().last(train_repetitions).select('acc').mean() < train_performance_thresh) {
return true
}
else {
return false;
}
} else {
return false;
}
},
timeline: [{
stimulus: "<div class='center'>\
<p style='font-size: 28px;'>It seems that you are not performing the task as instructed.</p>\
<p style='font-size: 28px;'>Please return this study.</p>\
<p style='font-size: 28px;'>If you feel that this is a mistake, please email us at \
[email protected] or contact us via MTurk</p>\
<p style='font-size: 28px;'>Press the space bar to continue.</p></div>"
}],
choices: [' '],
//** needed eventualy **//
on_finish: function() {
jsPsych.endExperiment('The experiment was aborted');
}
}
jsPsych.data.addProperties({
train_repeats: 1
});
var bRMS_secChanceLoop = {
timeline: [performanceMSG_practice, bRMS_practice_procedure, stop_practice_loop],
loop_function: function() {
if (jsPsych.data.get().last(train_repetitions).select('acc').mean() < train_performance_thresh) {
jsPsych.data.addProperties({
train_repeats: jsPsych.data.get().last(1).select('train_repeats').values[0] + 1
});
return true
} else {
return false
}
}
};
//#endregion BRMS practice
//#region BRMS main task
var bRMS_mainBlockText = [{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>You have completed the practice block.</p>\
<p style='font-size: 28px;'>You will now continue with the same task. The task may now be more \
difficult. It will take about 5-10 minutes, and you will have a short break in the half way point. </p>\
<p style='font-size: 24px;'>Press either the 'D' or the 'K' keys to continue.</p></div>"],
choices: ['d','k']
},
{
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>During the task, please focus your gaze at\
the plus sign in the middle.</p> \
<p style='font-size: 28px;'><b>Even though the faces appear to the left\
and right of the plus sign, it is important that you look at the plus \
sign at all times.</b></p>\
<p style='font-size: 26px;'>Press either the 'D' or the 'K' keys to start the task.</p></div>"],
choices: ['d','k']
}
]
var bRMS_mainBlockIns = {
type: 'html-keyboard-response',
timeline: bRMS_mainBlockText,
timing_post_trial: 200
}
//** brms main block**//
// Define stimuli for bRMS
var used_images = [] //creating 'used_images[]', holding all and only faces going to be used in the main block. *yuval
for (i = 1; i <= total_num_faces; i += 2) {
used_images.push('faces/' + i + '.jpg')
}
var brms_task_stimuli = [];
// BRMS main task
for (i = 0; i < repetitions; i++) { // Create a list of trials, repeating the experiment block x amount of times. *yaniv
used_images = jsPsych.randomization.shuffle(used_images); //shuffling again for next repeats *yuval
for (ii = 0; ii <= used_images.length - 1; ii++) {
brms_task_stimuli.push({
type: "bRMS",
stimulus: used_images[ii],
data: {
stimulus: used_images[ii],
timing_response: trialLength,
stimulus_alpha: stimAlphas,
timing_post_trial: 100,
within_ITI: ITI - 100,
fade_in_time: fade_in_time,
fade_out_time: fade_out_time,
fade_out_length: fade_out_length,
trial: (i * used_images.length) + ii + 1 // set trial number in data (example: 301,302...) *yuval
},
stimulus_alpha: stimAlphas,
timing_post_trial: 100,
within_ITI: ITI - 100,
timing_response: trialLength,
fade_in_time: fade_in_time,
fade_out_time: fade_out_time,
fade_out_length: fade_out_length,
colorOpts: ['#FF0000', '#00FF00', '#0000FF',
'#FFFF00', '#FF00FF', '#00FFFF'
],
on_start: function(){
document.querySelector('head').insertAdjacentHTML('beforeend', '<style id="cursor-toggle"> html { cursor: none; } </style>')
},
on_finish: function(){
document.querySelector('#cursor-toggle').remove()
}
});
}
}
// BRMS CONTROL task
var control_task_stimuli = [];
for (i = 0; i < controlAlphas.length; i++) { // Create a list of trials, repeating the experiment block x amount of times. *yaniv
control_stimuli = jsPsych.randomization.shuffle(control_stimuli); //shuffling again for next repeats *yuval
for (ii = 0; ii <= control_stimuli.length - 1; ii++) {
control_task_stimuli.push({
type: "control-bRMS",
stimulus: control_stimuli[ii],
isControl: true,
data: {
stimulus: control_stimuli[ii],
timing_response: trialLength,
stimulus_alpha: controlAlphas[i],
timing_post_trial: 100,
within_ITI: ITI - 100,
fade_in_time: fade_in_time_control,
fade_out_time: fade_out_time,
fade_out_length: fade_out_length,
control_trial: (i * control_stimuli.length) + ii + 1 // set trial number in data (example: 301,302...) *yuval
},
stimulus_alpha: controlAlphas[i],
timing_post_trial: 100,
within_ITI: ITI - 100,
timing_response: trialLength,
fade_in_time: fade_in_time_control,
fade_out_time: fade_out_time,
fade_out_length: fade_out_length,
colorOpts: ['#FF0000', '#00FF00', '#0000FF',
'#FFFF00', '#FF00FF', '#00FFFF'
],
on_start: function(){
document.querySelector('head').insertAdjacentHTML('beforeend', '<style id="cursor-toggle"> html { cursor: none; } </style>')
},
on_finish: function(){
document.querySelector('#cursor-toggle').remove()
}
});
}
}
// shuffle all control stimuli for Alphas to be not in order
control_task_stimuli = jsPsych.randomization.shuffle(control_task_stimuli);
/* Add breaks */
var breakMsg = {
type: "html-keyboard-response",
stimulus: ["<div class = 'center'><p style='font-size: 28px;'>This is a break.</p>\
<p style='font-size: 24px;'>Press the space bar to continue.</p>"],
choices: [' '],
timing_post_trial: 1600
}
/* Make sure participants are behaving */
var behave = {
type: "html-keyboard-response",
timeline: [{
stimulus: "<div class = 'center'><p style='font-size: 28px;'>It seems that you have pressed the wrong \
key many times recently.</p>\
<p style='font-size: 28px;'>Please perform the task as accurately and as quickly as you can.</p>\
<p style='font-size: 24px;'>Press the space bar to continue.</p>"
}],
choices: [' '],
conditional_function: function() {
var trialType = jsPsych.currentTrial().type,
trialN = jsPsych.data.get().filter({
trial_type: "bRMS"
}).count();
if (trialType == 'bRMS' && // This isn't a break
jsPsych.currentTrial().data.trial > lastWarned + experiment_performance_trials && // unwarned
((trialN >= experiment_performance_trials && // sufficient acc data
jsPsych.data.get().filter({
trial_type: "bRMS"
}).last(experiment_performance_trials).select('acc').mean() < experiment_performance_thresh) || // performance bad
(trialN >= experiment_RT_trials && // sufficient rt data
jsPsych.data.get().filter({
trial_type: "bRMS"
}).last(experiment_RT_trials).filterCustom(function(x) {
return x.rt < experiment_RT_threshold
}).count() >= experiment_RT_trial_threshold))) { // enough fast trials
lastWarned = jsPsych.currentTrial().data.trial;
//console.log("condition is true");
return true;
} else {
//console.log("condition is false");
return false;
}
}
},
lastWarned = -experiment_performance_trials;
/* Make sure participants are behaving -- CONTROL */
var control_behave = {
type: "html-keyboard-response",
timeline: [{
stimulus: "<div class = 'center'><p style='font-size: 28px;'>It seems that you have pressed the wrong \
key many times recently.</p>\
<p style='font-size: 28px;'>Please perform the task as accurately and as quickly as you can.</p>\
<p style='font-size: 24px;'>Press the space bar to continue.</p>"
}],
choices: [' '],
conditional_function: function() {
var trialType = jsPsych.currentTrial().type,
trialN = jsPsych.data.get().filter({
trial_type: "control-bRMS"
}).count();
if (trialType == 'control-bRMS' && // This isn't a break
jsPsych.currentTrial().data.trial > lastWarned + experiment_performance_trials && // unwarned
((trialN >= experiment_performance_trials && // sufficient acc data
jsPsych.data.get().filter({
trial_type: "control-bRMS"
}).last(experiment_performance_trials).select('acc').mean() < experiment_performance_thresh) || // performance bad
(trialN >= experiment_RT_trials && // sufficient rt data
jsPsych.data.get().filter({
trial_type: "control-bRMS"
}).last(experiment_RT_trials).filterCustom(function(x) {
return x.rt < experiment_RT_threshold
}).count() >= experiment_RT_trial_threshold))) { // enough fast trials
lastWarned = jsPsych.currentTrial().data.trial;
//console.log("condition is true");
return true;
} else {
//console.log("condition is false");
return false;
}
}
}
for (ii = breakEvery; ii < brms_task_stimuli.length; ii += (breakEvery+2)) { // did some editing to make break message in place. switched "breakEvery+1" to "+2" and
brms_task_stimuli.splice(ii+1, 0, breakMsg); // "ii" to "ii+1"
};
for (ii = 1; ii < (brms_task_stimuli.length - 1); ii += 2) {
brms_task_stimuli.splice(ii, 0, behave);
}
// CONTROL
for (ii = breakEvery; ii < control_task_stimuli.length; ii += (breakEvery + 2)) {
control_task_stimuli.splice(ii+1, 0, breakMsg);
};
for (ii = 1; ii < (control_task_stimuli.length - 1); ii += 2) {
control_task_stimuli.splice(ii, 0, control_behave);
}
/* define block */
var bRMS_block = {
timeline: brms_task_stimuli,
visUnit: function() {
return unitSize
}
};
/* define block */
var control_block = {
timeline: control_task_stimuli,
visUnit: function() {
return unitSize
}
};
//#endregion BRMS main task
//#endregion BRMS PART
//#region zoom/window/mturk record
var record_zoom_events = {
type: 'call-function',
func: function(){
return JSON.stringify(zoom_event);
}
}
var record_window_events = { // records window events
type: 'call-function',
func: function(){
return jsPsych.data.getInteractionData().json();
}
}
//#endregion zoom/window/mturk record
//#region DEBRIEF
var debrief = {
timeline: [
{
type: 'survey-text',
questions: [{
prompt: "You have just participated in a pilot experiment.\
The aim of the study is to measure participant's ability to detect changes.\
Please write here any comments or suggestions that you think we should hear before issuing the full-scale experiment.",
columns: 100,
rows: 4,
value: '',
name: "comments"
}],
on_finish: function() {
jsPsych.data.addProperties({experiment_finished: true});
}
},
{
type: 'html-button-response',
stimulus: '<p><b>xrVESi7LQxYmku5</b></p>',
choices: ['Done'],
prompt: "<p style='font-size: 28px;'>That's it, we're done! In order for your HIT to be submitted and for you to be paid, please copy the code above and paste it in the MTurk's HIT page.</p>"
}
]}
//#endregion DEBRIEF
//INITIATE EXPERIMENT
var experiment_timeline = [preload, screenmode, take_id, deg_resize, bRMS_instructions ,bRMS_secChanceLoop, bRMS_mainBlockIns, bRMS_block, control_block, record_zoom_events, record_window_events, debrief]
//if (CONDITION == 1) {
// experiment_timeline = [introduction_procedure, CB_practice_procedure, CB_trial_procedure, middle_instructions, bRMS_instructions ,bRMS_secChanceLoop, bRMS_mainBlockIns, bRMS_block, record_zoom_events, record_window_events, record_mturk_data ,debrief, if_driver, get_code]
// } else {
// experiment_timeline = [introduction_procedure, bRMS_instructions ,bRMS_secChanceLoop, bRMS_mainBlockIns, bRMS_block, middle_instructions, CB_practice_procedure, CB_trial_procedure, record_zoom_events, record_window_events, record_mturk_data ,debrief, if_driver, get_code]
// }
jsPsych.init({
timeline: experiment_timeline,
on_finish: function() {
alert("The experiment is over. Thank you for your participation!");
}
});
</script>
</html>