Post by jmj0228 on Jan 28, 2021 21:09:09 GMT
Hello
I was wondering how I can repeat the whole task if a percentage criterion was not met.
How I want the experiment to be implemented.
- Subject does the Wisconsin Card Sorting Test (wcst) for 50 trials
- at the end of 50 trials provide a visual feedback
- if they did the task 85% or better then this part is done
- if they did the task 84% or worse then another 50 trials are done again & repeat until 85% is met
CODE SO FAR
table wcsttable
include table.txt
# one line of the table consists of the following information
# column 1 : card
# column 2 : response (bitmap to be clicked 1 to 4)
# colomn 3 : response in previous task (or 0 if no previous task)
# column 4 : trial number in a task sequence, 1 is first, thus rule switch
# column 5 : name of the task
# column 6 : stimulus description
task wcst
table wcsttable # use the table wcsttable
delay 1000 # wait 1 second
draw off # show next 5 bitmaps at once
show bitmap circle1red -175 -100 # bitmap number 1
show bitmap triangle2green -25 -100 # bitmap number 2
show bitmap cross3blue 125 -100 # bitmap number 3
show bitmap star4yellow 275 -100 # bitmap number 4
show bitmap @1 -300 200 # bitmap number 5
draw on # now show them
set $a 0 # once clicked, $a will be clicked-bitmap number
readmouse l @2 10000 range 1 4 # wait for left mouse click on rect 1-4 for 10sec
set $a under MOUSE_X MOUSE_Y # which bitmap was clicked?
clear 5 # erase the last bitmap from screen
if $a == 1 # if bitmap 1 was clicked, set variable newx to -175
set $newx -175
fi # end of if statement
if $a == 2
set $newx -25
fi
if $a == 3
set $newx 125
fi
if $a == 4
set $newx 275
fi
if $a > 0 && STATUS != TIMEOUT
show bitmap @1 $newx 25 # show the same card (6) underneath the one clicked
fi
delay 500 # keep it for 500 ms
if STATUS == CORRECT # if match was correct
sound good # give vocal feedback
show bitmap correct $newx 100 # show message "correct", bitmap 7
clear -1
delay 200
show bitmap correct $newx 100 # show message "correct", bitmap 7
fi
if STATUS == WRONG # if match was incorrect
sound wrong # give vocal feedback
show bitmap error $newx 100 # show message "error", bitmap 7
delay 200
hide -1
delay 200
unhide -1
fi
if STATUS == TIMEOUT # if match was incorrect
sound wrong # give vocal feedback
show bitmap tooslow 75 100 # show message "timeout", bitmap 7
delay 200
clear -1
delay 200
show bitmap tooslow 75 100 # show message "error", bitmap 8
fi
delay 1000 # wait a second for feedback to be read/heard
clear 6 7 # clear feedback card (6) and feedback message (7)
## determine what type of error this was
set $anyerror 0
set $nonperseverationerror 0
set $perseverationerror 0
if STATUS != CORRECT
set $anyerror 1
if $a == @3
set $perseverationerror 1
fi
if $a != @3
set $nonperseverationerror 1
fi
fi
if &NumCorrect < 85
error
fi
save @1 @2 @3 @4 @5 @6 RT STATUS $a $anyerror $perseverationerror $nonperseverationerror
block training #teaching phase
message wcst_title
pager instruction1 instruction2
tasklist
wcst 50 all_before_repeat
end
feedback
set &NumCorrect sum c10
set &NumCorrect perc ; select c10 == 1
text 0 0 &NumCorrect ; prefix "Percentage Correct: " ; postfix "%"
end
I was wondering how I can repeat the whole task if a percentage criterion was not met.
How I want the experiment to be implemented.
- Subject does the Wisconsin Card Sorting Test (wcst) for 50 trials
- at the end of 50 trials provide a visual feedback
- if they did the task 85% or better then this part is done
- if they did the task 84% or worse then another 50 trials are done again & repeat until 85% is met
CODE SO FAR
table wcsttable
include table.txt
# one line of the table consists of the following information
# column 1 : card
# column 2 : response (bitmap to be clicked 1 to 4)
# colomn 3 : response in previous task (or 0 if no previous task)
# column 4 : trial number in a task sequence, 1 is first, thus rule switch
# column 5 : name of the task
# column 6 : stimulus description
task wcst
table wcsttable # use the table wcsttable
delay 1000 # wait 1 second
draw off # show next 5 bitmaps at once
show bitmap circle1red -175 -100 # bitmap number 1
show bitmap triangle2green -25 -100 # bitmap number 2
show bitmap cross3blue 125 -100 # bitmap number 3
show bitmap star4yellow 275 -100 # bitmap number 4
show bitmap @1 -300 200 # bitmap number 5
draw on # now show them
set $a 0 # once clicked, $a will be clicked-bitmap number
readmouse l @2 10000 range 1 4 # wait for left mouse click on rect 1-4 for 10sec
set $a under MOUSE_X MOUSE_Y # which bitmap was clicked?
clear 5 # erase the last bitmap from screen
if $a == 1 # if bitmap 1 was clicked, set variable newx to -175
set $newx -175
fi # end of if statement
if $a == 2
set $newx -25
fi
if $a == 3
set $newx 125
fi
if $a == 4
set $newx 275
fi
if $a > 0 && STATUS != TIMEOUT
show bitmap @1 $newx 25 # show the same card (6) underneath the one clicked
fi
delay 500 # keep it for 500 ms
if STATUS == CORRECT # if match was correct
sound good # give vocal feedback
show bitmap correct $newx 100 # show message "correct", bitmap 7
clear -1
delay 200
show bitmap correct $newx 100 # show message "correct", bitmap 7
fi
if STATUS == WRONG # if match was incorrect
sound wrong # give vocal feedback
show bitmap error $newx 100 # show message "error", bitmap 7
delay 200
hide -1
delay 200
unhide -1
fi
if STATUS == TIMEOUT # if match was incorrect
sound wrong # give vocal feedback
show bitmap tooslow 75 100 # show message "timeout", bitmap 7
delay 200
clear -1
delay 200
show bitmap tooslow 75 100 # show message "error", bitmap 8
fi
delay 1000 # wait a second for feedback to be read/heard
clear 6 7 # clear feedback card (6) and feedback message (7)
## determine what type of error this was
set $anyerror 0
set $nonperseverationerror 0
set $perseverationerror 0
if STATUS != CORRECT
set $anyerror 1
if $a == @3
set $perseverationerror 1
fi
if $a != @3
set $nonperseverationerror 1
fi
fi
if &NumCorrect < 85
error
fi
save @1 @2 @3 @4 @5 @6 RT STATUS $a $anyerror $perseverationerror $nonperseverationerror
block training #teaching phase
message wcst_title
pager instruction1 instruction2
tasklist
wcst 50 all_before_repeat
end
feedback
set &NumCorrect sum c10
set &NumCorrect perc ; select c10 == 1
text 0 0 &NumCorrect ; prefix "Percentage Correct: " ; postfix "%"
end