Howdy, Stranger!

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

Supported by

Advanced loop operation weight always presented in blocks

Hi all,

I really like the advanced loop operations in OpenSesame. However, I have discovered one issue where I am not sure if the behavior is as desired.

If I use the weight operation in a loop that should be run in random order, any row that receives a weight > 1 is always presented in blocks.

That is, in the following loop (see below), the two repetitions of A are always presented adjacently (at least in my 10 tries). Is that desired? If not, I can also open an issue on GitHub.

Best,

Pascal

Script of loop example:

set source_file "" set source table set repeat 1 set order random set description "Repeatedly runs another item" set cycles 3 set continuous no set break_if_on_first yes set break_if never setcycle 0 Letter A setcycle 0 Weight 2 setcycle 1 Letter B setcycle 1 Weight 1 setcycle 2 Letter C setcycle 2 Weight 1 weight Weight run new_sketchpad

Comments

  • Hi Pascal,

    This is intended behavior, but I see not that it's not documented very clearly. The logic is that:

    1. The loop table is first created (randomized or not);
    2. Then constraints are applied;
    3. And finally the advanced loop operations are applied.

    If you want randomize at the very end, you would simply add a shuffle operation below the weight operation, if you see what I mean.

    I'll clarify this on the documentation site.

    Cheers!
    Sebastiaan

  • Hi Sebastiaan,
    thanks for the clarification!
    Best,
    Pascal

  • Dear reader,

    This has been helpful in solving my problem of setting a weighted experimental loop in random order by adding shuffle after weight (see code below). I have 3 (panel members) by 3 (valences) = 9 conditions that each appear with a different weighting. When I preview the loop, it is shown in random order(see screenshot).

    However, when running the experiment the weighted loop is still presented in blocks. Would you perhaps have any tips on how to solve this issue?

    Kind regards, Charlotte

    set source_file ""
    set source table
    set repeat 1
    set order random
    set description "Repeatedly runs another item"
    set cycles 9
    set continuous no
    set break_if_on_first yes
    set break_if never
    setcycle 0 Panel_Member A
    setcycle 0 Valence_Member Negative
    setcycle 0 Rep 8
    setcycle 1 Panel_Member B
    setcycle 1 Valence_Member Negative
    setcycle 1 Rep 5
    setcycle 2 Panel_Member C
    setcycle 2 Valence_Member Negative
    setcycle 2 Rep 2
    setcycle 3 Panel_Member A
    setcycle 3 Valence_Member Intermediate
    setcycle 3 Rep 5
    setcycle 4 Panel_Member B
    setcycle 4 Valence_Member Intermediate
    setcycle 4 Rep 5
    setcycle 5 Panel_Member C
    setcycle 5 Valence_Member Intermediate
    setcycle 5 Rep 5
    setcycle 6 Panel_Member A
    setcycle 6 Valence_Member Positive
    setcycle 6 Rep 2
    setcycle 7 Panel_Member B
    setcycle 7 Valence_Member Positive
    setcycle 7 Rep 5
    setcycle 8 Panel_Member C
    setcycle 8 Valence_Member Positive
    setcycle 8 Rep 8
    weight Rep
    shuffle
    run Block_sequence
    


  • Dear reader,

    I have tried to find a solution but so far no luck to solve the problem above. I am using opensesame 3.2.8. on a macbook Mojave 10.14.6. Any suggestions would be appreciated.

    Kind regards, Charlotte

  • Hi Charlotte,

    I have never worked with advanced loop operations, so I can't help you finding out what is happening in your code, but if you like I can try to solve your problem in different ways, i.e. python scripting. Let me know if you would like that.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.