The Wisconsin Card Sorting Task in OpenSesame#
from IPython.display import IFrame
The tutorial can be found here. You can skip Extra assignments 5 and 6.
IFrame(src="https://osdoc.cogsci.nl/3.3/tutorials/wcst-python/", width="800", height="600")
Exercise 1. Calculate average performance#
Open the gaze cueing task you created in Chapter 4. Change the TimeOut value of the Keyboard_response object to 500 (ms) so that missing values are recorded. How does OpenSesame store missing responses? Check this in the log file.
Now count the number of times the response was correct, incorrect and missing. Also, count the total number of trials presented in the block. Present the percentage of correct, incorrect, and missing responses in the feedback item. Compare whether the values you calculated correspond with the values automatically created by OpenSesame.
Exercise 2. Counterbalancing using python script#
Open your solution to Exercise 2 of Chapter 3 (Stroop task with counterbalanced correct responses). Replace the solution using conditional running with a python inline that contains a conditional and assigns the correct values to the relevant experimental variables. Test if it works correctly.
Exercise 3. Create flanker arrows using Canvas commands (advanced)#
Open the flanker task that you previously created in Chapter 2. Modify it by replacing the stimuli consisting of Ss and Hs with left- and right-pointing arrows. Use python code to draw these arrows using a series of Canvas commands that draw lines. To generate a display of five arrows, you will probably need a minimum of ten Canvas commands. Use conditionals to make sure the target and distractor arrows point to the right direction.
Hint: Start simple and work step-by-step. First, draw the target arrow in one direction and test if it works (e.g. draw a line between coordinates -10, -10, 10, 0 and a line between coordinates -10, +10, 10, 0). Then, use a conditional statement to ensure the target arrow points in the correct direction. If this works, add flanker arrows. Next, include a conditional statement to make the flanker arrows point in the right direction.