Howdy, Stranger!

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

Supported by

Introduce an "Everything but X" in block loop

Hi,

I am building a RT Comprehension task where participants see a video prime, and have to decide whether it relates to a subsequent target object (yes / no).

What I am trying to do is that on compatible trials ("yes" trials) the correct object is called. That is no problem. However, I would like that in the incompatible trials, I would like the program to display any object at random that is not the correct object. How could I do that? I created an extra column "Shown_Target" (The video prime is later called as follows: set video_src "[Shown_Target][Prime][Producer].mp4"). I introduced the numbers of the correct objects for this block, and I would like to fill the empty cells with something like a code that tells the program "any object but X".

Is this possible? I am super grateful for any help I can get :)

Thanks!
Ingrid

P.s. Attached (I hope) you can see the block loop for the main task.

Comments

  • Hi Ingrid,

    I don't fully understand your paradigm, but this sounds like something you could do with horizontal shuffling, which is an advanced loop operation. The idea would be that you put all incompatible objects in different columns, then shuffle these columns, and then take the first one, so that you end up with a randomly selected incompatible object.

    You can see how this works in this video (in a different context):

    Does that help at all?

    Cheers,
    Sebastiaan

  • Hi Sebastiaan,

    thanks for your help! It might work, but I am not sure about how to implement it. I will try to explain things from the beginning again, as if may not have been clear previously. Attached is also the OpenSesame file.

    As I mentioned, the experiment consists of relating video primes to image targets that are either compatible or incompatible with the video primes. The problem is that we have 30 different objects these primes and targets relate to.

    **The video primes are called in the sketchpad as follows:
    **set video_src "[Object][Prime][Producer].mp4"

    "Object" has 30 levels (we have 30 different objects) and "Prime" has two levels (we have two primes that relate to each object). You can ignore the "Producer" variable for the time being.

    Now, what I am trying to do is that in compatible=yes trials, the image target shows the correct object. That is why I created a variable called "Target" that indicates which target is to be displayed. What I would like is that in compatible=no trials, any object but the correct one is displayed.

    **The image targets are called in the sketchpad as follows:
    **draw image center=1 file="w_[Target].png" scale=1 show_if=always x=0 y=0 z_index=0

    If I create the horizontal shuffles, how do I write the command in the sketchpad?

    The only solution I can come up with now is to create, say, three blocks with differently assigned incompatible targets for each object, and just have the program run one of the three blocks at random every time a new experiment starts. Do you see what I mean? That, of course, is a suboptimal solution, and I would end up with an experiment that has dozens of blocks at every step of the way (given that the above is an example of one block, but I have more blocks with other materials to be added later on).

    I hope I made things a bit clearer. The dream solution I initially envisioned was that in the block loop, I could assign fixed and random values within a column. So, to have taken the **empty **cells you can see under "Target" and to have introduced in all of them a formula that would go along the lines of "everything but "correct"".

    Once more, thanks so much for your help.
    Ingrid

  • Hi Ingrid,

    That is much clearer. Unfortunately, I don't have much experience using the advanced options of the loop item (horizontal shuffle, etc). I prefer to do slightly advanced things directly in an inline_script. So something along these lines:

    import random
    target_list = [1,2,3,4]
    if compatible == 'yes':
         target = target_list[0]
    else:
         target = random.choice(target_list[1:])
    
    # do more stuff
    

    If you are interested, I can make a small example script for you?

    Eduard

    Buy Me A Coffee

  • Dear Eduard,

    thank you so much for your help.

    This would mean that Target list 0 would draw from a column that includes the right information for compatible objects, whereas any other target list (assigned to the compatible = no trials) would draw a random item from a second list, right? I think this sounds about right! Where exactly should I implement such a script?

    Indeed, I would be very happy if you could send an example. I hope it does not take too much time.
    Cheers,

    Ingrid

  • Hi,

    Put the inline_script in the beginning of your block, and either do everything in it (incl. stimulus presentation, response collection and logging), or just set the relevant files names that will be used henceforth.

    Attached a file that implements it. See the logic?

    Ps . It probably won't work, something weird is going one with your experiment. I suppose you played around with the loop settings? maybe it is better to start over.

    Eduard

    Buy Me A Coffee

  • Once more, thanks!

    I ended up building the task a bit differently, by simply introducing two blocks with different non-compatible targets, and alternating their administration.

    What I am curious about is what you say about something weird going on with my experiment. On my laptop it all works fine, so I am not sure about what you mean.

    Ingrid

  • Hi,

    If it works don't worry too much. Not sure what exactly the issue is (could be also on my end), but when I opened your script (by clicking show general script, in the first item in the overview area), there were more than 1000 lines of code, which is far more than usual, even for rather complex experiments. I had the impression that for some reason OS remembered all the entries you have had in your loop table at some point while writing the experiment, but that's just guessing.

    Anyway, if it works reliably and you are happy, there is nothing to worry about :smile:

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games