Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Mixed trial types in the same sequence skip a keyboard response.

Dear all,

The central idea of my experiment is that you present an image with a matching, congruent sound (e.g. a cat and a meow). But I want the second trial of the sequence to be incongruent (e.g. a cat and a bark). Each trial type is defined by a short script I have added at the beggining of the sequence.

if var.live_row_Block_loop == 2:
      var.trial_type = 'incongruent'
else:
      var.trial_type = 'congruent'

Each congruent or incongruent trial runs with an inline script, a keyboard item and a second script that defines if the answer given was correct or not. I have included the items for both types of trials into the same sequence. Hence, the desing is as follows:



The "trial_type" script defines trial type (congruent/incongruent) and contains the code i have at the beggining of this post. The items in the orange line are for the congruent trials, and the items in the red line are for incogruent (or else i call them "catch") trials.

To control whether a congruent or an incongruent trial runs, I have set the following parameters in the trial_sequence item.


The items are the same for each trial type, they follow the exact same logic, with a few differences to achieve congruent/incongruent trials.

This seems to run but with the following problem: after a congruent trial runs, there is no time to give a keyboard response, nor a delay, the programme runs immediately to the next part, i.e. an incongruent trial. However, at the end of the incongruent trial, the programm waits normally for a keyboard response, and the delay is also present.

Do you have any ideas that could help? Thank you very much in advance!!

Comments

  • Hi,

    Can you please share your experiment? It is a bit hard to find out what is happening with screenshots alone.

    Thanks,

    Eduard

    Buy Me A Coffee

  • Yes, of course.

    I uploaded it in this link (https://we.tl/t-ibinikr0wI) via wetrasnfer - for some reason it won't let me upload it here ("Request failed with status code 413").

    Thank you very much.

  • Hi @eduard , do you perhaps have any update?

  • Hi @amoupsou ,

    Sorry, I was on vacation and the link expired already. Could you repost?

    Eduard

    Buy Me A Coffee

  • yes of course!

    thank you, eduard!

  • Hi @amoupsou,

    I had a look at your experiment. Unfortunately, there are some issues with the sound files (I believe), which made it hard for me to debug (the experiment crashed unpredictably). Still, I realized a few weird issues, for example your condition to decide congruent vs. incongruent is also in the break if field of the loop. Which should abort the loop whenever there is a congruent trial? Also you mix inline code with items in a not optimal way. You could solve it by also adding the response collection into the inline_script (with the keyboards object), or use items altogether (I think the WCST tutorial does randomization that you will need). In any case, I am a bit at a loss here. If you want more of my help, I'd need a simplified version of your experiment, that is as light-weigth as possible while still producing the error that you struggle with.

    Hope this helps a bit,

    Eduard

    Buy Me A Coffee

  • Hi. @eduard .

    So, I implemented everything with inline script as you suggested. This really fixed the problem I had with the keyboard response. The logic is okay within the incongruent or incongruent scripts.

    Now I get a very different problem... I tried to define the "trial_type" by using an inline script at the beggining of the sequence, which defines the trial_type based on the 'var.count_trial_sequence' -which is built in , as I understand it. The aim of this script is to run an incongruent trial on the 1st, 4th and 10th trial:

    if var.count_trial_sequence == 1:
    var.trial_type = 'incongruent'
    elif var.count_trial_sequence == 4:
    var.trial_type = 'incongruent'
    elif var.count_trial_sequence == 10:
    var.trial_type = 'incongruent'
    else:
    var.trial_type = 'congruent'
    

    I implemented this logic in the 'run if' statement:

    What I get is an incongruent trial every second trial. I am really busting my head with this...

    Thank you in advance for your time, eduard. I really appreciate it.

    https://we.tl/t-eRa5DGBSvh

  • Hi,

    Not 100% sure, but I think the variable

    var.count_trial_sequence
    

    is only updated once per block and not once per trial. Perhaps you need to use a variable within that sequence?

    In any case, you can easily create a counter variable within your inline_script to be on the save side. Set it to 0 before the sequence, and then within, you can do "variable += 1" at the end or the beginning of the script.

    You know what I mean?

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.