|
Post by Jessica on Aug 16, 2019 16:55:31 GMT
Hello everyone, This is a really specific question so I'm not sure if anyone could help. I have been creating an experiment that includes the simon task and the corsi task. I've been using the tasks in the psytoolkit library, but have had to make many modifications including putting them both into the same experiment. I have finished everything that I need, yet I have been working for over a month to figure out how to run the corsi task as a backward span. All of my attempts have only caused a six item span to repeat itself over and over. Having both forward and backward recall components is key to my research as I'm examining response to increased executive function demands. I simply need to change what the program "counts" as a correct answer. I am pretty novice at coding, it is merely a necessary hobby for me, but I am a fast learner. I've learned a lot about how this task works on psytollkit, yet obviously not enough. This has been frustratingly elusive to me. Can anyone shed advice on this task? I don't know if it would be helpful for me to include a screenshot of what I have done already. Thank you to anyone who knows. Jessica
|
|
|
Post by wannabephd on Aug 26, 2019 11:25:29 GMT
Not sure how big a post can be on the forum, but a pasted version of the code would help. Have you considered creating two separate task versions (one task which counts forward answers as correct and one which counts backwards answers as correct)?
e.g.
task [insert forward task name] [insert forward task code]
task [insert backward task name] [insert backward task name]
block [insert block name] tasklist [insert forward task name] 10 # runs 10 trials [insert backward task name] 10 # run 10 trials end
Note, in the example above, the task order would be randomnised (i.e., order could be forward, forward, backward, forward... etc)
|
|
|
Post by Jessica on Aug 26, 2019 17:49:18 GMT
Thank you so much for your response; it's a ray of hope! I'm going to try to add the code below for the corsi task, it is the task from the psytoolkit library and for this one I didn't have to alter it at all other than putting it after my simon task. I have tried kind of what you suggested and tried creating another task, one that runs eiter before or after the forward span (all of the forward and then all of the backward OR all of the backward and all of the forward.) It runs the forward ok, but when it gets to the backward it just keeps repeating spans and counts any response as incorrect. I thought it was just a matter of reversing what it checks as "correct" but I was wrong. This is what the code currently looks like, again it is not mine it is psytoolkit's. In a rage of fury I deleted all that I had done to it and went back to the beginning. I've written the part I've been messing with in red text.
task corsitask
options mouse on set &Count 2 # starts with showing two blocks origin topleft
sounds gosignal go.mp3
part delay delay 300 clear -1 delay 300
table corsidata include corsitable.txt
task corsi table corsidata set $counter 0 set $b1 0 set $b2 0 set $b3 0 set $b4 0 set $b5 0 set $b6 0 set $b7 0 set $b8 0 set $b9 0 # mouse off so that people cannot mouse during sequence presentation mouse off # show nine blocks draw off show bitmap purple @1 @2 show bitmap purple @3 @4 show bitmap purple @5 @6 show bitmap purple @7 @8 show bitmap purple @9 @10 show bitmap purple @11 @12 show bitmap purple @13 @14 show bitmap purple @15 @16 show bitmap purple @17 @18 show bitmap done 750 550 draw on # show sequence 1 show bitmap yellow @19 @20 part delay show bitmap yellow @21 @22 part delay if &Count > 2 show bitmap yellow @23 @24 part delay fi if &Count > 3 show bitmap yellow @25 @26 part delay fi if &Count > 4 show bitmap yellow @27 @28 part delay fi if &Count > 5 show bitmap yellow @29 @30 part delay fi if &Count > 6 show bitmap yellow @31 @32 part delay fi if &Count > 7 show bitmap yellow @33 @34 part delay fi if &Count > 8 show bitmap yellow @35 @36 part delay fi # go! sound gosignal mouse show # now show cursor again delay 100 # not really necessary, but gives a bit of time between sound and people's response # read in sequence while $x != 10 readmouse l 1 10000 range 1 10 set $myMouseX MOUSE_X set $myMouseY MOUSE_Y set $x bitmap-under-mouse $myMouseX $myMouseY up range 1 10 if $x != 10 set $counter increase fi if $counter == 1 && $x != 10 set $b1 $x fi if $counter == 2 && $x != 10 set $b2 $x fi if $counter == 3 && $x != 10 set $b3 $x fi if $counter == 4 && $x != 10 set $b4 $x fi if $counter == 5 && $x != 10 set $b5 $x fi if $counter == 6 && $x != 10 set $b6 $x fi if $counter == 7 && $x != 10 set $b7 $x fi if $counter == 8 && $x != 10 set $b8 $x fi if $counter == 9 && $x != 10 set $b9 $x fi show bitmap ticked $myMouseX $myMouseY ## it has to be here, check while-end javascript coding while-end set $x 0 # now check if sequence is correct set $SeqCorrect 0 # this means wrong if $counter == &Count if &Count == 2 && $b1 == @37 && $b2 == @38 set $SeqCorrect 1 fi if &Count == 3 && $b1 == @37 && $b2 == @38 && $b3 == @39 set $SeqCorrect 1 fi if &Count == 4 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 set $SeqCorrect 1 fi if &Count == 5 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 && $b5 == @41 set $SeqCorrect 1 fi if &Count == 6 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 && $b5 == @41 && $b6 == @42 set $SeqCorrect 1 fi if &Count == 7 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 && $b5 == @41 && $b6 == @42 && $b7 == @43 set $SeqCorrect 1 fi if &Count == 8 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 && $b5 == @41 && $b6 == @42 && $b7 == @43 && $b8 == @44 set $SeqCorrect 1 fi if &Count == 9 && $b1 == @37 && $b2 == @38 && $b3 == @39 && $b4 == @40 && $b5 == @41 && $b6 == @42 && $b7 == @43 && $b8 == @44 && $b9 == @45 set $SeqCorrect 1 fi fi ## feedback if $SeqCorrect == 1 show bitmap correct 750 550 fi if $SeqCorrect == 0 show bitmap wrong 750 550 fi delay 1000 clear -1 delay 1000 ## now goto next seq if correct twice set $currentcount &Count if $SeqCorrect == 1 set &corsispan &Count ## the best score so far set &Count increase set &ErrorCount 0 fi ## count errors in a row if $SeqCorrect == 0 set &ErrorCount increase fi ## save data save &corsispan $currentcount $SeqCorrect TABLEROW ## if two errors in a row or if all are correctly clicked, end of task if &ErrorCount == 2 || &Count == 10 end tasklist fi
block corsi message instructions bitmap ready3 delay 1000 bitmap ready2 delay 1000 bitmap ready1 delay 1000 tasklist corsi 100 all_before_repeat end feedback text 0 400 &corsispan ; prefix "Your Corsi span is " ; postfix " items." text 0 500 "Press space bar to continue" end
|
|
|
Post by wannabephd on Aug 27, 2019 13:18:28 GMT
Hmmmm.... unfortunately I'm not familiar enough with some of the script you're using to spot the error. Hopefully someone else (more capable) will though! Good luck, keep tinkering and you'll figure it out!
|
|
|
Post by Jessica on Aug 27, 2019 14:17:13 GMT
Thank you! Yes it's definitely more advanced than what I am capable of. The other tasks were relatively easy for me to manipulate. Either it will come together or I'll just remove this task from my thesis. Not ideal, but at this point I'm at peace with it. Thanks for taking a look!
|
|
|
Post by Jessica on Aug 27, 2019 15:21:03 GMT
For anyone who is following because they also need a backward span, or for whatever reasons, I have an update. I can get a backward span to work when it is JUST the backward span. When I try to combine the forward span and backward span into one experiment, it goes nuts and just continuously runs a 6 item span while counting nothing as "correct." So, it's definitely something about having it read both together in the same experiment. I fear if this is the case it might not be a resolvable issue.
|
|
|
Post by PsyToolkit on Sept 1, 2019 0:03:40 GMT
Hello,
I have written a backward Corsi a while ago, I will find it. Jessica, can you please email me via psytoolkit@gmx.com ?
I will in the near future make sure the backward Corsi is online (given that people have asked for this before).
The Corsi task is one of my favorite memory tasks!
Best,
Gijsbert Stoet PsyToolkit developer
|
|
|
Post by Jessica on Oct 10, 2019 14:36:24 GMT
Thank you Dr. Stoet, I really appreciate your response. I will be contacting you at the email address given. My main concern is the ability to run the backward span following the forward span. I was eventually able to run the span backward, however putting both the forward and backward tasks into one experiment had some interesting consequences for how the second task ran.
Thanks again, Jessica
|
|
|
Post by PsyToolkit on Oct 13, 2019 12:14:41 GMT
Dear Jessica,
I have now sent this to your personal email. I will later this week create the Reverse Corsi as a downloadable experiment in the experiment library as well.
Best,
Gijsbert Stoet
|
|