Designing a Maze task
I'm trying to design a maze task that requires two separate text displays of sequences of words. Essentially, a participant needs to decide if the word to complete the sentence is on the left or right. So a participant would be presented with "The", "man", "wants", "pizza." with competitor sequences "###", "to", "schoolbus", "in". Participants would first see [ "###" The ] and choose 'The' as the first word and then move on to [ man to ]...
I've found code that would allow me to present a single word like in self-paced reading, but I don't know how to get OpenSesame to go through a sequence for two sentences and then to do this for say 30 trials. I'm sure that I'll encounter difficulties with some of the details, but mainly I'm concerned with how to layout a table or csv for the block/trial_loop.
The way that I would have done this would have been to present all the words in a column with another column to say which trial they are a part of and yet another column to display the sequence they should be in, but from other answers on the forum it seems like putting the sentence into its own row would be better (and then making two columns for 'sentence_words' and 'competitors', but I can't get this to happen simultaneously.
Any help about the best/most logical way to set this up would be appreciated. Apologies if I've missed relevant answers on the forum.
Forster, K. I. (2010). Using a maze task to track lexical and sentence processing. The Mental Lexicon, 5(3), 347–357. https://doi.org/10.1075/ml.5.3.05for
Comments
Hi,
Nested loops (one for the trials, the second one for the word in the sentence) and every word in a separate column. See the attached experiment.
Hope this helps,
Eduard
Hi Eduard,
Thanks for the suggestion - I've moved forward with that basic design.
I've been using SigmundAI to help design the experiment - It's pretty limited and really likes stick with solutions that don't work, but it's good for providing code that I can manipulate. (My Python, OpenSesame, and general programming skills are pretty limited).
The problem with having all the stimuli in separate columns for each row is that by default the standard 'subject-0.csv' results file only gives me data (response time, whether correct, etc) for the final word in the sentence, but I need the data for each one. Sigmund's solution was to use datamatrix to create an additional results file (which will eventually need to be named dynamically). But this would only give me the results for all the word in the last trial. I suggested to Sigmund to store the trial results in one datamatrix and then add it to another data matrix called 'all_results' and then save 'all_results.csv' The code that Sigmund produced seems like it should do this, but it doesn't work and I'm really stumped as to why - I really don't understand how all_results is getting copied over.
The issue is in the prepare phase, but if it helps I'll add the prepare phase and the stimuli csv.
I've also attached, in order, the csv of the stim for this minimum working example, the log file, and the 'all_results'. And my experiment. Hopefully, you (or someone) can see the issue from the run phase above.
Any help is greatly appreciated.
Best,
Actually, revisiting your original advice, I realize that Sigmund got me to move away from the original recommendation of nested loops with one for the trials, the second one for the word in the sentence. If I can get that back it might (should) solve my problem. I'll try to get that working, but any advice would still be appreciated.
Best,
Your problem sounds to me, as if you simply need to move the logger one layer inside the nested loops. New lines to the data file are only added, if a logger is passed. If it is not included inside a loop but only after it, it will only log the variables from the last iteration.
is this the issue?
Eduard